Delphi-Quellcode:
procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
var tmpTime:TTime;
h,m,s,ms:Word;
begin
If Sender=Chart1.BottomAxis then // If labels from bottom axis
begin
tmpTime:=StrToFloat(LabelText); //First create TTime
DecodeTime(tmpTime,h,m,s,ms);
LabelText:=IntToStr(s)+':'+IntToStr(ms); // Rewrite label
end;
end;
Ein Webbeispiel, welches die Verwendung des Events OnGetAxisLabel zeigt.