How to draw an arrow on top of a point

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

How to draw an arrow on top of a point

Post by Mariano » Mon Jun 30, 2008 11:53 am

Hi,

I need to draw some small vertical arrow (with a text on top) on top of a candle. The purpose is to add some extra info for a candle. The arrow should “stay” with the candle when the user zooms/scrolls. Also the arrow can be on top or on the bottom of the candle.

The find x,y / draw text part are ok. (I use TAnnotationTool / CalcXPos-Value & OnZoom)

But I don’t know how to draw an arrow.

Since the drawLineTool cannot draw arrow head,
I was thinking about making a child of TDrawLinesTool & TDrawLine to add info about the arrow style (mainly the anchor and the color) and rewrite the paint method. But it seems very complicated and long for something so basic.


Did I miss the magic tool that draws arrows?
Do you know a more simple way?
Do you have a tool "Follow-this-point/position-with-custom-draw" ?


thanks in advance for you help,


PS:
I use the .label to store the candle date.

Context:
winXP SP2,
TeeChart win 7.05 (with source)
Delphi Architect 9.0

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Jun 30, 2008 1:22 pm

Hi Mariano,

You can achieve what you request using Annotation tool's callout and arrow as shown in the example at All Features\Welcome!\Tools\Annotation\Annotation Callout in the new features demo, available at TeeChart's program group. You can edit the tool and change callout's arrow head.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

Post by Mariano » Tue Jul 01, 2008 7:12 am

perfect !

that exactly what I was looking for.

thanks.

Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

found a bug (?)

Post by Mariano » Tue Jul 01, 2008 8:58 am

hi,

I did have a problem using the TAnnotationCallout.

you must reset
ChartTool1.Callout.Arrow.Visible := true;
in the form.OnCreate.
If not the arrow is visible on design time, but not during the execution.


see you,

Context:
winXP SP2,
TeeChart win 7.05 (with source)
Delphi Architect 9.0

Yeray
Site Admin
Site Admin
Posts: 9587
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Tue Jul 01, 2008 9:50 am

Hi Mariano,

Yes you are right. We could reproduce it with latest v7 too.

As you say, the easiest workaround is forcing the property to true in OnCreate.

Finally, note that we tested it with v8 too and it works fine with it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply