Tri surface series get x,y,z value
Tri surface series get x,y,z value
The surface series, he should get the X, Y & Z position of the clicked region. Please let us know if there is a way we can get these values from Tee Chart while clicking on it. Please see the attached file for detail .
- Attachments
-
- 3dplotting.jpg (132.38 KiB) Viewed 20031 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Tri surface series get x,y,z value
Hello,
You can do this:
You can do this:
Code: Select all
Private Sub Form_Load()
TChart1.AddSeries scTriSurface
TChart1.Series(0).FillSampleValues
End Sub
Private Sub TChart1_OnMouseDown(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Index = TChart1.Series(0).Clicked(X, Y)
If Index <> -1 Then
Me.Caption = "X: " & CStr(TChart1.Series(0).XValues.Value(Index)) & _
", Y: " & CStr(TChart1.Series(0).YValues.Value(Index)) & _
", Z: " & CStr(TChart1.Series(0).asTriSurface.ZValues.Value(Index))
End If
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 |
Re: Tri surface series get x,y,z value
Hi Narcis,
Thanks a lot for your comments. I did tried the solution as per your suggestion but the index retrieved is incorrect for tri-surface series. My application has 399 points only, but the index retrieved is 750. Do I need to perform any extra calculations for tri-surface series to get the correct index?
I tried your solution on other series too like point series, bubble series, etc and the index retrieved in these series is accurate. Problem lies with the tri-surface series only. Please guide if I am missing anything.
Regards,
Preetam
Thanks a lot for your comments. I did tried the solution as per your suggestion but the index retrieved is incorrect for tri-surface series. My application has 399 points only, but the index retrieved is 750. Do I need to perform any extra calculations for tri-surface series to get the correct index?
I tried your solution on other series too like point series, bubble series, etc and the index retrieved in these series is accurate. Problem lies with the tri-surface series only. Please guide if I am missing anything.
Regards,
Preetam
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Tri surface series get x,y,z value
Hi Preetam,
Yes, this looks like a bug to me. I have added it (Bug #1262) to the defect list to be fixed for future releases.
Yes, this looks like a bug to me. I have added it (Bug #1262) to the defect list to be fixed for future 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 |
Instructions - How to post in this forum |
Re: Tri surface series get x,y,z value
- Attachments
-
- 845b2aeeb0cfcbe0-1.jpg (415.69 KiB) Viewed 19913 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Tri surface series get x,y,z value
Hello Preetam,
Could you please post your technical inquiries in a comprehensive format for this forums board? That is posting text and code as such an not as images. You can accompany it images and screen-shots, which are supported by this forums board and can be inserted into posts. That will make information here much easier to understand and work with for everybody that reads it. If you edit your text in a word processor, you just need to copy and past the text here. Formatting code with proper tags is also appreciated.
Thanks in advance.
Could you please post your technical inquiries in a comprehensive format for this forums board? That is posting text and code as such an not as images. You can accompany it images and screen-shots, which are supported by this forums board and can be inserted into posts. That will make information here much easier to understand and work with for everybody that reads it. If you edit your text in a word processor, you just need to copy and past the text here. Formatting code with proper tags is also appreciated.
Thanks in advance.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Tri surface series get x,y,z value
Hi Preetam,
Regarding your technical inquiries:
1. What Remove custom colors button does is resetting all points to be clTeeColor, default color. Either populate your series using this color constant or don't use any color at all. A complete example that sets colors as you wish is this:
2. Set series' Transparency property as shown in the code example above.
Regarding your technical inquiries:
1. What Remove custom colors button does is resetting all points to be clTeeColor, default color. Either populate your series using this color constant or don't use any color at all. A complete example that sets colors as you wish is this:
Code: Select all
Private Sub Form_Load()
TChart1.AddSeries scTriSurface
TChart1.Series(0).FillSampleValues 100
TChart1.Series(0).Transparency = 50
TChart1.Series(0).asTriSurface.UseColorRange = True
TChart1.Series(0).asTriSurface.UsePalette = False
TChart1.Series(0).asTriSurface.StartColor = RGB(255, 0, 0)
TChart1.Series(0).asTriSurface.MidColor = RGB(0, 0, 255)
TChart1.Series(0).asTriSurface.EndColor = RGB(255, 173, 91)
End Sub
Code: Select all
TChart1.Series(0).Transparency = 50
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 |