Hi,
Is there a way to make the mark of a point visible if and only if the point is visible on the graph?
In the image above, the mark [357.5] still shows even when the point is no longer visible on the graph. I tried clipping; however, it clips the mark. What I want to do is to not show the mark if the point is no longer visible.
Point mark when point is visible
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Point mark when point is visible
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: Point mark when point is visible
I tried that. The problem is it clips the marks. What I want to do is to not show the mark if the point is no longer visible on the graph. However, if the point is still visible, even though the mark will be off the graph, I still want to show the mark.
Re: Point mark when point is visible
Hello Rymond,
Ok. I made a simple code that uses method of series CalcYPos(i). I think you can use it for solve your problem with marks in your application. Moreover we can added it request in wish-list with number (TV52015303) to be enhanced for next releases.
I hope will helps.
Thanks,
Ok. I made a simple code that uses method of series CalcYPos(i). I think you can use it for solve your problem with marks in your application. Moreover we can added it request in wish-list with number (TV52015303) to be enhanced for next releases.
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues 25
TChart1.Series(0).Marks.Visible = True
End Sub
Private Sub TChart1_OnAfterDraw()
Dim yPos As Integer
For i = 0 To TChart1.Series(0).Count - 1
yPos = TChart1.Series(0).CalcYPos(i)
With TChart1.Series(0).Marks
If (yPos < TChart1.Axis.Left.IStartPos) Or (yPos > TChart1.Axis.Left.IEndPos) Then
.Item(i).Hide
Else
.Item(i).Show
End If
End With
Next
End Sub
Thanks,
Best Regards,
Sandra Pazos / 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 |