Hideo_Aoki
(hide aoki)
February 15, 2016, 1:37am
1
hello,
In the following code , the ValueFormat of the Y -axis will change from The Befere to The After.
[Code]
Series[0].ValueFormat := '%.1f m';
[Before]
0.5 0.4 0.3 0.2 0.1 0
[After]
0.5 m 0.4 m 0.3 m 0.2 m 0.1 m 0.0 m
by the way,I want to change the ValueFormat of the X -axis , too.
For example... 0 m 1 m 2 m 3 m 4 m 5 m
How to do ?
Kind Regards,
Pieter
(Pieter)
February 15, 2016, 1:51pm
2
Hi,
When adding points, you can use one of the overloads that accepts an XAxisValue string parameter. This way, the points that are added will assign a new string to the X-Axis point. When you want to format all the points, regardless of a series, you can use the following code:
procedure TForm19.FormCreate(Sender: TObject);
begin
AdvGDIPChartView1.Panes[0].Series[0].OnXAxisGetValue := XAxisGetVal;
end;
procedure TForm1.XAxisGetVal(Sender: TObject; Serie: TChartSerie;
Value: double; var AValue: string);
begin
AValue := Format('%.1f m', [value]);
end;
Kind Regards,
Pieter
Hideo_Aoki
(hide aoki)
February 16, 2016, 1:13am
3
Hi Pieter,
Thank you for your explanation.
I was able to understand the content.
Kind Regards