Spline Series - only go "forward"

2 posts, 0 answers
  1. Michael
    Michael avatar
    2 posts
    Member since:
    Oct 2012

    Posted 28 Feb 2013 Link to this post

    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.
  2. Missing user
    Missing user avatar

    Posted 05 Mar 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top