Chart Missing points, Interpolating?

3 posts, 0 answers
  1. Brett
    Brett avatar
    7 posts
    Member since:
    Dec 2011

    Posted 17 Jan 2012 Link to this post

    Attached image shows the difference between RadChart and Excel. Data is passed to RadChart as a List<List<DataPoint>>, where Datapoint has properties Value and Timestamp.  series definitions are being created/added as follows:

    LineSeriesDefinition def = new LineSeriesDefinition() { ShowItemLabels = false, ShowPointMarks = false, SeriesName = id.ToString() };
    def.InteractivitySettings = new InteractivitySettings() { HoverScope = InteractivityScope.Series };
    SeriesMapping L = new SeriesMapping() { CollectionIndex = id, SeriesDefinition = def };
    L.ItemMappings.Add(new Telerik.Windows.Controls.Charting.ItemMapping("Value", Telerik.Windows.Controls.Charting.DataPointMember.YValue));
    L.ItemMappings.Add(new Telerik.Windows.Controls.Charting.ItemMapping("TimeStamp", Telerik.Windows.Controls.Charting.DataPointMember.XValue));
    RadChart1.SeriesMappings.Add(L);

    I really need the cart to display exactly the values that I send it.  any thoughts?
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 19 Jan 2012 Link to this post

    Hi,

    Yes, the charts look different. Since I  have very little information about your input data - I must start guessing.

    How large is your data? If you have more than 200 input items in the items source - then most probably the data is being data sampled. In that case you might need to disable the sampling or just increase the sampling threshold. You can read about Sampling feature here.

    If you keep experiencing issues with this - do send us more information, preferably the data with which this incorrect output is recreated.

    Regards,
    Petar Marchev
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft banner
  4. Brett
    Brett avatar
    7 posts
    Member since:
    Dec 2011

    Posted 19 Jan 2012 Link to this post

    That did it, thanks.

    I've got to say, as someone who plays around with a control to get it do what I want, this is pretty infuriating.   I spent a lot of time trying to figure out what i was doing wrong with my data before I finally tracked the issue down to the chart control itself.

    I'm trying to imagine the thought process that lead to defaulting the sample to 200 points, rather than making this data-thinning an opt-in feature.

    oh well.  live and learn.
Back to Top