Skip to content

mdshamoon/react-d3-graphs

Repository files navigation

react-d3-graphs

React wrapper for d3.js

Getting started

Install library with peer dependencies

npm install --save react-d3-graphs

# or

yarn add react-d3-graphs

Usage

import { Bar } from 'react-d3-graphs';

<Bar width={300} height={400} barColor="#fff" bgColor="#234f22" data={ [ {value: 10}, {value:20} ] } />

Configure

Bar graph props

width: number;
height: number;
data: Array[{ value: string }];
barColor: string;
bgColor: string;

width

Type number Default: undefined

width of the graph

height

Type number Default: undefined

height of the graph

data

Type: Array of values Default: undefined

An array of values for the graph

barColor

Type: string Default: #000000

Color of the bar and text in hex

bgColor

Type: string Default: #000000

Color of the background in hex

About

Beautiful charts made with React and d3

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors