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 just wanted to let you know that I love your component! I find it extensible, easy to use, and the performance is top notch. I even think I understand much of the source. You hit a home run with this one!
Tom Kopeika, Illinois
More …

No malware No spam
McAfee Site Report
Web of Trust