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

KeepExtremes sampling function is not keeping extremes

1 Answer 35 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 10 Dec 2012, 11:57 PM

I have created a RadChart that is accepting a lot of data. For the test I am currently trying, it has 170,000 records coming in that I am trying to graph with a line series.

The chart has the following properties:

<control:RadChart x:Name="FlightGraph" UseDefaultLayout="False">

       <control:RadChart.SamplingSettings>

              <chart:SamplingSettings SamplingThreshold="5000" SamplingFunction="KeepExtremes" />

       </control:RadChart.SamplingSettings>

       <chart:ChartArea x:Name="FlightGraphArea" EnableAnimations="False">

       <!--   <chart:ZoomScrollSettings ScrollMode="ScrollAndZoom"/>-->

       </chart:ChartArea>

</control:RadChart>

 

I am having difficulties with the sampling. If I don’t use it, the entire chart grinds to a halt under the massive amount of rendering it needs to do. However, the sampling function does not appear to work as I would expect.

When the chart is displayed, the highest value it shows in 1.176. However, there are values of 1.25 in close proximity. If I zoom in to the points where I know they are, then they show up. But I do not understand why I have to do that. With the KeepExtremes sampling function, I would assume that the highest value would be the one to show up.

Can anyone explain this? Is there a way to get this working?

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 13 Dec 2012, 12:20 PM
Hi Erik,

KeepExtremes actually returns either the minimum or the maximum in the current sample. Which value will be returned depends on the average -- the one that is farther from the average will be used. So, in this very case, please check if the average is closer to the maximum. This would cause the effect you have observed. When zooming in, the sample size is decreased and it is possible that the average is closer to the minimum, so you see the value you expect. If you need to use the max value all the time, please use ChartSamplingFunction.Max instead.

Best regards,
Ves
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Erik
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or