SilverLight: Large sets of data (50000 points)

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
jarp
Newbie
Newbie
Posts: 17
Joined: Thu Apr 09, 2009 12:00 am

SilverLight: Large sets of data (50000 points)

Post by jarp » Wed Jul 29, 2009 11:13 am

Hello,

I need to draw tens of thousands points on TChart. I tried with 5000 and 50000 points.

I attached sample project with TChart and GridSplitter. By moving the splitter I noticed very large delay which is not acceptable.

Is there any way to draw such a large number of points in SilverLight ?

Regards.
Attachments
SilverlightApplication1.rar
(1.2 KiB) Downloaded 411 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: SilverLight: 50000 points - very slow.

Post by Narcís » Wed Jul 29, 2009 11:33 am

Hi jarp,

I'm sorry but I'm not able to build an application with the files you sent. Can you please send a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

jarp
Newbie
Newbie
Posts: 17
Joined: Thu Apr 09, 2009 12:00 am

Re: SilverLight: Large sets of data (50000 points)

Post by jarp » Wed Jul 29, 2009 11:56 am


Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: SilverLight: Large sets of data (50000 points)

Post by Narcís » Wed Jul 29, 2009 1:21 pm

Hi jarp,

Thanks for the project!

First of all, notice that important performance enhancements have been implemented in TeeChart.Silverlight.dll for next maintenance release, due out in about 2 weeks.

Anyway, it's possible enhancing your application's performance using FastLine’s DrawAllPoints property set to false or DownSampling function. You’ll find examples of those features at the sections below in the features demo, available at TeeChart’s program group.

All Features\Welcome !\Chart styles\Standard\Fast Line\Fast Line Speed DrawAll
All Features\Welcome !\Functions\Extended\Reducing number of points

Adding DrawAllPoints=false to your code, as shown below, highly increases application's performance.

Code: Select all

        public MainPage()
        {
            InitializeComponent();
            Chart1.Series.Add(new Steema.TeeChart.Silverlight.Styles.FastLine());
            //((Steema.TeeChart.Silverlight.Styles.Points)Chart1.Series[0]).Pointer.Style = Steema.TeeChart.Silverlight.Styles.PointerStyles.SmallDot;            
            Chart1.Series[0].FillSampleValues(50000);
						(Chart1[0] as Steema.TeeChart.Silverlight.Styles.FastLine).DrawAllPoints = false;
        }  
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

jarp
Newbie
Newbie
Posts: 17
Joined: Thu Apr 09, 2009 12:00 am

Re: SilverLight: Large sets of data (50000 points)

Post by jarp » Thu Jul 30, 2009 7:51 am

Hello,

Actually I need to draw Points series not the Line. I tried with downsampling tool but it doesn't seem to work.

Code: Select all

            Steema.TeeChart.Silverlight.Styles.Points points = new Steema.TeeChart.Silverlight.Styles.Points();
            points.Pointer.Style = Steema.TeeChart.Silverlight.Styles.PointerStyles.SmallDot;
            points.FillSampleValues(50000);

            Chart1.Series.Add(points);

            Steema.TeeChart.Silverlight.Functions.DownSampling downsampling1 = new Steema.TeeChart.Silverlight.Functions.DownSampling();
            downsampling1.Tolerance = 100.0;
            downsampling1.Method = Steema.TeeChart.Silverlight.Functions.DownSamplingMethod.Average;
            
            points.Function = downsampling1; 

Are the performance enhancements implemended in next release will cope with a large number of points ?

Regards

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: SilverLight: Large sets of data (50000 points)

Post by Narcís » Thu Jul 30, 2009 8:30 am

Hi jarp,

What about doing as in the code snippet below? It works pretty well for me here.

Code: Select all

        public MainPage()
        {
            InitializeComponent();
            Chart1.Series.Add(new Steema.TeeChart.Silverlight.Styles.Points());
            //((Steema.TeeChart.Silverlight.Styles.Points)Chart1.Series[0]).Pointer.Style = Steema.TeeChart.Silverlight.Styles.PointerStyles.SmallDot;            
            Chart1.Series[0].FillSampleValues(50000);

						Chart1.Aspect.View3D = false;

						Steema.TeeChart.Silverlight.Functions.DownSampling downSampling1 = new Steema.TeeChart.Silverlight.Functions.DownSampling(Chart1.Chart);					
						Steema.TeeChart.Silverlight.Styles.Points points1 = new Steema.TeeChart.Silverlight.Styles.Points(Chart1.Chart);
						
						points1.DataSource = Chart1[0];
						downSampling1.Tolerance = 10.0;
						downSampling1.Method = Steema.TeeChart.Silverlight.Functions.DownSamplingMethod.Average;
						downSampling1.DisplayedPointCount = Chart1[0].Count / (int)downSampling1.Tolerance;
						points1.Function = downSampling1;

						Chart1[0].Active = false;
						Chart1[0].ShowInLegend = false;
        }  
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply