Axes.Depth.Title.Angle

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
xsLiu
Newbie
Newbie
Posts: 33
Joined: Wed May 22, 2019 12:00 am

Axes.Depth.Title.Angle

Post by xsLiu » Tue Sep 15, 2020 7:13 am

In a 3D Chart, I want that Axes.Depth.Title is arranged along the axis (See the red line with an arrow in the attached figure). Although the following codes were used, it still does not work. How to solve this problem?

Code: Select all

procedure TfrmUPlot3D.TheChartBeforeDrawSeries(Sender: TObject);
var
  aStart, aEnd: TPoint;
  aStart2D, aEnd2D: TPoint3D;
  aAngle: Double;
begin
  with TheChart do
    begin
      aStart2D.X := Axes.Depth.PosAxis;
      aStart2D.Y := ChartRect.Bottom;
      aStart2D.z := Axes.Depth.IStartPos;
      aStart := Canvas.Calculate3DPosition(aStart2D);

      aEnd2D.X := Axes.Depth.PosAxis;
      aEnd2D.Y := ChartRect.Bottom;
      aEnd2D.z := Axes.Depth.IEndPos;
      aEnd := Canvas.Calculate3DPosition(aEnd2D);

      aAngle := ArcTan2(aEnd.Y - aStart.Y, aEnd.X - aStart.X);
      Axes.Depth.Title.Angle := 360 - Round(aAngle / TeePiStep);
    end;
end;
Attachments
Fig2.jpg
Fig2.jpg (54.25 KiB) Viewed 15490 times

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

Re: Axes.Depth.Title.Angle

Post by Yeray » Thu Sep 17, 2020 6:07 am

Hello,

Take a look at the discussion and code here.
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

xsLiu
Newbie
Newbie
Posts: 33
Joined: Wed May 22, 2019 12:00 am

Re: Axes.Depth.Title.Angle

Post by xsLiu » Thu Dec 10, 2020 7:58 am

Chinese characters are displayed on the GLCanvas in messy codes. Please find the attached file, and see Chart.Title, Chart.Legend, Axes.Title.
Any suggestions? Would you like to give me an example? Thanks a lot!

Code: Select all

  Chart1.Canvas := TGLCanvas.Create;
Attachments
FigX.jpg
FigX.jpg (379.93 KiB) Viewed 14430 times

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

Re: Axes.Depth.Title.Angle

Post by Yeray » Fri Dec 11, 2020 9:00 am

Hello,

That's a known issue already in the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1728
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

xsLiu
Newbie
Newbie
Posts: 33
Joined: Wed May 22, 2019 12:00 am

Re: Axes.Depth.Title.Angle

Post by xsLiu » Fri Dec 11, 2020 6:58 pm

If I don't use GLCanvas, is there any other way to arrange Axes.Depth.Title along the axis?

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

Re: Axes.Depth.Title.Angle

Post by Yeray » Thu Dec 17, 2020 10:43 am

Hello,
xsLiu wrote:
Fri Dec 11, 2020 6:58 pm
If I don't use GLCanvas, is there any other way to arrange Axes.Depth.Title along the axis?
This is precisely one of the points to consider in #2272.
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

Post Reply