How to show legend of another series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Fang
Newbie
Newbie
Posts: 66
Joined: Wed Oct 13, 2004 4:00 am

How to show legend of another series

Post by Fang » Tue Apr 04, 2006 1:34 am

hi,
I have two 3D series, one colorgrid, one contour; the legend trys to connect to whatever appears first on the chart if I set legend style to series value. But is there a way I can swtich the legend to the series I want ?

Thanks.
Fang

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Apr 04, 2006 8:17 am

Hi Fang,

This is not possible for now. The legend only displays the first series values. However, your request is already on our wish-list to be considered for future releases. In the meantime, the solution is using ExchangeSeries to place the series to the first position:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
for i:=0 to Chart1.SeriesCount-1 do
begin
Chart1[i].FillSampleValues();
if i=Chart1.SeriesCount-1 then
Chart1[i].ShowInLegend:=true
else
Chart1[i].ShowInLegend:=false
end;

Chart1.Legend.Visible:=true;
Chart1.Legend.LegendStyle:=lsValues;
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
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply