Return value of point

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

Return value of point

Post by dhms » Tue Aug 23, 2005 4:26 am

Hi,

I have one serie of data that containt this values

id days value

300 50 4
120 80 2.5
600 120 5
333 10 2
456 200 8

On Y axis is days and X axis is value.

When I clic on point 120, 5 by example, I need return 600.

Can someone help me.

Tia.

Daniel

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 Aug 23, 2005 8:24 am

Hi Daniel,

You can add id to the series as the point label and display it using a MarkTips tool. The following code does exactly what you request:

Code: Select all

Private Sub Form_Load()
    With TChart1.Series(0)
        .AddXY 50, 4, "300", clTeeColor
        .AddXY 2.5, 80, "120", clTeeColor
        .AddXY 120, 5, "600", clTeeColor
        .AddXY 10, 2, "333", clTeeColor
        .AddXY 200, 8, "456", clTeeColor
    End With
    
    TChart1.Axis.Bottom.Labels.Style = talValue
    
    With TChart1.Tools
        .Add tcMarksTip
        With .Items(0).asMarksTip
            .MouseAction = mtmClick
            .Delay = 0
        End With
    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