I have a tcolorgrid and have custom palette with-
series1.PaletteSteps:=6;
series1.ClearPalette();
datarange:=series1.YValues.Maxvalue-series1.YValues.Minvalue;
minval:=series1.YValues.Minvalue;
series1.AddPalette(minVal+(dataRange*0.1),Clnavy);
series1.AddPalette(minVal+(dataRange*0.2),Clblue);
series1.AddPalette(minVal+(dataRange*0.3),Claqua);
series1.AddPalette(minVal+(dataRange*0.4),Clyellow);
series1.AddPalette(minVal+(dataRange*0.5),Cllime);
series1.AddPalette(minVal+(dataRange*0.7),Clred);
series1.UseColorRange:=false;
series1.UsePalette:=true;
Chart1.Refresh();
The colours on the chart draw correcly, but the legend shows the colors incorrectly, it misses off clnacy and shows clred twice. Putting
legendtext:=inttostr(index);
into the ongetlegendtext event shows that index[0] is clred, index[1] is clred ... index[5] is clblue. What I expected was [0]=clnavy .. [5]=clred.
Is there an indexing bug in the addpalette somewhere, with palette colors being 1..6 and legend being 0..5 or something like that?
cheers
Sean.
Custom Palette
Hi.
Which Teechart version are you using ? Using v7.01 (but I think you'll get the same results with 7.00) I get correct results (6 entires in the legend, correct colors). Here is the code:
Which Teechart version are you using ? Using v7.01 (but I think you'll get the same results with 7.00) I get correct results (6 entires in the legend, correct colors). Here is the code:
Code: Select all
Series1.FillSampleValues(10);
series1.UseColorRange:=false;
series1.UsePalette:=true;
series1.PaletteSteps:=6;
series1.ClearPalette();
datarange:=series1.YValues.Maxvalue-series1.YValues.Minvalue;
minval:=series1.YValues.Minvalue;
series1.AddPalette(minVal+(dataRange*0.1),Clnavy);
series1.AddPalette(minVal+(dataRange*0.2),Clblue);
series1.AddPalette(minVal+(dataRange*0.3),Claqua);
series1.AddPalette(minVal+(dataRange*0.4),Clyellow);
series1.AddPalette(minVal+(dataRange*0.5),Cllime);
series1.AddPalette(minVal+(dataRange*0.7),Clred);
Chart1.Refresh();
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Hi, Sean.
Yes, I, think v6.01 had some problems with palette list. Bu tI think we fixed in for v.7.0 release. Just to be sure, please send me small sample application (sources only) which I can run here using TeeChart v7.0. I'll send you back the compiled version (exe) and if it works, you could consider upgrading to TeeChart v7. You can send the sample applicaton to "marjan at steema dot com" email address.
Yes, I, think v6.01 had some problems with palette list. Bu tI think we fixed in for v.7.0 release. Just to be sure, please send me small sample application (sources only) which I can run here using TeeChart v7.0. I'll send you back the compiled version (exe) and if it works, you could consider upgrading to TeeChart v7. You can send the sample applicaton to "marjan at steema dot com" email address.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Hi,
I am not sure whether the reported legend palette problem has been resolved in the latest version.
I have the TeeChart Pro V8.02 but it has a similar problem when using the Legend Palette tool. If you define 5 custom palettes for a TColorGridSeries data and then add a Legend Palette tool using TChart editor in the design time, the Legend palette only displays the 3rd, 4th and 5th color palettes. It does not display the 1st and 2nd custom palettes and also shows the 5th color palette twice.
Cheers
Xia
I am not sure whether the reported legend palette problem has been resolved in the latest version.
I have the TeeChart Pro V8.02 but it has a similar problem when using the Legend Palette tool. If you define 5 custom palettes for a TColorGridSeries data and then add a Legend Palette tool using TChart editor in the design time, the Legend palette only displays the 3rd, 4th and 5th color palettes. It does not display the 1st and 2nd custom palettes and also shows the 5th color palette twice.
Cheers
Xia
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Xia,
I've tried this with v8.05, which was published last Monday, and I could reproduce the issue here. I've added it (TV52014190) to the bug list to be fixed for future releases.
I've tried this with v8.05, which was published last Monday, and I could reproduce the issue here. I've added it (TV52014190) to the bug list to be fixed for future releases.
Best Regards,
Narcís Calvet / 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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Dear Xia,
The only workaround I can think of is something like this:
Hope this helps!
The only workaround I can think of is something like this:
Code: Select all
ChartTool1.Chart.Axes.Left.MinimumOffset:=30;
ChartTool1.Chart.Axes.Right.MinimumOffset:=30;
Best Regards,
Narcís Calvet / 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 |