A horizontal stacked bar component created with
React
andd3
npm install --save component-horizontal-stacked-bar
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}
/>
)
}