Hi,
I wonder if you knew the event that captures the drag on the horizontal axis ?
Best Regards.
Drag on Horizontal Axis !
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Drag on Horizontal Axis !
Hi User1,
You can do something like this:
You can do something like this:
Code: Select all
Option Explicit
Dim BottomAxisSelected As Boolean
Private Sub Form_Load()
TChart1.AddSeries scBar
TChart1.Series(0).FillSampleValues 10
BottomAxisSelected = False
End Sub
Private Sub TChart1_OnMouseDown(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
BottomAxisSelected = TChart1.Axis.Bottom.Clicked(X, Y)
End Sub
Private Sub TChart1_OnScroll()
If BottomAxisSelected Then
TChart1.Header.Text(0) = "Bottom axis scrolled!!"
Else
TChart1.Header.Text(0) = ""
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: Drag on Horizontal Axis !
Thanks, i did something like this :
Private Sub AxTChart_OnMouseUp(ByVal sender As Object, ByVal e As AxTeeChart.ITChartEvents_OnMouseUpEvent) Handles AxTChart.OnMouseUp
MouseUpX = e.x
MouseUpY = e.y
If AxTChart.Axis.Bottom.Clicked(MouseDownX, MouseDownY) Then AxTChart_OnZoom(Nothing, Nothing)
End Sub
Private Sub AxTChart_OnMouseUp(ByVal sender As Object, ByVal e As AxTeeChart.ITChartEvents_OnMouseUpEvent) Handles AxTChart.OnMouseUp
MouseUpX = e.x
MouseUpY = e.y
If AxTChart.Axis.Bottom.Clicked(MouseDownX, MouseDownY) Then AxTChart_OnZoom(Nothing, Nothing)
End Sub