Zooming on ColorGrid leads to corrupted display

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Zooming on ColorGrid leads to corrupted display

Post by Frances » Tue Mar 29, 2011 1:55 pm

Hello,

I'm currently working with a ColorGrid having quite some values, around 600000 in this example but the problem is reproductible with less values than that. When displaying the full range of the Y axis, in order to have every value displayed, everything is fine, but when trying to zoom or trying to make bigger anything under half of the Y range then the data is not displayed properly and stays black. Here are a few screenshots to make it more clear :

Initial display :
fullrange.jpg
Full range, everything is fine
fullrange.jpg (451.93 KiB) Viewed 20041 times
Reducing Y range :
ChangingYAxisRange1.jpg
Starting to reduce Y axis range, some data starts to be black
ChangingYAxisRange1.jpg (377.5 KiB) Viewed 20042 times
Reducing Y range more :
ChangingYAxisRange2.jpg
Reducing Y axis range, when reaching half of the range the whole displayed data is black.
ChangingYAxisRange2.jpg (86.84 KiB) Viewed 20014 times

When zooming anywhere under half of the range we have a similar behavior, every data being black.

Kind regards

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Re: Zooming on ColorGrid leads to corrupted display

Post by Frances » Tue Mar 29, 2011 2:07 pm

By the way, working on smaller sets of data I have a different kind of corruption, if zooming too much the color seem to be chosen randomly, if dezooming everything is back to normal. This happens both if zooming is done at the same time than updating, or at a different time.
shinyColor.jpg
shinyColor.jpg (253.88 KiB) Viewed 20043 times

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

Re: Zooming on ColorGrid leads to corrupted display

Post by Sandra » Wed Mar 30, 2011 10:12 am

Hello Frances,

I inform you that bug with number (TF0201511) was fixed in maintenance release of 28th of -version 2010. You can find more information in page version info. I recommend you download Eval version of TeeChart.Net 2010 that you can find in download page and check if still appears problem.


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

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Re: Zooming on ColorGrid leads to corrupted display

Post by Frances » Wed Mar 30, 2011 10:48 am

Hello Sandra,

My bad, I haven't found the previous bug report about this. I've tested the evaluation version and this is has been nicely fixed. Sweet !
ps : Do you have any idea when the evaluation version is going to be released as an official version ?


Kind regards

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

Re: Zooming on ColorGrid leads to corrupted display

Post by Narcís » Wed Mar 30, 2011 10:59 am

Hi Frances,

As you can see in the version info page, TeeChart for .NET 2009/2010 (aka v4), has been a stable release since April 2009. Fully functional evaluation versions are for users to test Steema products before purchasing/upgrading so they can see how products will perform for them. TeeChart for .NET can be upgraded online at http://www.steema.com/order/net/u.
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

CourteousD
Newbie
Newbie
Posts: 12
Joined: Mon Feb 06, 2012 12:00 am

Re: Zooming on ColorGrid leads to corrupted display

Post by CourteousD » Fri Jul 20, 2012 7:06 am

Hi,

I appear to be experiencing the same (or very similar) issue to Frances. Unfortunately I am using the latest version (TeeChartNET2012_4.1.2012.07130). I was using a 2011 version which had the same issue. I did update the reference in my project to ensure I'm using the right dll, but no luck.

Any idea why this may be occurring? I am using quite a few points - in this particular example 1024 (x) x 389 (y).

Thanks,

Michael

CourteousD
Newbie
Newbie
Posts: 12
Joined: Mon Feb 06, 2012 12:00 am

Re: Zooming on ColorGrid leads to corrupted display

Post by CourteousD » Mon Jul 23, 2012 6:00 am

The problem seems to only occur when the first x value is non-zero (in my case, 1). If it is zero, it works perfectly.

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

Re: Zooming on ColorGrid leads to corrupted display

Post by Sandra » Mon Jul 23, 2012 2:37 pm

Hello CourteousD,

Seems that if you use x=1 and z=0 the grid need set the property IrregularGrid to true. Please, can you tell us if you active the property Irregular grid of ColorGrid to true the problem is solved for you, if you use x=1 and z=0?.

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

CourteousD
Newbie
Newbie
Posts: 12
Joined: Mon Feb 06, 2012 12:00 am

Re: Zooming on ColorGrid leads to corrupted display

Post by CourteousD » Tue Jul 24, 2012 12:22 am

Hi Sandra,

I was looping through with x = 1-count, and z = 0-count - 1. If I set IrregularGrid to true, the corruption while zooming goes away, though the time to actually perform the zoom increases by 3-4x, up to 7-10s for a plot of this size.

It appears that starting with a non-zero x0 (the starting x) and z0 = 0 shows the corruption, but if z0 is non-zero it doesn't occur.

I'm assuming this is a bug of some kind, so I'll need a work around such as turning on IrregularGrid. Is there a way to improve rendering speed for charts with lots of points like this one? Perhaps using Draw2D or OpenGL?

Michael

CourteousD
Newbie
Newbie
Posts: 12
Joined: Mon Feb 06, 2012 12:00 am

Re: Zooming on ColorGrid leads to corrupted display

Post by CourteousD » Tue Jul 24, 2012 3:51 am

In addition to that, there appears to be another problem. Zooming does not appear to work when CenteredPoints is set to true. The Zoomed event fires, but what's on the screen doesn't change.

In VS2010 I saw a message in the debugger's output when I attempted to zoom, following the Zoomed event:
A first chance exception of type 'System.AccessViolationException' occurred in mscorlib.dll
This occurs even when I change the x's and z's to avoid corruption.

Michael

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

Re: Zooming on ColorGrid leads to corrupted display

Post by Sandra » Tue Jul 24, 2012 10:46 am

Hello Michael,

I can not reproduce your problem using next code and last version of TeeChartFor.Net:

Code: Select all

        public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            Steema.TeeChart.Styles.ColorGrid colorGrid1 = new Steema.TeeChart.Styles.ColorGrid(tChart1.Chart);

            Random rnd = new Random();
            colorGrid1.IrregularGrid = true;
            for (int i = 1; i < 100; i++)
            {
                for (int j = 0; j < 50; j++)
                {
                    colorGrid1.Add(i, rnd.NextDouble(), j);
                }
            }
      
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            (tChart1[0] as Steema.TeeChart.Styles.ColorGrid).CenteredPoints = checkBox1.Checked;
        }
Please check if it works for you. If it doesn't reproduce your problem, please can you send me a simple project, so we can reproduce your exactly problem here?

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

CourteousD
Newbie
Newbie
Posts: 12
Joined: Mon Feb 06, 2012 12:00 am

Re: Zooming on ColorGrid leads to corrupted display

Post by CourteousD » Wed Jul 25, 2012 1:09 am

Hi Sandra,

I don't see the exception when IrregularGrid is true. If you set IrregularGrid to false in your example, set CenteredPoints to true, then attempt a zoom, I expect you'll see the exception (and no zoom).

As mentioned in my first email yesterday, leaving IrregularGrid true fixes these problems but results in rather slow rendering of the chart, presumably due to the number of points. If there is a way of speeding that up perhaps I can use IrregularGrid as a workaround until the other issues are resolved.

Michael

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

Re: Zooming on ColorGrid leads to corrupted display

Post by Narcís » Thu Jul 26, 2012 9:50 am

Hi Michael,
I don't see the exception when IrregularGrid is true. If you set IrregularGrid to false in your example, set CenteredPoints to true, then attempt a zoom, I expect you'll see the exception (and no zoom).
Yes, I could reproduce the problem as per your instructions and added it (TF02016275) to the defect list to be fixed.
As mentioned in my first email yesterday, leaving IrregularGrid true fixes these problems but results in rather slow rendering of the chart, presumably due to the number of points. If there is a way of speeding that up perhaps I can use IrregularGrid as a workaround until the other issues are resolved.
Not many ideas here. You could try with Direct2D but I don't think it will help much as probably the bottleneck isn't a canvas thing but common series code for all environments.
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

CourteousD
Newbie
Newbie
Posts: 12
Joined: Mon Feb 06, 2012 12:00 am

Re: Zooming on ColorGrid leads to corrupted display

Post by CourteousD » Fri Jul 27, 2012 12:20 am

Thank you. Can you confirm that the issue that occurs when x=1 and z=0 is being put on the defect list also?

Michael

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

Re: Zooming on ColorGrid leads to corrupted display

Post by Narcís » Fri Jul 27, 2012 7:14 am

Hi Michael,

Yes, everything discussed here is on that ticket.
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