react-timeseries-charts
react-timeseries-charts copied to clipboard
EventMarker infoStyle attributes moved to box, docs not updated
Describe the bug
After upgrading to 0.16.1 the infoStyle
on my EventMarker
stopped working.
To Reproduce
<EventMarker
infoStyle={{
fill: theme.palette.background.paper,
opacity: 1,
pointerEvents: 'none',
stroke: theme.palette.divider,
}}
...
Expected behavior The style to apply as it did in 0.15.
Work around Changing it to the follow works:
<EventMarker
infoStyle={{
box: {
fill: theme.palette.background.paper,
opacity: 1,
pointerEvents: 'none',
stroke: theme.palette.divider,
},
}}
...
If this is actually what it's supposed to be then the changelog should document the breaking change, the default props should be corrected, and the docs need to be updated.
Is it true for BarChart too? For me the infoStyle attribute on BarChart componenet doesn't work.
<BarChart axis="y" series={avgSeries} columns={["total"]} style={this.style} infoStyle={{ stroke: "#999", fill: "red", opacity: 1, pointerEvents: "none" }} highlighted={this.state.highlight} onHighlightChange={highlight => this.setState({highlight})} info={infoValues} />
I tried this on BarChart and seems to work fine:
infoStyle={{ box: { stroke: '#ccc', fill: '#4E5153', opacity: 0.3, pointerEvents: 'none' } }}