Page 1 of 1

Axes.Depth.Title.Angle

Posted: Tue Sep 15, 2020 7:13 am
by 16586272
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;

Re: Axes.Depth.Title.Angle

Posted: Thu Sep 17, 2020 6:07 am
by yeray
Hello,

Take a look at the discussion and code here.

Re: Axes.Depth.Title.Angle

Posted: Thu Dec 10, 2020 7:58 am
by 16586272
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;

Re: Axes.Depth.Title.Angle

Posted: Fri Dec 11, 2020 9:00 am
by yeray
Hello,

That's a known issue already in the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1728

Re: Axes.Depth.Title.Angle

Posted: Fri Dec 11, 2020 6:58 pm
by 16586272
If I don't use GLCanvas, is there any other way to arrange Axes.Depth.Title along the axis?

Re: Axes.Depth.Title.Angle

Posted: Thu Dec 17, 2020 10:43 am
by yeray
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.