Axis labels inside chart rectangle

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Softdrill NL
Newbie
Newbie
Posts: 12
Joined: Thu Dec 28, 2017 12:00 am

Axis labels inside chart rectangle

Post by Softdrill NL » Wed Apr 18, 2018 7:23 pm

Is there any way in which I can get the axis labels inside the chart rectangle? For example, for the left axis, I like to draw the labels to the right of the axis.
The reason for this is that I wish to develop some graphic components into which I wish to copy the chart rectangle from on off-screen chart.

Thanks in advance for any tips that may help to achive this.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Axis labels inside chart rectangle

Post by Yeray » Thu Apr 19, 2018 8:04 am

Hello,

Assigning the series to use right axis and setting a PostionPercent of 100 does the trick.
Here a simple example with a few more tweaks to make it look ok.
Project3_2018-04-19_10-04-10.png
Project3_2018-04-19_10-04-10.png (10.49 KiB) Viewed 8420 times

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=False;
  Chart1.Legend.Hide;

  with Chart1.AddSeries(TBarSeries) do
  begin
    ColorEachPoint:=True;
    FillSampleValues;
    VertAxis:=aRightAxis;
  end;

  Chart1.Axes.Right.PositionPercent:=100;
  Chart1.Axes.Right.LabelsOnAxis:=False;
  Chart1.Axes.Bottom.MinimumOffset:=20;

  Chart1.Axes.Right.Grid.Hide;
  Chart1.Axes.Bottom.Grid.Hide;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Softdrill NL
Newbie
Newbie
Posts: 12
Joined: Thu Dec 28, 2017 12:00 am

Re: Axis labels inside chart rectangle

Post by Softdrill NL » Sat Apr 21, 2018 1:56 pm

Works "like a treat"!! Thanks.

Post Reply