PointLineSeries - highlight all samples < 0

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

PointLineSeries - highlight all samples < 0

Post by greggorob64 » Tue Sep 02, 2014 6:58 pm

I'm representing a line whose value will sometimes (but infrequently) dip below zero.

I'd like to highlight this line segment by turning the trace red for just that value. Is this possible to do? I'm not sure mechanism to use to accomplish this.

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: PointLineSeries - highlight all samples < 0

Post by ArctionPasi » Tue Sep 02, 2014 7:10 pm

You can do that with ValueRangePalette coloring of PointLineSeries, SampleDataSeries or FreeformPointLineSeries.
Line coloring with ValueRangePalette
Line coloring with ValueRangePalette
LineColoringWithPalette.jpg (133.32 KiB) Viewed 6638 times
Just set
- series.UsePalette = true
- series.ValueRangePalette.Type = Uniform
- In series.ValueRangePalette.Steps, define two steps. Red step with 0 value, and White step to 10000 or so.

Then the values below 0 are colored with red, and above that with white. You can add more steps in the palette too.
LightningChart Support Team, PT

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

Re: PointLineSeries - highlight all samples < 0

Post by greggorob64 » Tue Sep 02, 2014 7:15 pm

Thanks pasi!

Post Reply