Modular ReactJS charts made using d3 chart utilities. Work on project documentation has started here. A few examples of the available charts can be seen below, the others can be viewed here, side-by-side with the React code that generates the charts.
The latest version of rd3 requires React 0.14 or later. If you are using older React version, please refer to here
Thanks to npmcdn you can now try out rd3 quickly:
npm install rd3
Then, import into your ReactJS project:
var rd3 = ;// es6;
The charts are then available under the
rd3 namespace, which you can then use as shown on the demonstration page:
const BarChart = rd3BarChart;const LineChart = rd3LineChart;const PieChart = rd3PieChart;const AreaChart = rd3AreaChart;const Treemap = rd3Treemap;const ScatterChart = rd3ScatterChart;const CandleStickChart = rd3CandleStickChart;
Although there have been several different approaches proposed for combining the power of d3 with the flexibility and modularity of ReactJS, the approach I'm using here was inspired by this blog post by Ben Smith of Binary Consulting.
With this approach, React itself is responsible for generating the SVG markup. d3.js is used for its tremendous collection of utility functions, such as those that calculate the
path value for various chart types.
Copyright (c) 2014-2015 Eric. S Bullington, Lim Yang Wei, and project contributors