component-horizontal-stacked-bar
v2.0.1
Published
A horizontal stacked bar component created with React and d3
Downloads
5
Maintainers
Readme
component-horizontal-stacked-bar
A horizontal stacked bar component created with
React
andd3
Install
npm install --save component-horizontal-stacked-bar
Example
import React from 'react'
import HorizontalStackedBar from 'component-horizontal-stacked-bar'
export default function EconomicDomainAggregatesBar ({
className,
data
}) {
const generateLabel = (d, i) => { /* ... */ }
const generateColor = (d, i) => { /* ... */ }
return (
<HorizontalStackedBar
className={className}
data={data}
generateLabel={generateLabel}
generateFillColour={generateColor}
/>
)
}