How to use TCanvas3D object to paint marks(point,line...) at any position
of Chart? For Example,I want to paint a line from P0(0,0) to P1(10,50).
TCanvas3D * cTest;
cTest = Chart1->Canvas;
.......
Regards
wwp3321
How to use TCanvas3D object to paint marks(point,line...)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi wwp3321,
This is much easier, you can do something like this in the OnAfterDraw event:
This is much easier, you can do something like this in the OnAfterDraw event:
Code: Select all
procedure TForm1.Chart1AfterDraw(Sender: TObject);
var X0, Y0, X1, Y1: Integer;
begin
X0:=Chart1.Axes.Bottom.CalcXPosValue(0);
Y0:=Chart1.Axes.Left.CalcYPosValue(0);
X1:=Chart1.Axes.Bottom.CalcXPosValue(10);
Y1:=Chart1.Axes.Left.CalcYPosValue(50);
Chart1.Canvas.Pen.Color:=clRed;
Chart1.Canvas.Pen.Width:=3;
Chart1.Canvas.Line(X0,Y0,X1,Y1);
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |