Reputation: 35
I currently render the chart like this:
<BarChart width={868} height={40} data={data}
margin={{top:0, bottom: 10, left:0, right:0}} barSize={5}>
<Tooltip
labelStyle={{ textAlign: 'left' }}
cursor={{fill: "blue"}}
position={{ x: this.state.mouseX - 20, y:-5 }}
/>
<Bar dataKey="blocks"
onMouseOver={e => this.getMouseX(e)} >
{
data.map((entry, index) => {
const result = entry.result > 4 ? TRASH : NO_TRASH;
return <Cell fill={result} key={index}/>;
})
}
</Bar>
</BarChart>
Is there a way to change the cell/bar color, not cursor when you hover the bar?
Upvotes: 0
Views: 3901