Options
All
  • Public
  • Public/Protected
  • All
Menu

D3.js with Ionic GitHub license

A tutorial app built with Ionic Framework to learn D3.js with Typescript


d3js-ionic-icon
google-play-icon
Build Status
Sonar quality gate
Code Climate
Maintenance
GitHub last commit
Open issues
Greenkeeper badge
Dependencies Status
DevDependencies Status

screenshot-1 screenshot-2


Presentation

Why this app?

I made this app while learning D3.js. But while I had in mind that my goal was to use it in an Ionic app, I realized there was some differences compared to a classical use. Mainly because of Typescript.

If you're in this case, you need to install TypeScript type definitions. So syntax may be different than a simple usage of D3.js.

Who is this for?

I propose to share my work to make you save time while learning.

I think these examples could also be appropriated if you already are in and advanced step of your learning but stuck on some points.

What can you find here?

Most of these examples are based on Dashing D3.js tutorials adapted in Typescript 2 for Ionic 3.


Working with this code

Prerequisites

Of course you need node and npm.

Please also be sure you installed Ionic and Cordova:

npm install -g ionic cordova

To verify your system is ok run ionic info.

Installation

Install the app by running:

git clone git@github.com:proustibat/d3js-ionic.git
cd d3js-ionic
ionic cordova prepare

This should prompt you if you want to install npm packages, answer yes. If it's not the case, run npm install;

Run the app:

// in the browser with livereload
ionic serve -l
// or on a device
ionic cordova run android --device
ionic cordova run ios --device

Documentation

Code documentation is available here

Feel free to improve the app

  • Please use commitizen if you wanna contribute to the project and create a pull request ( run git cz instead of git commit)
  • Quality code status is available on Sonarcloud
  • CI with Travis

Contribute

Support

If you are having issues, questions or any suggestions, please let me know: proustibat@gmail.com / twitter/@proustibat

License

The project is licensed under the GNU Affero General Public License v3.0 license


Dev stats

Complexity

How simple or complicated the control flow of the application is.

Complexity Complexity per file Cognitive Complexity

Documentation & sizes

Lines Lines of code Comment lines Comments (%)

Directories Files Classes Functions

Duplications

Duplicated blocks Duplicated lines

Issues

Open issues Confirmed issues Won't fix issues

Maintainability

Issues in this domain mark code that will be more difficult to update competently than it should

Code smells SQALE Rating

Technical debt

Effort to fix all maintainability issues. The measure is stored in minutes. An 8-hour day is assumed when values are shown in days. (The value of the cost to develop a line of code is 0.06 days)

Technical debt Technical debt ratio

Reliability

Issues in this domain mark code where you will get behavior other than what was expected.

Bugs Reliability remediation effort Reliability Rating

Security

Vulnerabilities Security remediation effort    Security Rating

Index

Variables

Const Components

Components: (SideMenuContentComponent | CommonHeaderComponent | FooterLinksComponent | ExpandableComponent)[] = [CommonHeaderComponent,FooterLinksComponent,ExpandableComponent,SideMenuContentComponent]

Const Menu

Menu: MenuOptionModel[] = [{displayName: 'Home',iconName: 'home',component: HomePage,selected: true}, {displayName: 'Beginners',subItems: [{displayName: 'Installation',component: InstallationPage,}, {displayName: 'Basic SVG Elements',component: BasicElementsPage,}, {displayName: 'Basic Shapes',component: BasicShapesPage,}, {displayName: 'SVG Paths',component: PathsSvgPage}, {displayName: 'Dynamic coordinate space',component: DynamicSvgCoordPage,}, {displayName: 'Scales',component: ScalesPage,}, {displayName: 'Group Element (SVG Part.)',component: GroupElementPage}, {displayName: 'Group Element (D3 Part.)',component: GroupElementD3Page,}, {displayName: 'SVG Text Element',component: TextElementPage,}, {displayName: 'D3.js Axes',component: AxesPage}]}]

Const Pages

Pages: (ScalesPage | HomePage | GroupElementD3Page | TextElementPage | AxesPage)[] = PagesList.map((page) => {return page.component;})

Const PagesList

PagesList: (object | object | object | object | object)[] = [{ component: HomePage, title: 'Home' },{ component: InstallationPage, title: 'Installation' },{ component: BasicElementsPage, title: 'Basic SVG Elements' },{ component: BasicShapesPage, title: 'Basic Shapes' },{ component: PathsSvgPage, title: 'SVG Paths' },{ component: DynamicSvgCoordPage, title: 'Dynamic coordinate space' },{ component: ScalesPage, title: 'Scales' },{ component: GroupElementPage, title: 'Group Element (SVG Part.)' },{ component: GroupElementD3Page, title: 'Group Element (D3 Part.)' },{ component: TextElementPage, title: 'SVG Text Element' },{ component: AxesPage, title: 'D3.js Axes' },]

Const RootPage

RootPage: HomePage = HomePage

Const SideMenuRedirectEvent

SideMenuRedirectEvent: "sidemenu:redirect" = "sidemenu:redirect"