Axis Labels Behind Shape Series?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
JNuzzi
Newbie
Newbie
Posts: 17
Joined: Mon Mar 21, 2022 12:00 am

Axis Labels Behind Shape Series?

Post by JNuzzi » Wed Jun 01, 2022 8:55 pm

Is there a way to have the labels of an axis show up centered behind (or in front) of the data?
Thanks,
John

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

Re: Axis Labels Behind Shape Series?

Post by Yeray » Thu Jun 09, 2022 5:13 am

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 16962 times
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

JNuzzi
Newbie
Newbie
Posts: 17
Joined: Mon Mar 21, 2022 12:00 am

Re: Axis Labels Behind Shape Series?

Post by JNuzzi » Tue Jul 12, 2022 12:38 pm

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.

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

Re: Axis Labels Behind Shape Series?

Post by Yeray » Tue Jul 19, 2022 8:19 am

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 16669 times
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

JNuzzi
Newbie
Newbie
Posts: 17
Joined: Mon Mar 21, 2022 12:00 am

Re: Axis Labels Behind Shape Series?

Post by JNuzzi » Wed Nov 02, 2022 5:36 pm

Perfect, thank you!

Post Reply