PointMark.DataItem is null with more than 200 dataitems?

2 posts, 0 answers
  1. lilleliz
    lilleliz avatar
    7 posts
    Member since:
    Dec 2006

    Posted 01 Jan 2012 Link to this post


    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?
  2. Evgenia
    Evgenia avatar
    1437 posts

    Posted 03 Jan 2012 Link to this post


    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,
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top