Dear Steema,
Please give us an advice about how to get Maximum and Minimum of a custom axis.
We have 8 custom axes (vertical) on a graph. And we can set an axis is current active and its max, min value in Vertical Axis Labels of graph.
When performing zoom, we want to get Maximum and Minimum of current custom axis to show on Vertical Axis Labels (It was done successfully with Left Axis).
We use the code like below:
With TeeChart.Axis.Custom(intNo)
lblVertTop.Text = (Math.Round(.Maximum)).ToString()
lblVertMiddle.Text = (Math.Round((.Maximum + .Minimum) / 2)).ToString()
lblVertBottom.Text = (Math.Round(.Minimum)).ToString()
End With
But after zooming, the Maximum and Minimum of Custom Axis (intNo-th) is not changed.
Please give us your feedback about this.
Thanks and best regards
How to get Maximum and Minimum of a custom axis on zooming ?
Hi Haianh,
you could use similar code to the following :
It shows how to modify the custom axis labels on zoom and get the min and max values.
you could use similar code to the following :
Code: Select all
Private Sub TChart1_OnMouseUp(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
TChart1.Axis.Custom(0).SetMinMax TChart1.Axis.Custom(0).CalcPosPoint(X), TChart1.Axis.Custom(0).CalcPosPoint(Y)
TChart1.Header.Text.Item(0) = "minimum " & TChart1.Axis.Custom(0).Minimum & " maximum " & TChart1.Axis.Custom(0).Maximum
End Sub
Private Sub TChart1_OnUndoZoom()
TChart1.Axis.Custom(0).Automatic = True
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com