Page 1 of 1

axis value scrolls to unlimited value using mouse wheel

Posted: Wed Sep 12, 2007 2:30 am
by 9525777
Hi,

We are currently using TeeChart Pro Activex Control v7 but encounter a problem.

In teechart, when I slide the mouse wheel, the vertical axis can scroll, right?

Right now, the problem is that I don't want the axis scale to get unlimited value.

Does teechart support the function that the user can set the max/min value that the axis can scroll to?

Please give me some suggestions and many thanks.

Posted: Wed Sep 12, 2007 7:47 am
by narcis
Hi Combuilder,

You could do something like the code below in the OnAfterDraw event.

Code: Select all

Private Sub TChart1_OnAfterDraw()
    If TChart1.Axis.Left.Maximum > 2000 Then
        TChart1.Axis.Left.AutomaticMaximum = False
        TChart1.Axis.Left.Maximum = 2000
    End If
End Sub

Posted: Wed Sep 12, 2007 8:15 am
by 9525777
thank you! It's helpful.