How to write the BottomAxis->AxisValuesFormat so it can display:
ex: 1200 to 1.2K, 15000 to 15K, 2500000 to 2.5M, etc
X Axis display K(kilo), M(Mega) ,G(Giga) T(Terra)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Herman,
You need to do it manually in TChart's GetAxisLabel event. A similar example would be:
You need to do it manually in TChart's GetAxisLabel event. A similar example would be:
Code: Select all
procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
var tmp : Double;
begin
if Sender = Char1.Axes.Bottom then
begin
tmp := StrToFloat(LabelText);
tmp := 1.0 - 1.0/(Exp(Exp(tmp)));
LabelText:=FormatFloat(Chart.LeftAxis.AxisValuesFormat,tmp);
end;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |