Two column legend

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
smcode
Newbie
Newbie
Posts: 1
Joined: Tue Jan 15, 2013 12:00 am

Two column legend

Post by smcode » Tue May 07, 2013 12:19 pm

Is there a way to make standard legend spit into two columns. I have chat with about 16 series, legend has checkbox and name for each series, but the height of the legend is greater than height of cxhart. Would like legend to divide into 8 rows of two columns. The extra-legend tool looks tricky for something simple lie this.
thanks
SM

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Two column legend

Post by Yeray » Thu May 09, 2013 10:47 am

Hello,

-You could use the Custom Legend Tool as in the example at "What's New ?\Welcome !\New Chart Tools\Custom Legend Tool" in the features demo program shipped with the installation.

- You could use two TChartListBox:

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.View3D:=false;

  ChartListBox1.ShowActiveCheck:=false;
  ChartListBox1.ShowSeriesIcon:=false;
  ChartListBox2.ShowActiveCheck:=false;
  ChartListBox2.ShowSeriesIcon:=false;

  for i:=0 to 15 do
  begin
    with Chart1.AddSeries(TFastLineSeries) do
    begin
      FillSampleValues;

      if i<8 then
        ChartListBox1.AddItem(SeriesTitleOrName(Chart1[i]), Chart1[i])
      else
        ChartListBox2.AddItem(SeriesTitleOrName(Chart1[i]), Chart1[i]);
    end;
  end;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply