Set Max Rows/Series in Legend

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
CharlieH
Newbie
Newbie
Posts: 2
Joined: Mon Aug 13, 2007 12:00 am

Set Max Rows/Series in Legend

Post by CharlieH » Wed Dec 18, 2013 3:56 pm

I am trying to use TeeChart VCL (v8.06) with a legend scroll bar within Delphi 2010. I want to manually set the maximum number of rows to be visible in the legend and then be able to scroll amongst all series in the chart, but I can't see a way to do this. I tried setting the Legend Rectangle size using the OnGetLegendRect event but this only controls the legend box. The legend items seem to overflow the box.

Can you offer any advice?

Thanks!

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

Re: Set Max Rows/Series in Legend

Post by Yeray » Fri Dec 20, 2013 10:44 am

Hello,

There's the Legend's MaxNumRows property for that.
I see it didn't work fine with v8 but it works fine with the actual version.
MaxNumRows.png
MaxNumRows.png (5.02 KiB) Viewed 4107 times

Code: Select all

uses Series, TeeLegendScrollBar;

var Chart1: TChart;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1:=TChart.Create(Self);
  Chart1.Parent:=Self;

  Chart1.View3D:=false;

  for i:=1 to 50 do
    Chart1.AddSeries(TPointSeries);

  Chart1.Tools.Add(TLegendScrollBar);

  Chart1.Legend.MaxNumRows:=10;
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

CharlieH
Newbie
Newbie
Posts: 2
Joined: Mon Aug 13, 2007 12:00 am

Re: Set Max Rows/Series in Legend

Post by CharlieH » Fri Dec 20, 2013 2:18 pm

Thanks, but when you say "actual" version do you mean "some version after 8.06"?

Happy Holidays!

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

Re: Set Max Rows/Series in Legend

Post by Yeray » Fri Dec 20, 2013 2:51 pm

Hi,

Yes, I mean the latest, v2013.09.
Actually, I've also seen the property worked fine in v2010.00, the next release after v8.

Happy ones for you too! :)
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