Search code examples
wpfchartsvisifire

how to deal with visifire chart when a number of datapoints to display


In my application, I met a problem about visifire chart. I used the code like that:

var series = new DataSeries { RenderAs = RenderAs.Spline, LegendText = legendText};

source.Select(p => new DataPoint
{
   AxisXLabel = p.DateTime.ToString("yy-MM-dd\n  HH:mm"), YValue = p.Value ?? 0,
}).ToList().ForEach(p => series.DataPoints.Add(p));
_chart.Series.Add(series);

When there are a number of datapoints, the app's performance is very serious. Is there a good idea to solve this problem?


Solution

  • There has been major performance improvements in Visifire 5.0. So I suggest you to use Visifire 5.0 and set LightWeight property to True in DataSeries and also use LightDataPoint instead of normal DataPoint.