react-d3-plotter
v0.1.1
Published
React wrapper for d3 visualizations
Downloads
125
Maintainers
Readme
react-d3-plotter
This library provides wrappers for d3 visualization components, starting with a simple scatter plot. The motivation is to build a more up-to-date library for easy and fast prototyping of data visualization. Contributors are welcome.
Install
npm i -S react-d3-plotter
Prerequisites
npm i -S react d3
Scatter plot
Pass an array of x,y value pairs to the scatter plot. For instance:
const data = [[1,1], [2,10], [5,16]]
import { ScatterPlot } from 'react-d3-scatter'
...
<ScatterPlot data={data} />
Props
| props | default | type | description |
| - | - | - | - |
| data | []
| array | Array of x, y value paris |
| width | 600 | number | The width of the scatter plot in px
|
| height | 400 | number | The height of the scatter plot in px
|
| padding | 60 | number | A padding value in px
to properly display axis |