Page 1 of 1

More than one label per record??

Posted: Thu Mar 02, 2006 6:18 am
by 9336114
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.

Posted: Thu Mar 02, 2006 9:14 am
by narcis
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.