/ionic2-d3js-example

This project shows how to integrate D3.js with Ionic 2.

Primary LanguageTypeScript

D3.js with Ionic 2 Examples

This project shows how to integrate D3.js with Ionic 2.

We'll implement a few D3.js examples described in bl.ocks.org in Angular2.

Examples Summary

  • Line Chart
  • Bar Chart
  • Pie Chart

Configuration

Before you go through this example, you should have at least a basic understanding of Ionic 2 concepts. You must also already have Ionic 2, Node.js and npm installed on your machine.

  1. Install D3.js
	npm install d3 --save
	npm install @types/d3 --save-dev --save-exact
  1. Run Ionic App

    • Test in localhost:
    	ionic serve
    • Test in Android/iOS mobile:

       	ionic add platform android 
       	ionic add platform ios
       	ionic run android
       	ionic run ios

    Bar Chart Pie Chart

License

MIT License.

Original work Copyright (c) 2017 Adrián Brito