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

SplineSeries go only "forward"

3 Answers 38 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 08 Feb 2016, 03:03 PM

Hi guys, i have big problem with SplineSeries on RadCartesianChart.

I have DateTimeContinuousAxis on my X axis and LinearAxis on my Y axis.

I want to make average line using SplineSeries but i have problem with drawing it properly.

In attach i created 2 series of data:
LineSeries (BlackLine) and SplineSeries (RedLine)

Both of them are binded to the same collection of data.

And now, i don't know why, SplineSeries go back and then forward, how i can archive line like LineSeries but more rounded? (I Want to SplineSeries go only forward).

I founded this link on Google but it's doesnt work:
http://marketplace.telerik.com/forums/spline-series---only-go-forward

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Feb 2016, 12:48 PM
Hello Adam,

The chart control draws the line between the series' data points following the order in the source collection. For example, if you have items with X values 4, 1, 3, 5 which are ordered in the same way on the ItemsSource collection, the line will start to draw from 4, then return to 1, after this goes to 3 and end at 5.

In order to achieve your requirement you will need to order the source collection by the X value of its items. If the horizontal (X) axis is categorical you can order the collection by distinct categories. Please try this an let me know if it works for you.

Regards,
Martin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Adam
Top achievements
Rank 1
answered on 09 Feb 2016, 06:54 PM

Hi,

My X axis is DateTimeContinuousAxis and the source collection is ordered by dates (from smalles to largest (black line on the chart proves that because is binded to the same data as SplineLine)).

The problem appears when between points is a big gap like on the screen:
21.07 - before this date is a loot of points, then is a big gap until 24.08

0
Dinko | Tech Support Engineer
Telerik team
answered on 12 Feb 2016, 02:54 PM
Hi Adam,

We must have misunderstood you in your first post. Basically, the spline series use a canonical spline algorithm with a certain tension. You can read about the canonical splines here and see a demo here. We have not exposed any splining options and it is not possible to customize the splining in any way. We have such a feature request in our feedback portal, where you can vote and track its status.

Splines are not an adequate presentation for all cases, and we think that you have stumbled upon a scenario where you would be better off using a simple line.

Regards,
Dinko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Adam
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Adam
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or