TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
Metman
- Advanced
- Posts: 113
- Joined: Fri Dec 21, 2007 12:00 am
Post
by Metman » Fri Feb 02, 2018 12:17 pm
Hi
I've searched your archives but find no reference to the TArrowTool.
I have placed a number of arrow tools in a chart like this:-
- 2018-02-02_120718.png (40.22 KiB) Viewed 7032 times
On resizing the chart I want the arrows to remain right-aligned and I though that this code would do it but it causes an exception.
Code: Select all
procedure TfmCorrelationGraph.ChartAfterDraw(Sender: TObject);
var
pt1 : TPointXY;
pt2 : TPointXY;
begin
pt1.X:=Chart.Width-120;
pt1.Y:=16;
pt2.X:=Chart.Width-80;
pt2.Y:=16;
ChartTool8.FromPoint:=pt1;
ChartTool8.ToPoint:=pt2;
end;
Is it possible?
Bruce.
-
Yeray
- Site Admin
- Posts: 9612
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Tue Feb 06, 2018 9:11 am
Hello Bruce,
You can use just this:
Code: Select all
procedure TfmCorrelationGraph.ChartAfterDraw(Sender: TObject);
begin
ChartTool8.FromPoint.Point:=Point(Chart1.Width-120, 16);
ChartTool8.ToPoint.Point:=Point(Chart1.Width-80, 16);
end;