Page 1 of 1

Can not select the area for zoom in

Posted: Wed Sep 07, 2005 10:41 pm
by 9527698
Hi,

I can select any area for the first time but after zoom out I can't select certain area for zoom in again.
Initial status of TChart1.Axis.Left.Labels.Visible is false and when zoom in
it is set to true and when zoom out it is set to false again.
After zoom out, the area where Labels displayed during zoom in can not be selected for zoom in again.

Is there any workaround or plan to fix this issue?

Sub TChart1_OnZoom()
TChart1.Axis.Top.Increment = TChart1.GetDateTimeStep(7) 'by one minute
TChart1.Axis.Top.Labels.DateTimeFormat = "H:mm"
for i=0 to TChart1.SeriesCount - 1
TChart1.Axis.Left.Labels.Add i, MachineName(i)
next
TChart1.Axis.Left.Labels.Visible = True

End Sub

Sub TChart1_OnUndoZoom()
TChart1.Axis.Top.Increment = TChart1.GetDateTimeStep(12) 'by one hour
TChart1.Axis.Top.Labels.DateTimeFormat = "H"
TChart1.Axis.Left.Labels.Clear
TChart1.Axis.Left.Labels.Visible = False
End Sub

Posted: Fri Sep 09, 2005 11:06 am
by narcis
Hi JM,

It works fine here using the code below (almost identical to yours) and using latest TeeChart version available at our Customer Download Area. Could you please try if this code works fine for you and if so modify it so that we can reproduce the problem here?

Code: Select all

Private Sub Form_Load()
    TChart1.Series(0).FillSampleValues 10
End Sub

Private Sub TChart1_OnUndoZoom()
    TChart1.Axis.Top.Increment = TChart1.GetDateTimeStep(12) 'by one hour
    TChart1.Axis.Top.Labels.DateTimeFormat = "H"
    TChart1.Axis.Left.Labels.Clear
    TChart1.Axis.Left.Labels.Visible = False
End Sub

Private Sub TChart1_OnZoom()
    TChart1.Axis.Top.Increment = TChart1.GetDateTimeStep(7) 'by one minute
    TChart1.Axis.Top.Labels.DateTimeFormat = "H:mm"
    For i = 0 To TChart1.SeriesCount - 1
        TChart1.Axis.Left.Labels.Add TChart1.Series(0).YValues.Value(i), "Hello"
    Next
    TChart1.Axis.Left.Labels.Visible = True
End Sub