Page 1 of 1

How to show legend of another series

Posted: Tue Apr 04, 2006 1:34 am
by 9234539
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

Posted: Tue Apr 04, 2006 8:17 am
by narcis
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;