Page 1 of 1

Two column legend

Posted: Tue May 07, 2013 12:19 pm
by 16564696
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

Re: Two column legend

Posted: Thu May 09, 2013 10:47 am
by yeray
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;