Dual Axis Labeling?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ix07
Newbie
Newbie
Posts: 11
Joined: Wed Apr 15, 2015 12:00 am

Dual Axis Labeling?

Post by ix07 » Fri Jun 12, 2015 12:11 pm

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!
Attachments
d2.jpg
d2.jpg (133.13 KiB) Viewed 5419 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Dual Axis Labeling?

Post by Narcís » Fri Jun 12, 2015 1:13 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

ix07
Newbie
Newbie
Posts: 11
Joined: Wed Apr 15, 2015 12:00 am

Re: Dual Axis Labeling?

Post by ix07 » Fri Jun 12, 2015 5:23 pm

That's exactly what I was looking for. Thank you!

Post Reply