Introduction | Demo
react-d3kit
Easily convert d3Kit chart into React component
Install
npm install react-d3kit --save
or
bower install react-d3kit --save
Example Usage
Basic
// When PlainBubbleChart is a reusable chart written in d3Kit.const BubbleChart = ReactD3Kit; ReactDOM;
With auto-resize
You can pass props fitOptions
and watch
, which is equivalent to calling d3Kit's chart.fit(fitOptions, watch)
. See documentation here.
// When PlainBubbleChart is a reusable chart written in d3Kit.const BubbleChart = ReactD3Kit; const fitOptions = width: '100%' height: 400 ; ReactDOM;
See demo source
Import into your project
Choice 1. Global
Adding this library via <script>
tag is the simplest way. By doing this, ReactD3Kit
is available in the global scope.
Choice 2: AMD
If you use requirejs, this library support AMD out of the box.
require;;
Choice 3: node.js / browserify
This library also supports usage in commonjs style.
const ReactD3Kit = ;
Choice 4: ES6 Import
;
License
© 2016 Krist Wongsuphasawat (@kristw) Apache-2.0 License