More than one label per record??

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
rick1000
Newbie
Newbie
Posts: 3
Joined: Mon Mar 08, 2004 5:00 am

More than one label per record??

Post by rick1000 » Thu Mar 02, 2006 6:18 am

My data consists of records with a date, a scheduled count and a total count. I'm using dates to label the bottom axis and then two series to show the schedued and total available for each date.

The problem is that, there is only one record per date in my data, the date is repeated several times as labels for the x axis.

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

Post by Narcís » Thu Mar 02, 2006 9:14 am

Hi rick1000,

You can customize the labels text using the GetAxisLabel event checking which axis and series is processed doing something like this:

Code: Select all

procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
  Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
  if (Sender=Chart1.Axes.Bottom and Series=Chart1[0]) then
  begin
    LabelText:='....'+IntToStr(ValueIndex);
  end;
end;
You can also customize series marks using GetMarkText event.
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