Hi,
TChart 6.01
I want to have arrows on the end of the axis.
It is possible ? How to do it ?
Kind regards,
Bernard
PS : In French
Comment faire pour avoir des flèches sur l'extrémité des axes ?
Merci beaucoup
Bernard
Arrows on Axis
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bernard,
It's pretty easy, you just need to use AxisArrows tool. You'll find an example of that at TeeChart features demo, available at TeeChart program group. The example is "All Features -> Welcome! -> Tools -> Axis arrows".
It's pretty easy, you just need to use AxisArrows tool. You'll find an example of that at TeeChart features demo, available at TeeChart program group. The example is "All Features -> Welcome! -> Tools -> Axis arrows".
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 |
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Contact:
Hi,
Thanks for your answer
I have arrows at the end of each axis.
I want to have it visible but not Active (a click on the arrow don't move the points)
Kind regards,
Bernard
In French :
Merci pour la réponse.
J'ai réussi (depuis longtemps) à avoir les flèches au bout des axes.
Je veux voir ces flèches et empêcher qu'un clic sur la flèche ne déplace les points.
Merci
Bernard
Thanks for your answer
I have arrows at the end of each axis.
I want to have it visible but not Active (a click on the arrow don't move the points)
Kind regards,
Bernard
In French :
Merci pour la réponse.
J'ai réussi (depuis longtemps) à avoir les flèches au bout des axes.
Je veux voir ces flèches et empêcher qu'un clic sur la flèche ne déplace les points.
Merci
Bernard
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bernard,
I'm afraid there is some kind of incompatibility when setting tool not being active but visible. Could you please be more specific on a case where would you need that approach to see if we can help you finding a solution?
I'm afraid there is some kind of incompatibility when setting tool not being active but visible. Could you please be more specific on a case where would you need that approach to see if we can help you finding a solution?
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 |
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bernard,
Then you'd better custom draw the arrows on TChart's canvas doing something like the code below in the OnAfterDraw event:
Then you'd better custom draw the arrows on TChart's canvas doing something like the code below in the OnAfterDraw event:
Code: Select all
procedure TForm1.Chart1AfterDraw(Sender: TObject);
var
LU0,LU1,LD0,LD1,BL0,BL1,BR0,BR1: TPoint;
ArrowLength, ArrowWidth, ArrowHeight, Z: Integer;
FillArrows: Boolean;
begin
FillArrows:=true;
ArrowLength:=20;
ArrowWidth:=10;
ArrowHeight:=10;
Z:=0;
With Chart1.Axes do
begin
//Left Axis UP Arrow
LU0.X:=Left.PosAxis;
LU0.Y:=Left.IStartPos+ArrowLength;
LU1.X:=Left.PosAxis;
LU1.Y:=Left.IStartPos;
//Left Axis Down Arrow
LD0.X:=Left.PosAxis;
LD0.Y:=Left.IEndPos-ArrowLength;
LD1.X:=Left.PosAxis;
LD1.Y:=Left.IEndPos;
//Bottom Axis Left Arrow
BL0.X:=Bottom.IStartPos+ArrowLength;
BL0.Y:=Bottom.PosAxis;
BL1.X:=Bottom.IStartPos;
BL1.Y:=Bottom.PosAxis;
//Bottom Axis Right Arrow
BR0.X:=Bottom.IEndPos-ArrowLength;
BR0.Y:=Bottom.PosAxis;
BR1.X:=Bottom.IEndPos;
BR1.Y:=Bottom.PosAxis;
end;
With Chart1.Canvas do
begin
//Arrow(Filled: Boolean; Const FromPoint, ToPoint: TPoint; ArrowWidth, ArrowHeight, Z: Integer);
Arrow(FillArrows, LU0, LU1, ArrowWidth, ArrowHeight, Z);
Arrow(FillArrows, LD0, LD1, ArrowWidth, ArrowHeight, Z);
Brush.Color:=clBlack;
Arrow(FillArrows, BL0, BL1, ArrowWidth, ArrowHeight, Z);
Arrow(FillArrows, BR0, BR1, ArrowWidth, ArrowHeight, Z);
end;
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 |
-
- Newbie
- Posts: 6
- Joined: Fri Nov 15, 2002 12:00 am
- Contact: