Out of tolerance band display on PointLineSeries

Need help in implementing some specific function to your LightningChart Ultimate powered application? Post a question and get code snippets from other LightningChart Ultimate community members.

Moderator: Queue Moderators

Post Reply
benzp
Posts: 6
Joined: Mon May 06, 2013 10:00 am

Out of tolerance band display on PointLineSeries

Post by benzp » Mon May 06, 2013 10:14 am

When sampling real-time data (line charts using PointLineSeries) I need to be able to highlight values that are above and below a tolerance band in red.
I have tried populating two separate PointLineSeries, one coloured red and one normal line colour, but this does not work because each out of tolerance section is always connected to the previous one and not shown in isolation.

What is the best way to achieve this using LightningChart in a way that can cope with many real-time plots on a single screen?

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

Re: Out of tolerance band display on PointLineSeries

Post by ArctionPasi » Mon May 06, 2013 2:00 pm

Version 5.1 came with ValueRange-palette coloring of line series, so definitely that would be the easiest approach. And also approach that give the best performance. See PointLineSeries.ValueRangePalette and PointLineSeries.UsePalette properties. In the ValueRangePalette, you can define the out-of-tolerance levels(or in fact, maximum level with that color).

And take a look at "Line, palette coloring" example. Set Uniform coloring.
Point-line series with palette coloring
Point-line series with palette coloring
PaletteColoring.jpg (177.62 KiB) Viewed 18935 times


:shock:
LightningChart Support Team, PT

benzp
Posts: 6
Joined: Mon May 06, 2013 10:00 am

Re: Out of tolerance band display on PointLineSeries

Post by benzp » Tue May 07, 2013 8:14 am

Thank you for the quick response.

I also need to be able to change the levels dynamically whilst writing data. The level needs to be controllable so that it will change for a particular point being written to the PointLineSeries.. Points before the change should keep the previous levels and points after use the new levels.
Is this sort of control possible?

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

Re: Out of tolerance band display on PointLineSeries

Post by ArctionPasi » Wed May 08, 2013 9:06 am

Using event-driven line shaping/color method, you can accomplish it. It is more complex than palette-coloring though, and you must be ready to respond to this event when ever chart raises the event, and give colors for the X range that the chart supplies in the event. See the "Line, event-based coloring" example.
Event-driven coloring of line
Event-driven coloring of line
EventDrivenColoring.jpg (154.22 KiB) Viewed 18907 times
LightningChart Support Team, PT

jhyap
Posts: 28
Joined: Tue Apr 16, 2013 12:07 am

Re: Out of tolerance band display on PointLineSeries

Post by jhyap » Fri May 10, 2013 4:16 am

If I implement this event-driven line in real time inside my real time multi-channel chart. Would it be too complex to render?

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

Re: Out of tolerance band display on PointLineSeries

Post by ArctionPasi » Wed May 15, 2013 11:22 am

Your app will perform just fine. The overhead is not that significant, but of course depends on how fast event handler you write. 8-)
LightningChart Support Team, PT

Post Reply