controlling the zoom tool
Posted: Wed Sep 12, 2007 5:04 pm
Hello,
I'm using the zoom tool as in the TeeChart .NET tutorial as follows..
'add zoom functionality
Dim zoomTool1 As Steema.TeeChart.Tools.ZoomTool = New Steema.TeeChart.Tools.ZoomTool(WebChart1.Chart)
CheckZoom(WebChart1)
End Sub
Private Sub CheckZoom(ByVal wChart As Steema.TeeChart.Web.WebChart)
Dim zoomedState As ArrayList = CType(Session((wChart.ID + "Zoomed")), ArrayList)
zoomedState = CType(wChart.Chart.Tools(1), Steema.TeeChart.Tools.ZoomTool).SetCurrentZoom(Request, zoomedState)
If (zoomedState Is Nothing) Then
Session.Remove((wChart.ID + "Zoomed"))
Else
Session.Add((wChart.ID + "Zoomed"), zoomedState)
End If
End Sub
Is there a way to make sure that the chart is zoomed all the way out (extent of the data) when you open a webpage? It looks like zoomState is stored in a session variable. Can I just make it equal to Nothing on page load? Or will that just kill the zoom feature?
cheers, Paul
I'm using the zoom tool as in the TeeChart .NET tutorial as follows..
'add zoom functionality
Dim zoomTool1 As Steema.TeeChart.Tools.ZoomTool = New Steema.TeeChart.Tools.ZoomTool(WebChart1.Chart)
CheckZoom(WebChart1)
End Sub
Private Sub CheckZoom(ByVal wChart As Steema.TeeChart.Web.WebChart)
Dim zoomedState As ArrayList = CType(Session((wChart.ID + "Zoomed")), ArrayList)
zoomedState = CType(wChart.Chart.Tools(1), Steema.TeeChart.Tools.ZoomTool).SetCurrentZoom(Request, zoomedState)
If (zoomedState Is Nothing) Then
Session.Remove((wChart.ID + "Zoomed"))
Else
Session.Add((wChart.ID + "Zoomed"), zoomedState)
End If
End Sub
Is there a way to make sure that the chart is zoomed all the way out (extent of the data) when you open a webpage? It looks like zoomState is stored in a session variable. Can I just make it equal to Nothing on page load? Or will that just kill the zoom feature?
cheers, Paul