Get ValueIndex

TeeChart for ActiveX, COM and ASP
Post Reply
JD
Newbie
Newbie
Posts: 7
Joined: Fri Jun 06, 2008 12:00 am
Contact:

Get ValueIndex

Post by JD » Mon Oct 13, 2008 10:04 am

Is there any way to get the ValueIndex of a Ganttchart when the OnMarkTipToolGetText Event is fired up?

Thanks
JD

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 Oct 13, 2008 12:13 pm

Hi JD,

I'm afraid this is not possible unless the original text contains it and you can parse the text to obtain the index. You could also search through series labels for the index which contains the text being processed, for example:

Code: Select all

Private Sub TChart1_OnMarkTipToolGetText(ByVal Tool As Long, Text As String)
    For i = 0 To TChart1.Series(0).Count - 1
        If Text = TChart1.Series(0).PointLabel(i) Then
            ValueIndex = i
        End If
    Next
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

JD
Newbie
Newbie
Posts: 7
Joined: Fri Jun 06, 2008 12:00 am
Contact:

Post by JD » Mon Oct 13, 2008 12:26 pm

The problem is that the text is not unique. Thx for your reply. Can you maybe put it on the wishlist?

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 Oct 13, 2008 12:52 pm

Hi JD,

Sure, just added it to be considered for inclusion in next releases.
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