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

This is a great component. I've been using it for a year. It's well written, performance is top notch, and the couple of time I've asked for support, I've gotten it right away from the author.
Steve McForest
More …

No malware No spam
McAfee Site Report
Web of Trust