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

Styling LineChart #404

Open zouzarf opened 5 years ago

zouzarf commented 5 years ago

Hi,

I wanted to know if it is possible to style a LineChart for each value , for example when it goes above the baseline , the line changes the color

Thanks

brandly commented 5 years ago

hey! i don't think this is currently possible.

for each of the provided columns, LineChart renders a single <path> with a set style

https://github.com/esnet/react-timeseries-charts/blob/c36d4034fd219101be1e52d9240aeeff8c124c42/src/components/LineChart.js#L188

so i don't think you can style segments of the line based on their values.