Hi,
I have several series (TLine) in a chart. After loading the data for series , I specify the series title to be displayed in the legend: Chart.LegendTitle:= 'Filename...';
With version TeeChartVCLFMX-2022.35 it worked without any problems, but after installing 2025.44, it stopped working. Has anything changed, or is this a bug in the new version?
By the way, I think there should be an additional 'lsTitle' entry in the Chart.Legend.LegendStyle property because if there's only one series, you can't set its legend to the title. This only works automatically with at least two series.
Best regards,
Krzysztof Jasek
Problems with Legend in version 2025.44
-
- Newbie
- Posts: 5
- Joined: Mon Oct 09, 2023 12:00 am
Re: Problems with Legend in version 2025.44
I see the same issue. This is a bug.
Re: Problems with Legend in version 2025.44
Hello,
When setting the Series title, default Legend behaviour is to use the Title.
eg.
If there is one series in the Chart, then using Legendstyle forces the series title to be dispplayed, not the value.
eg.
Legend Title refers to the title at the top of the Legend that occurs only once but that can be multiline.
eg.
Regards,
Marc Meumann
When setting the Series title, default Legend behaviour is to use the Title.
eg.
Code: Select all
series1.Title := 'series title1';
series2.Title := 'series title2';
eg.
Code: Select all
Chart1.Legend.LegendStyle := TLegendStyle.lsSeries;
eg.
Code: Select all
Chart1.Legend.Title.Text.Add('my Legend Title');
Marc Meumann
Steema Support
-
- Newbie
- Posts: 5
- Joined: Mon Oct 09, 2023 12:00 am
Re: Problems with Legend in version 2025.44
There is another bug: if I once hidе a legend using Chart.Legend.Visible:=false; then I show it again, GetLegendText is not called. In the previous version, it was always called after Chart.Legend.Visible:=true;
In the new version, I can no longer re-update the legend elements in the GetLegendText event.
In the new version, I can no longer re-update the legend elements in the GetLegendText event.
Re: Problems with Legend in version 2025.44
Hello,
I am not able to reproduce this issue using RAD Studio 12 Version 29.0.55362.2017 and TeeChart Pro v2025.44.
My test code:
Reactivating the Legend shows the extra text. If you are able to make test project that shows the problem available to us, we'll debug with that.
Regards,
Marc Meumann
I am not able to reproduce this issue using RAD Studio 12 Version 29.0.55362.2017 and TeeChart Pro v2025.44.
My test code:
Code: Select all
procedure TForm5.Button1Click(Sender: TObject);
begin
Chart1.Legend.Visible := not Chart1.Legend.Visible;
end;
procedure TForm5.Chart1GetLegendText(Sender: TCustomAxisPanel;
LegendStyle: TLegendStyle; Index: Integer; var LegendText: string);
begin
LegendText := LegendText + ' test';
end;
Regards,
Marc Meumann
Steema Support