Page 1 of 1
X Axis display K(kilo), M(Mega) ,G(Giga) T(Terra)
Posted: Tue Dec 20, 2005 1:47 am
by 9235196
How to write the BottomAxis->AxisValuesFormat so it can display:
ex: 1200 to 1.2K, 15000 to 15K, 2500000 to 2.5M, etc
Posted: Tue Dec 20, 2005 1:23 pm
by narcis
Hi Herman,
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;