Hi,
we encountered the following problem with Teechart 7.03:
The size of the chart legend box is set via the length of a series title and not via the legend title itself. Is it a known issue and how can we work around it?
Best regards
Arnd
Legend title exceeds legend box
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Arnd,
Yes, this is as-designed. If you don't want the legend to behave like that you can use any of the following solutions:
Yes, this is as-designed. If you don't want the legend to behave like that you can use any of the following solutions:
Code: Select all
procedure TForm1.Chart1GetLegendText(Sender: TCustomAxisPanel;
LegendStyle: TLegendStyle; Index: Integer; var LegendText: String);
begin
if Length(LegendText)>20 then
LegendText:='Series'+IntToStr(Index+1);
end;
Code: Select all
procedure TForm1.Chart1GetLegendRect(Sender: TCustomChart;
var Rect: TRect);
begin
Rect.Right:=Rect.Right-20;
end;
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 |