How to optimize line series performance

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
PetexUser
Newbie
Newbie
Posts: 15
Joined: Thu Jul 05, 2018 12:00 am

How to optimize line series performance

Post by PetexUser » Fri Mar 15, 2019 9:21 am

Hi,

Using the .Net Version=4.1.2018.5046 of TeeChart we observe slow performance of standard operations (render, zoom etc.).

As an example create 5 line series each with a million points (in a standard Winform).
The time to render the plot is improved if we use a FastLine series but not significantly.

When we compare performance with other similar Net charting software even with moderate size data sets TChart is significantly slower (i.e. takes 10s of seconds vs ms).

We would be interested in how we could optimize the performance of the plots.

Code extract
============
int numberPoints = 1000000;

Steema.TeeChart.Styles.FastLine lineSeries1 = new Steema.TeeChart.Styles.FastLine();
Steema.TeeChart.Styles.FastLine lineSeries2 = new Steema.TeeChart.Styles.FastLine();
Steema.TeeChart.Styles.FastLine lineSeries3 = new Steema.TeeChart.Styles.FastLine();
Steema.TeeChart.Styles.FastLine lineSeries4 = new Steema.TeeChart.Styles.FastLine();
Steema.TeeChart.Styles.FastLine lineSeries5 = new Steema.TeeChart.Styles.FastLine();
tChart1.Aspect.View3D = false;
tChart1.Aspect.ClipPoints = true;
tChart1.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.OptimizedBuffer;

// bottom axis - pipe length
Steema.TeeChart.Axis bottomAxis = tChart1.Axes.Bottom;
bottomAxis.Title.Visible = true;
bottomAxis.Title.Text = "Some data";

// left axis - property
Steema.TeeChart.Axis leftAxis = tChart1.Axes.Left;
leftAxis.Title.Visible = true;

lineSeries1.Color = Color.Blue;
lineSeries1.DrawAllPoints = false;
lineSeries1.FillSampleValues(numberPoints);


lineSeries2.Color = Color.Red;
lineSeries2.DrawAllPoints = false;
lineSeries2.FillSampleValues(numberPoints);

lineSeries3.Color = Color.Green;
lineSeries3.DrawAllPoints = false;
lineSeries3.FillSampleValues(numberPoints);

lineSeries4.Color = Color.Brown;
lineSeries4.DrawAllPoints = false;
lineSeries4.FillSampleValues(numberPoints);

lineSeries5.Color = Color.Orange;
lineSeries5.DrawAllPoints = false;
lineSeries5.FillSampleValues(numberPoints);

tChart1.Series.Add(lineSeries1);
tChart1.Series.Add(lineSeries2);
tChart1.Series.Add(lineSeries3);
tChart1.Series.Add(lineSeries4);
tChart1.Series.Add(lineSeries5);

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: How to optimize line series performance

Post by Christopher » Mon Mar 18, 2019 7:39 am

Hello!

with reference to the TeeChart Examples demo which you can download from GitHub here, there are two strategies you can try, one specific to the FastLine series and the other available for all TeeChart series types:
TeeChartNetExamples_2019-03-18_08-02-52.png
TeeChartNetExamples_2019-03-18_08-02-52.png (196.92 KiB) Viewed 14340 times
and
TeeChartNetExamples_2019-03-18_08-03-15.png
TeeChartNetExamples_2019-03-18_08-03-15.png (231.94 KiB) Viewed 14340 times
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

PetexUser
Newbie
Newbie
Posts: 15
Joined: Thu Jul 05, 2018 12:00 am

Re: How to optimize line series performance

Post by PetexUser » Wed Mar 20, 2019 12:35 pm

Thank you Christopher for your reply.

I have seen some improvement in performance after implementing your suggestions. I will discuss with my team however I think we can close this for now.

Mark

Post Reply