This is a migrated thread and some comments may be shown as answers.

Spline Series - only go "forward"

1 Answer 75 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 28 Feb 2013, 10:14 AM
I've been fiddling for a little bit now, I have to admit I haven't put a huge amount of time into learning the charting control as it is only used for this one display in my app.

How can I force the line to only go forwards, and never return "back", there will never be a need to go back as I order the objects before binding. 

I've removed all data points bar these 4 to make it a bit more obvious. I can just use a normal line but the spline I think is better suited, if this behaviour is modifiable.

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 05 Mar 2013, 09:55 AM
Hi Michael,

This particular aspect of the spline series' appearance is not modifiable. What you see is a direct consequence of the algorithm used to render a spline which is nearly ubiquitous for all spline implementations. For more information, you can check out this page that explains how splines are calculated and rendered at runtime. In addition, you can check out this demo that shows the changes in a spline in real time depending on the distance between points.
In short, the reason why the spline goes backwards is because there is a set of three points, where the middle point is very close to one of the rest and its other neighbor is too far away. Of course, you could trick the chart's spline series into appearing the way you require by rearranging the data points, i.e. changing the source data. But, needless to say, I don't think that is a feasible solution.
Another option would be to use a different series, such as a line, as you mentioned initially.

Kind regards,
Ivan N.
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Michael
Top achievements
Rank 1
Answers by
Missing User
Share this question
or