0.1.1 • Published 5 years ago

react-d3-plotter v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

react-d3-plotter

react npm version definition types

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

propsdefaulttypedescription
data[]arrayArray of x, y value paris
width600numberThe width of the scatter plot in px
height400numberThe height of the scatter plot in px
padding60numberA padding value in px to properly display axis