Skip to content
Advertisement

Changing stroke color of LineSeries and/or AreaSeries in LightningChart

Is it possible to change the stroke color of LineSeries and/or AreaSeries in LightningChart JS based on point values? Example 1: Display the line as red when the y-value is above 10.0, but use blue color otherwise. Example 2: Display the line as yellow when x-value is between 1 and 10.

Advertisement

Answer

As far as current version 3.2 goes, no this is not possible (unless you construct each line segment point A -> point B manually using SegmentSeries and assign the colors yourself, but this will not be performant with even as little as 1000 data points or so).

PointSeries supports assigning a PalettedFill which can be used to color data points based on X or Y coordinates which would serve your needs.

Adding PalettedFill support for LineSeries and AreaSeries is on our bucket list and will likely be included in the next version after 2-3 months.

If this feature missing is a show stopper for you then please contact us for specialized service.

Otherwise, we’ll update this thread once the feature is out.

Advertisement