Skip to content
pml984 edited this page Apr 22, 2016 · 7 revisions

Charts

Chart.JS

We are using Chart.JS version 2.0 as the framework for the charts within our framework. Chart.JS recently updated to version 2.0 and now contains 8 total charts for use. Any property present in the Chart.JS Documentation can be provided to our custom charts (make sure to go to the docs-v2 page as the original page points to the version 1 documentation)

To easily integrate Chart.JS within React, react-chartjs was created.

NOTE: The latest version of react-chartjs is on 0.7.4, which still uses Chart.JS version 1. The code was already completed to now work with version 2 in their chartjs-v2 branch. A fork of of the repository was created and this branch was deployed so that ChartJS version 2 could be used. Once react-chartjs is deployed, switch back to using react-chartjs framework as a dependency.

Using Charts

Each of these charts can be used from within the framework by simply importing each of the chart types:

*AreaChart *BarChart *BarChart v *BarChart *BarChart *BarChart

import {BarChart, BasicDataTable, Map} from 'safe-framework'

Clone this wiki locally