how can i move annotation tool

TeeChart for ActiveX, COM and ASP
Post Reply
Aravind
Newbie
Newbie
Posts: 75
Joined: Fri Nov 15, 2002 12:00 am

how can i move annotation tool

Post by Aravind » Fri May 26, 2006 11:34 am

i have added annotation tool with some text on the chart but i want to move by means cursor and fix it at some place depends on my choice ..

pls advise me on this
aravind

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

Post by Narcís » Fri May 26, 2006 11:40 am

Hi Aravind,

To be able to move the tool around you'd better use Rectangle tool instead of Annotation tool.
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

Faizullah Khan
Newbie
Newbie
Posts: 50
Joined: Wed Apr 26, 2006 12:00 am

How add annotation To Graph

Post by Faizullah Khan » Tue Jun 06, 2006 11:47 am

Hi,

I am also facing problem related to add annotation on the TeeChart,
I want to add annotation at specific X,Y point ,
Help me in this Regard

thanks & Regards

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

Post by Narcís » Tue Jun 06, 2006 11:59 am

Hi Faizullah,

You can use the OnBeforeDrawAxes event and something like this:

Code: Select all

Private Sub TChart1_OnBeforeDrawAxes()
With TChart1.Tools.Items(0).asAnnotation.Shape
    .CustomPosition = True
    .Top = (TChart1.Series(0).CalcYPos(2) + TChart1.Series(0).CalcYPos(3)) / 2
    .Left = (TChart1.Series(0).CalcXPos(2) + TChart1.Series(0).CalcXPos(3)) / 2
  End With
End Sub
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

Faizullah Khan
Newbie
Newbie
Posts: 50
Joined: Wed Apr 26, 2006 12:00 am

Post by Faizullah Khan » Tue Jun 13, 2006 4:49 am

Hi
Thanks.
It displays the Annote Text under the sprcific Point , I want to display the
annotation text above the Point (Top and Right Allign) ,
help me in this regards

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

Post by Narcís » Tue Jun 13, 2006 8:27 am

Hi Faizullah,

Then you can do something like this:

Code: Select all

Private Sub Form_Load()
    TChart1.Series(0).FillSampleValues 10
    TChart1.Environment.InternalRepaint
End Sub

Private Sub TChart1_OnAfterDraw()
    With TChart1.Tools.Items(0).asAnnotation.Shape
        .CustomPosition = True
        .Top = TChart1.Series(0).CalcYPos(3) - TChart1.Tools.Items(0).asAnnotation.Height
        .Left = TChart1.Series(0).CalcXPos(3)
    End With
End Sub
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

Post Reply