TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
xsLiu
- Newbie
- Posts: 33
- Joined: Wed May 22, 2019 12:00 am
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 (54.25 KiB) Viewed 15513 times
-
Yeray
- Site Admin
- Posts: 9614
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Sep 17, 2020 6:07 am
Hello,
Take a look at the discussion and code
here.
-
xsLiu
- Newbie
- Posts: 33
- Joined: Wed May 22, 2019 12:00 am
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 (379.93 KiB) Viewed 14453 times
-
xsLiu
- Newbie
- Posts: 33
- Joined: Wed May 22, 2019 12:00 am
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
- Posts: 9614
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
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.