.NET Framework Developer Center > .NET Development Forums > Chart Controls for .NET Framework > Improve performance with undersampling or interpolation
Ask a questionAsk a question
 

AnswerImprove performance with undersampling or interpolation

  • Thursday, October 29, 2009 9:37 AMM.Simioni Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi all,

    i'm using Chart Controls in an ASP.NET application.

    The output is a line-chart 1000px wide image, and i'm plotting 86400 sample, a 1-day dataset with one sample per second.

    I'm asking what is the interpolation algorithm used by charting control to draw the line and produce the 1000px image starting from a large (86400 samples) dataset, so that i can pre-process the dataset and undersample it with the same interpolation used, pre-filtering the dataset from 86400 samples to something like 1000 samples.

    I think this could improve my performances.

    Thank i.a.,

    regards

    Marco

Answers

All Replies

  • Thursday, November 05, 2009 4:20 PMAlex GorevMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    There is no such algorithm built into the chart control and you will have to implement it. After that you can use FastLine or FastPoint charts to improve performance.

    Alex.
    http://blogs.msdn.com/alexgor
  • Thursday, November 05, 2009 6:07 PMCole Brand Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    There is no such algorithm built into the chart control and you will have to implement it. After that you can use FastLine or FastPoint charts to improve performance.

    Alex.
    http://blogs.msdn.com/alexgor

    Alex, I think you've missed his point. How does fastline know whether to draw a line between (X17,Y17),(X18,Y18) or to draw a curve, as an example for the question. However, you're right that he's overthinking it.

    My advice to the OP is, unless you need to make a note of outliers (which I imagine you're already looking at and wondering what to do with - I advise a table after the chart), I would sample every 9th and use a spline type graph.

    Just my $.02

    Please don't forget (and feel free to remind me) to post if you got the answer you wanted, and select who really answered your post when you do so future visitors will know too! Remember, this is .NET 4.0 in a .NET 3.5 world, you're a pioneer right now.