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

PointMark.DataItem is null with more than 200 dataitems?

1 Answer 34 Views
Chart
This is a migrated thread and some comments may be shown as answers.
lilleliz
Top achievements
Rank 1
lilleliz asked on 01 Jan 2012, 06:58 PM
Hi!

I was testing out the following tip: http://www.telerik.com/help/wpf/radchart-howto-display-pointmarks-and-labels-for-specific-points-only.html

It was working perfectly with my small dataset for testing but then once I tested it with a larger dataset it didn'n work anymore. After a bit of testing it seems this feature only works if the dataset has less than 200 datapoints. As soon as you reach 201 the DataItem is no longer attached to the pointmark. Why is this and is there a way around it?

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 03 Jan 2012, 10:52 AM
Hi,

When working with a huge number of data items (in the ItemsSource) the RadChart offers a feature called Sampling. To avoid unclear visual representation, and to improve performance, the chart combines several data items into a single data point.

For instance - if you have 1000 items in your items source - only 200 data points will be visualized (that is 200 bars, if you use bar series). That means that each data point contains information for 5 data items.

This is why the DataItem that is passed is null. 

You can set how many data points to be visualized by setting the SamplingThreshold property (by default it is 200).

In your case you might need to fully disable Sampling by setting SamplingThreshold  to "0". You can read more about Sampling here.

Kind regards,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
lilleliz
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or