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

Style each box separately on BoxChart #323

Closed gilneto8 closed 6 years ago

gilneto8 commented 6 years ago

Hi everyone,

I've started using your library a couple of days ago, and am trying to integrate it with our internal requirements. Right now, we have a data feeder connected that will output a couple of values per second, and randomly will emit 'null' values. On the backend, these 'null' values are treated and updated to the last non-null value emitted, and a flag is switched to signal that this value is calculated and not emitted directly.

On my side, I'm receiving the data and printing it just fine. I already found a way to show the calculated values' information on the info tooltip, but I'd like a way to show each 'calculated' value in a different color directly on the chart. Is this even possible? On your documentation, I can't seem to find any specifics regarding my needs.

Thanks in advance, Gil

pjm17971 commented 6 years ago

Sorry, as it is right now, all boxes are styled the same. There is precedent in the code for such styling, such as the scatter chart, but currently the box chart is styled for all events at once. You could overlay multiple box charts, if there's a discrete number of categories i.e. calculated vs direct (if I'm understanding you description correctly).

gilneto8 commented 6 years ago

Thanks for the answer. You understood correctly, the amount of categories will always be discrete. For now I think our best option is to simply show that information on the info box. That way, it'll be easier to refactor the code when/if this feature becomes available.

Thank you, Gil