Hi,
Using ColorGrid, with the latest version of TeeChart .NET (4.1.2012.01310), the first time I display data I have no problems. If I clear the data and add new data with less than or equal to the same number of points, it displays fine. If I add more points than the original set, I get the ArgumentOutOfRangeException, and the chart will not display.
I've attached an example solution for replication. When executed, it will automatically display 200 rows of a test pattern. If you change the value to 201 and click the button, the exception will occur. This does not occur with at least one earlier version of the package (I think it was 4.1.2012.07130).
If there is a workaround/solution to this problem I would appreciate it, as I'd really like to take advantage of one of the fixes in this latest version.
Thanks,
Michael
ArgumentOutOfRangeException occurs using ColorGrid
-
- Newbie
- Posts: 4
- Joined: Tue Feb 12, 2013 12:00 am
ArgumentOutOfRangeException occurs using ColorGrid
- Attachments
-
- GraphTest2.zip
- (21.13 KiB) Downloaded 466 times
Re: ArgumentOutOfRangeException occurs using ColorGrid
Hello Michael,
I have realized that you haven't sent us the file cmap.xml. I have made the some tests using a custom palette created by me and I cannot reproduce the exception. Would be very helpful if you can send the cmap.xml because we can continue the tests and try to find for the problem appears.
Thanks,
I have realized that you haven't sent us the file cmap.xml. I have made the some tests using a custom palette created by me and I cannot reproduce the exception. Would be very helpful if you can send the cmap.xml because we can continue the tests and try to find for the problem appears.
Thanks,
Best Regards,
Sandra Pazos / 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 |
-
- Newbie
- Posts: 4
- Joined: Tue Feb 12, 2013 12:00 am
Re: ArgumentOutOfRangeException occurs using ColorGrid
Hi Sandra,
Oops, I had meant to send that. Though I wouldn't have thought that it were critical to reproducing the issue. It is now attached.
Regards,
Michael
Oops, I had meant to send that. Though I wouldn't have thought that it were critical to reproducing the issue. It is now attached.
Regards,
Michael
-
- Newbie
- Posts: 4
- Joined: Tue Feb 12, 2013 12:00 am
Re: ArgumentOutOfRangeException occurs using ColorGrid
Oops again. Apparently system doesn't accept xml files so I've zipped it.
- Attachments
-
- cmap.zip
- (833 Bytes) Downloaded 456 times
Re: ArgumentOutOfRangeException occurs using ColorGrid
Hello Michael,
Thanks for the file. Finally I can reproduce your problem and I have added it in bug list report with number[TF02016513]. We will try to fix it to upcoming version of TeeChartFor.Net. On the other hand, I recommend use TChart1.Series.Clear() as a workaround to solve your problem at the moment:
Could you tell us if previous code works in your end?
Thanks,
Thanks for the file. Finally I can reproduce your problem and I have added it in bug list report with number[TF02016513]. We will try to fix it to upcoming version of TeeChartFor.Net. On the other hand, I recommend use TChart1.Series.Clear() as a workaround to solve your problem at the moment:
Code: Select all
private void InitializeChart()
{
tChart1.Series.Clear();
colorGrid1 = new Steema.TeeChart.Styles.ColorGrid(tChart1.Chart);
colorGrid1.Pen.Visible = false;
colourPalette = new ColourPalette();
colourPalette.Load(@"C:\Users\Sandra\Downloads\GraphTest2\cmap.xml");
double maxrate = 255;
double minrate = 0;
if (maxrate != minrate)
{
colourScale = colourPalette.Colours.Count / (maxrate - minrate);
}
else
{
colourScale = 0;
}
// Configure ColorGrid's palette
colorGrid1.PaletteSteps = colourPalette.Colours.Count;
colorGrid1.ClearPalette();
for (int colouri = 0; colouri < colourPalette.Colours.Count; colouri++)
{
colorGrid1.AddPalette(minrate + colouri / colourScale,
colourPalette.Colours[colouri]);
}
colorGrid1.UseColorRange = false;
colorGrid1.UsePalette = true;
colorGrid1.Clear();
for (int i = 0; i < 1024; i++)
{
int j;
double val = (double)numericUpDown1.Value;
for (j = 0; j < val; j++)
{
colorGrid1.Add(i, (i * j) % 255, j);
}
}
}
Thanks,
Best Regards,
Sandra Pazos / 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 |
-
- Newbie
- Posts: 4
- Joined: Tue Feb 12, 2013 12:00 am
Re: ArgumentOutOfRangeException occurs using ColorGrid
Thanks Sandra,
The additional three lines do appear to workaround the problem. I look forward to the next release.
Michael
The additional three lines do appear to workaround the problem. I look forward to the next release.
Michael
Re: ArgumentOutOfRangeException occurs using ColorGrid
Hello Michael,
I inform you that your problem is already fixed for next maintenance release of TeeChartFor.Net.
Thanks,
I inform you that your problem is already fixed for next maintenance release of TeeChartFor.Net.
Thanks,
Best Regards,
Sandra Pazos / 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 |