I have another funny one, but a real problem for me.
I have multiple chart controls stacked on top of one another on a form.
All their x-axis are synchronized.
I add a vertical cursor to each chart control and to keep them aligned I do the following in the OnCursorToolChange event:
Chart(Index).Tools.Items(0).asTeeCursor.XVal = XVal, which works fone to align all the vertical cursors.
The problem is there is a terrible visible lag on-screen for the user if they move the mouse across a chart at any sort of speed with the lines appearing unaligned until the user stops the mouse (or slows down ALOT) then the cursors align again.
Is there some way to speed this up or 'fix' this somehow?
teeCursor
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Rossmc,
Are you using an approach similar to the snippet below? You can try how this works for you. If necessary I can send you full form files.
Are you using an approach similar to the snippet below? You can try how this works for you. If necessary I can send you full form files.
Code: Select all
Private Sub Form_Load()
TChart1.Series(0).FillSampleValues (10)
TChart2.Series(0).FillSampleValues (10)
TChart1.Tools.Items(0).asTeeCursor.XVal = 5
TChart1.Tools.Items(0).asTeeCursor.YVal = (TChart1.Series(0).YValues.Maximum + TChart1.Series(0).YValues.Minimum) / 2
End Sub
Private Sub TChart1_OnCursorToolChange(ByVal Tool As Long, ByVal X As Long, ByVal Y As Long, ByVal XVal As Double, ByVal YVal As Double, ByVal Series As Long, ByVal ValueIndex As Long)
If Tool = 0 Then
TChart2.Tools.Items(0).asTeeCursor.XVal = XVal
TChart2.Tools.Items(0).asTeeCursor.YVal = YVal
End If
End Sub
Private Sub TChart2_OnCursorToolChange(ByVal Tool As Long, ByVal X As Long, ByVal Y As Long, ByVal XVal As Double, ByVal YVal As Double, ByVal Series As Long, ByVal ValueIndex As Long)
If Tool = 0 Then
TChart1.Tools.Items(0).asTeeCursor.XVal = XVal
TChart1.Tools.Items(0).asTeeCursor.YVal = YVal
End If
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 |