How to display custom date/time label text.

For this example we'll use an imaginary translation routine to display the labels in a different language. This example assumes only the month name is required for the date/time labels.

procedure TForm1.RACGetDateTimeLabelText(Sender: TObject;
                                  DateTime: TDateTime;
                                  var DateText, TimeText: string);
  y, m, d: word;
  DecodeDate(DateTime, y, m, d);
  // use a translation routine to get the
  // month names in the required language
  DateText := Translate(ShortMonthNames[m], FLanguageCode);
  TimeText := ''; // not used for this example

Note: This event handler can be invoked many times a second while the user is dragging the chart or an allocation. It is important that it completes quickly in order to maintain a responsive user experience.

What People Say

I must say that you've done a really good job with the component!!!
Robert Karkulowski, Eye Soft
More …

No malware No spam
McAfee Site Report
Web of Trust