0.1.1 • Published 4 years ago
react-waterfall-chart v0.1.1
React-Waterfall-Chart
An easy to use React component for creating waterfall charts.
Installation and usage
The easiest way to use react-waterfall-chart is to install it from npm.
npm install --save react-waterfall-chartThen use it in your app.
import { Waterfall } from 'react-waterfall-chart';
const data = [
{
labels: ['step 1'],
start: 0,
end: 3,
},
{
labels: ['step 2'],
start: 3,
end: 9,
},
{
labels: ['step 3'],
start: 9,
end: 10,
},
];
function App() {
return <Waterfall data={data} />;
}Props
data- Required. An array of objects representing each row in the chart. Each object requiresstart, andendvalues, and can also accept an array oflabelsand a string forcolor.maxValue- Optional. Define the maximum value of your chart. WithoutmaxValuethe highestendin the provided data will be used.