Page 1 of 1

Axis Labels Behind Shape Series?

Posted: Wed Jun 01, 2022 8:55 pm
by 16493447
Is there a way to have the labels of an axis show up centered behind (or in front) of the data?
Thanks,
John

Re: Axis Labels Behind Shape Series?

Posted: Thu Jun 09, 2022 5:13 am
by yeray
Hello John,

I'm not sure to understand the situation. The shape series is clipped by default in the chartrect so the axes labels are always shown in a simple example for me here:
Project1_2022-06-09_07-13-12.png
Project1_2022-06-09_07-13-12.png (8.33 KiB) Viewed 15968 times

Re: Axis Labels Behind Shape Series?

Posted: Tue Jul 12, 2022 12:38 pm
by 16493447
Hello, thanks for the reply. Yeah, that was a little unclear. What I would like to do is have labels in the chart, not just on the outside axis. For example, running down or across the middle of the chart.

Thank you.

Re: Axis Labels Behind Shape Series?

Posted: Tue Jul 19, 2022 8:19 am
by yeray
Hello,

You may be interested on the axes PositionPercent, PositionUnits and the Chart's AxisBehind properties.
Ie:

Code: Select all

uses TeeShape;

procedure TForm1.FormCreate(Sender: TObject);
begin
  with Chart1 do
  begin
    View3D:=False;
    Legend.Hide;
    Gradient.Visible:=False;
    Color:=clWhite;
    Walls.Back.Gradient.Visible:=False;
    Walls.Back.Color:=clWhite;

    with Chart1.AddSeries(TChartShape) do
    begin
      FillSampleValues;
      Color:=OperaPalette[0];
    end;

    Chart1.AxisBehind:=False;
    Chart1.Axes.Bottom.PositionUnits:=muPercent; //muPixels,muPixels;
    Chart1.Axes.Left.PositionUnits:=muPercent; //muPixels,muPixels;
    Chart1.Axes.Bottom.PositionPercent:=50;
    Chart1.Axes.Left.PositionPercent:=50;    

    Chart1.Axes.Bottom.Grid.Hide;
    Chart1.Axes.Left.Grid.Hide;
  end;
end;
Project1_2022-07-19_10-15-03.png
Project1_2022-07-19_10-15-03.png (18.29 KiB) Viewed 15675 times

Re: Axis Labels Behind Shape Series?

Posted: Wed Nov 02, 2022 5:36 pm
by 16493447
Perfect, thank you!