esnet / react-timeseries-charts

Declarative and modular timeseries charting components for React
http://software.es.net/react-timeseries-charts
Other
861 stars 284 forks source link

EventMarker infoStyle attributes moved to box, docs not updated #400

Open damonmaria opened 5 years ago

damonmaria commented 5 years ago

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.

parasjain1 commented 4 years ago

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} />

josegarrera commented 2 years ago

I tried this on BarChart and seems to work fine: infoStyle={{ box: { stroke: '#ccc', fill: '#4E5153', opacity: 0.3, pointerEvents: 'none' } }}