How have stair line

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
TheGian
Posts: 11
Joined: Thu Sep 19, 2013 7:52 am

How have stair line

Post by TheGian » Wed May 28, 2014 8:52 am

Hi, I've a question, is there a way to have stair/step line without introduce additional points?
I found in the example "ExampleStairStepLine.cs" the function "MakeStairLinePoints" but I saw that this function introduce a new point between 2 point.
I need instead to have a interpolation that automatically joins 2 points with an angle without introducing new points.

Is this possible? if no, could this be a new feature?
Thank
Gian

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

Re: How have stair line

Post by ArctionPasi » Wed May 28, 2014 9:13 am

Hi,

that's currently the only way. Previous or next Y level has to duplicated with an extra data point in the series.

We'll consider adding StairStep line style in LC in the future, but I can't promise it to be implemented very soon.
LightningChart Support Team, PT

TheGian
Posts: 11
Joined: Thu Sep 19, 2013 7:52 am

Re: How have stair line

Post by TheGian » Tue Nov 04, 2014 4:28 pm

Any news about to add StairStep line style in LC?

TheWiggin
Posts: 2
Joined: Tue Oct 16, 2018 2:26 pm

Re: How have stair line

Post by TheWiggin » Tue Oct 16, 2018 3:40 pm

I would like to second the request made by TheGian... Adding a Stair-step style to the PointLineSeries would be a real benefit to me.

My application works with a large volume of process data from industrial plants. Some of our users have accumulated mny years of data, such that a large data review plot might contain several million data points. With the graphics package we are currently using, it can take over a minute to render such a graph -- that is what led me to try out LightningChart. Using your package, drawing the plot takes less than a second. That's the difference between "it doesn't work" and "It works great!"

But in a plot with ~5 million data points, it is a major buden to allocate 10 million SeriesPoints... it literally halves the effective number of points we can show in a graph (i.e. before hitting the active memory limit & blowing up the performance).

I think this feature can be implemented with a very minor change. In the (inefficient) package I am currently using, I implemented a StepLine by subclassing their Series class to overide the OnDraw() behavior, and simply replaced the "LineTo(x,y)" with 2 calls, LineTo(x,y[i-1]); LineTo(x,y). Of course, I don't know what magic is required to achieve your high performance, so I might be way off. But please consider it... I imagine many of your customers could benefit from this.

Thanks,

Curt Carney (aka. TheWiggin)

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: How have stair line

Post by ArctionKestutis » Wed Oct 17, 2018 8:54 am

Thank you Curt for the feature request.
Unfortunately there is no easy switch to stair-like line rendering. It is not only about line rendering itself but also about all other features and optimizations connected to the line Series: for example, X-Axis scrolling optimization, value tracking with cursor, scale breaking, advanced line coloring are just few things that come to my mind. It would be easy to make internal modifications in LightningChart code, which will render line stair-shape without doubling of points. However, this will most likely will throw the performance out of a window for all but few usage scenarios.
To date, the doubling of points and using PointLineSeries to create stair-shape data array remains optimal solution. We are still looking for other solution, which will not affect backward compatibility of LightningChart. However, you can buy the source code of LightningChart and modify according to your needs without worrying about other LightningChart users.

Hope this helps.
All the best.

Micha_el
Posts: 7
Joined: Wed Nov 15, 2023 12:25 pm

Re: How have stair line

Post by Micha_el » Tue Nov 28, 2023 12:43 pm

Hi,

five years later and I would like to ask if there are any news regarding a stair-like line rendering? Did it make it's way into a current release? Such a behavior would really be interesting for our purposes without the need of handling duplicate data points.

Regards,
Michael

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: How have stair line

Post by ArctionKestutis » Tue Nov 28, 2023 2:56 pm

This features did not gathered enough votes to be promoted on roadmap.
However, if your line has just 2 steps/levels, then maybe you would be interested in DigitalLineSeries. Please see news article (https://lightningchart.com/net-charts/d ... alization/) or Demo's ExampleLineSeriesXYFeatures.

ExampleLineSeriesXYFeatures
ExampleLineSeriesXYFeatures
ExampleLineSeriesXYFeatures.png (638.39 KiB) Viewed 19332 times


Otherwise, if you need new feature in LightningChart library, you can always promote your agenda by ordering customization service. If you interested in such service and/or want to discuss more, please write directly to Support at LightningChart.com email.

Post Reply