The "group slice" color in legend is not same of the slice.
The "group slice" color in legend is not same of the slice.
The color of the "group slice" is not the same of slice:
I´m using Delphi XE7 and Teechart (sources) 2016.19.161025.
Does anyone know how to solve this problem?
I registered this issue in Steema's support (#1757).
See sample project and print screen.
I´m using Delphi XE7 and Teechart (sources) 2016.19.161025.
Does anyone know how to solve this problem?
I registered this issue in Steema's support (#1757).
See sample project and print screen.
- Attachments
-
- group.zip
- Sample project and print screen
- (116.24 KiB) Downloaded 751 times
Samuel (NatSam)
Re: The "group slice" color in legend is not same of the slice.
Hello,
Reviewing this I found it looks related to #1749 you reported here.
I believe I found a fix for both issues at the same time. It consists on adding an override of CalcLegendIndex for the TPieSeries.
Reviewing this I found it looks related to #1749 you reported here.
I believe I found a fix for both issues at the same time. It consists on adding an override of CalcLegendIndex for the TPieSeries.
Code: Select all
protected
//...
Function CalcLegendIndex(LegendIndex:Integer):Integer; override;
//...
Function TPieSeries.CalcLegendIndex(LegendIndex:Integer):Integer;
begin
result:=LegendToValueIndex(LegendIndex);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: The "group slice" color in legend is not same of the slice.
Hi,
These are two different issues.
The #1749 is about the legend text is incorrect for slices of pie:
The above problem has been resolved by modifying the CalcLegendIndex() code.
The issue #1757 is about the color of "other" in legend is not the same of "Other" pie slice:
These are two different issues.
The #1749 is about the legend text is incorrect for slices of pie:
The above problem has been resolved by modifying the CalcLegendIndex() code.
The issue #1757 is about the color of "other" in legend is not the same of "Other" pie slice:
Samuel (NatSam)
Re: The "group slice" color in legend is not same of the slice.
Hello,
Yes, #1749 and #1757 are different problems but they are related. Let me try to put some order here.
- "Other" item in legend not appearing. This is reported at #1749.
Both Marc's proposal and mine solve this issue.
- "Other" symbol item in legend drawn using a wrong color. This is reported at #1757.
Only my fix proposal solves this.
- Some items not present in the legend (you indicated as "Not in legend" in the screenshot above), and some items incorrectly present. This isn't reported in any ticket, but it's highly related to #1749.
Both Marc's proposal and mine solve the issue.
- Some marks not drawn (as you indicated as "Where is the label" in the screenshot above). This isn't reported in any ticket, and none of the suggestions is fixing this.
I've created a new ticket for this: #1760.
Yes, #1749 and #1757 are different problems but they are related. Let me try to put some order here.
- "Other" item in legend not appearing. This is reported at #1749.
Both Marc's proposal and mine solve this issue.
- "Other" symbol item in legend drawn using a wrong color. This is reported at #1757.
Only my fix proposal solves this.
- Some items not present in the legend (you indicated as "Not in legend" in the screenshot above), and some items incorrectly present. This isn't reported in any ticket, but it's highly related to #1749.
Both Marc's proposal and mine solve the issue.
- Some marks not drawn (as you indicated as "Where is the label" in the screenshot above). This isn't reported in any ticket, and none of the suggestions is fixing this.
I've created a new ticket for this: #1760.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: The "group slice" color in legend is not same of the slice.
Hello,
I did some more testing and found something that might help solve this issue.
If I set the Y values in descending order, only the caption "Other" appears in the wrong color. If I do not order Y values (default), all captions in legend appears in the wrong color.
I did some more testing and found something that might help solve this issue.
If I set the Y values in descending order, only the caption "Other" appears in the wrong color. If I do not order Y values (default), all captions in legend appears in the wrong color.
- Attachments
-
- group_2.zip
- Sample project
- (88.56 KiB) Downloaded 805 times
Samuel (NatSam)
Re: The "group slice" color in legend is not same of the slice.
Hello,
Are you using my fix proposal? This is how it looks for me with it:
Are you using my fix proposal? This is how it looks for me with it:
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: The "group slice" color in legend is not same of the slice.
Hi,
Yes, I had used your fix proposal for correction but the problem persisted.
Now I removed the Teechart from Delphi and did a new installation and this time the caption was mounted correctly .
With the two modifications suggested, the TeeChart appears to be working properly.
The modifications I made were:
In the VCLTee.Teeengine.pas:
Change line 3577 from "ValueIndex:=CalcLegendIndex(LegendIndex);" to "ValueIndex:=LegendToValueIndex(LegendIndex);"
In the VCLTee.TeeSerires.pas:
Add in the line 1333: Function CalcLegendIndex(LegendIndex:Integer):Integer; override;
Add after line 10481:
Function TPieSeries.CalcLegendIndex(LegendIndex:Integer):Integer;
begin
result:=LegendToValueIndex(LegendIndex);
end;
Thank you very much
Yes, I had used your fix proposal for correction but the problem persisted.
Now I removed the Teechart from Delphi and did a new installation and this time the caption was mounted correctly .
With the two modifications suggested, the TeeChart appears to be working properly.
The modifications I made were:
In the VCLTee.Teeengine.pas:
Change line 3577 from "ValueIndex:=CalcLegendIndex(LegendIndex);" to "ValueIndex:=LegendToValueIndex(LegendIndex);"
In the VCLTee.TeeSerires.pas:
Add in the line 1333: Function CalcLegendIndex(LegendIndex:Integer):Integer; override;
Add after line 10481:
Function TPieSeries.CalcLegendIndex(LegendIndex:Integer):Integer;
begin
result:=LegendToValueIndex(LegendIndex);
end;
Thank you very much
Samuel (NatSam)
Re: The "group slice" color in legend is not same of the slice.
Hello,
I'm glad to hear it works fine now!NatSam wrote: Now I removed the Teechart from Delphi and did a new installation and this time the caption was mounted correctly .
It works fine without this modification for me if I add the one in Series.pas. Could you please confirm it so we can put the correct fix in the production version?NatSam wrote:In the VCLTee.Teeengine.pas:
Change line 3577 from "ValueIndex:=CalcLegendIndex(LegendIndex);" to "ValueIndex:=LegendToValueIndex(LegendIndex);"
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: The "group slice" color in legend is not same of the slice.
Hello,
I did reinstall Teechart and applied only the patch in the Series.pas and it was enough to solve the problem.
To be "perfect" you only have to solve the #1760 issue .
Thank you.
I did reinstall Teechart and applied only the patch in the Series.pas and it was enough to solve the problem.
To be "perfect" you only have to solve the #1760 issue .
Thank you.
Samuel (NatSam)
Re: The "group slice" color in legend is not same of the slice.
Hello,
Good! Thanks for the feedback.NatSam wrote:I did reinstall Teechart and applied only the patch in the Series.pas and it was enough to solve the problem.
Right. Feel free to add your mail to the CC list if the ticket to be automatically notified when an update arrives.NatSam wrote:To be "perfect" you only have to solve the #1760 issue .
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |