Performance of ImagePoint Series : TeeChart 2011

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Arthur Dunn
Newbie
Newbie
Posts: 13
Joined: Thu Sep 22, 2011 12:00 am

Performance of ImagePoint Series : TeeChart 2011

Post by Arthur Dunn » Mon Dec 19, 2011 5:02 am

Hi,

I'm trying to display custom images as pointers in TeeChart 2011. I'm able to achieve that using ImagePoint series. But the performance of the same is an issue here. When there are above 2000 points on the chart, the chart becomes sluggish. Trying to zoom or moving the cursor on the chart is really slow. Our expectation is to have 25000 points on the chart in total (through both single and multiple series).

I have even tried using the Points series for the same and by setting the brush image to the custom image. That to behaves the same way.

Please suggest me on this.
Thanks in advance.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Performance of ImagePoint Series : TeeChart 2011

Post by Sandra » Wed Dec 21, 2011 12:49 pm

Hello Arthur Dunn,

Sorry the delay. I have made a simple code where I achieve increase the speed, changing a range of scale of Bottom axes:

Code: Select all

        Steema.TeeChart.Styles.ImagePoint imagePoint1;
        public Form1()
        {
            InitializeComponent();
            tChart1.Aspect.View3D = false;
            tChart1.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None;
            imagePoint1 = new ImagePoint(tChart1.Chart);
            InitializeChart();
        }
        double[] x1;
        double[] y1;
        private void InitializeChart()
        {
            Random rnd = new Random();
            x1 = new double[25000];
            y1 = new double[25000];
            tChart1.AutoRepaint = false;
            for (int i = 0; i < 25000; i++)
            {
                x1[i] = i;
                y1[i] = rnd.Next(10000) ;
            }
            imagePoint1.Add(x1, y1);
            tChart1.AutoRepaint = true;
            tChart1.Refresh();
            tChart1.Axes.Bottom.SetMinMax(0, 1000);
        }
Can you tell us if previous code works as you expected?
I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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

Arthur Dunn
Newbie
Newbie
Posts: 13
Joined: Thu Sep 22, 2011 12:00 am

Re: Performance of ImagePoint Series : TeeChart 2011

Post by Arthur Dunn » Mon Jan 23, 2012 6:36 am

Thanks for your reply Sandra.

But minimizing the X-axis range as given here does mean that at any point of time the chart displays only 1000 points in total. Unfortunately that is not our requirement. The X-axis range should display all of the data. User would zoom in and look into those points for more details. But the zoom/unzoom process slows down when more data gets added to chart. Same happens with even 5000 points if the pointer size is larger than the default.

Do you have some other solution ?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Performance of ImagePoint Series : TeeChart 2011

Post by Sandra » Mon Jan 23, 2012 1:18 pm

Hello Arthur Dunn,

When you draw Image point with a lot of points, and you want add every time more points points, the performance is more slow and in the case of Image Point series, you need use more performance, for its properties, that do slower the painted of Chart. We always work to improve the performance of TeeChart, to get more optimal and speed, Charts. For this, at the moment I only can recommend you try to increase the speed of your chart changing the number of points per page you allow you see all of values but in different pages as do in next code :

Code: Select all

  Steema.TeeChart.Styles.ImagePoint imagePoint1;
        public Form1()
        {
            InitializeComponent();
            tChart1.Aspect.View3D = false;
            tChart1.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None;
            imagePoint1 = new ImagePoint(tChart1.Chart);
            InitializeChart();
        }
        double[]x1;
        double[] y1;
        private void InitializeChart()
        {
            Random rnd = new Random();
            x1 = new double[25000];
            y1 = new double[25000];
            tChart1.AutoRepaint = false;
            for (int i = 0; i < 25000; i++)
            {
                x1[i] = i;
                y1[i] = rnd.Next(10000);
            }
            imagePoint1.Add(x1, y1);
            tChart1.AutoRepaint = true;
            tChart1.Page.Current = 5;
            tChart1.Page.MaxPointsPerPage = 5000;

            tChart1.Refresh();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            tChart1.Page.Previous();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            tChart1.Page.Next();
        }
Can you tell us if previous code is a good solution for you?

I hope will helps.

Thank,
Best Regards,
Sandra Pazos / 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