TChart 2016.18.160504
In the attached demo, a bitmap created from a TChart is copied to a TImage. The problem is the legend' symbol for each series is not square. They are too long.
Remove this line:
lChart.Legend.VertSpacing := 40;
and it works fine--except the vertical spacing is too tight.
Is this fixed in the latest version? (The latest version breaks our existing code so it is not easy to test).
Thank you,
Ed Dressel
Setting Legend.VertSpacing causes wider Symbol
-
- Newbie
- Posts: 16
- Joined: Mon Dec 05, 2016 12:00 am
Setting Legend.VertSpacing causes wider Symbol
- Attachments
-
- Square Symbols for Legend.zip
- (3.56 KiB) Downloaded 772 times
Re: Setting Legend.VertSpacing causes wider Symbol
Hello,
I could reproduce the problem you reported with the latest version, v2017.22 so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1908
I've also fixed it, so the ticket is already closed (the next maintenance release will include the fix).
Since you own the sources, you can apply the fix to your copy of the sources and recompile. The fix consists on modifying the TLegendSymbol.CalcWidth at Chart.pas to this:
I could reproduce the problem you reported with the latest version, v2017.22 so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1908
I've also fixed it, so the ticket is already closed (the next maintenance release will include the fix).
Since you own the sources, you can apply the fix to your copy of the sources and recompile. The fix consists on modifying the TLegendSymbol.CalcWidth at Chart.pas to this:
Code: Select all
Function TLegendSymbol.CalcWidth(Value:Integer):Integer;
begin
if Visible then
if Squared then
begin
result:=CalcHeight;
if Assigned(Parent) and (Parent is TCustomChart) then
result:=result - TCustomChart(Parent).Legend.VertSpacing;
end
else
if FWidthUnits=lcsPercent then result:=Round(Width*Value*0.01)
else result:=Width
else
result:=0;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |