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
Return value of point
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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:
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 |
![]() ![]() ![]() ![]() ![]() ![]() |
Instructions - How to post in this forum |