Page 1 of 1
Dual Axis Labeling?
Posted: Fri Jun 12, 2015 12:11 pm
by 16573504
Hi.
Is it possible to use two sets of labels (e.g. to display two different units) for the same axis or achieve this by some other feature? I attached a picture to illustrate the desired effect.
Thanks!
Re: Dual Axis Labeling?
Posted: Fri Jun 12, 2015 1:13 pm
by narcis
Hello,
Yes, there are two options here:
1. Using the two default vertical axes like this:
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
for i:=0 to 2 do
begin
Chart1.AddSeries(TLineSeries.Create(Self));
Chart1[i].VertAxis:=aBothVertAxis;
for j:=0 to 100 do
Chart1[i].Add(random(100), 'point ' + IntToStr(j));
end;
Chart1.View3D:=False;
Chart1.Axes.Right.PositionPercent:=100;
Chart1.Axes.Bottom.LabelStyle:=talValue;
Chart1.Axes.Right.Increment:=10;
end;
2. Use SubAxes as explained in the
Whats' New? page. I also posted an example
here.
Re: Dual Axis Labeling?
Posted: Fri Jun 12, 2015 5:23 pm
by 16573504
That's exactly what I was looking for. Thank you!