Page 1 of 1

Axis labels inside chart rectangle

Posted: Wed Apr 18, 2018 7:23 pm
by 16582633
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.

Re: Axis labels inside chart rectangle

Posted: Thu Apr 19, 2018 8:04 am
by yeray
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 8070 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;

Re: Axis labels inside chart rectangle

Posted: Sat Apr 21, 2018 1:56 pm
by 16582633
Works "like a treat"!! Thanks.