Welcome to the Xceed Community | Help
Community Search  
More Search Options

Reseting the zoom

Sort Posts: Previous Next
  •  02-02-2007, 10:55 AM Post no. 4099

    Reseting the zoom

    Hi,
    In my software the user can zoom-in the graph. At a point I need to reset the zoom and the graph need to turn to its first state. Can I do this without removing the chart and then re-drawing???
  •  02-05-2007, 2:10 PM Post no. 4100 in reply to 4099

    Re: Reseting the zoom

    It is not possible to control this programmatically if you are using a DataZoomTool.

    Else you can use the Zoom property on the chart to change the how the whole chart zooms.

    e.g.:

    private void button1_Click( object sender, EventArgs e )
    {
    Chart chart = chartControl1.Charts[ 0 ];
    chart.View.Zoom = 50; //smaller
    //chart.View.Zoom = 100;
    //chart.View.Zoom = 150; //bigger
    chartControl1.Refresh();
    }

    André
    Software Developer
    Xceed Software Inc.
  •  04-25-2011, 5:33 AM Post no. 30233 in reply to 4099

    Re: Reseting the zoom

    I know this thread is old, but I'm posting for posterity. In the DataZoomToolUC example, the code for resetting the zoomed position of the axes is the following, for a ChartControl object called m_ChartControl with a Chart in it:

     

    Dim chart As Xceed.Chart.Core.Chart = CType(m_ChartControl.Charts(0), Xceed.Chart.Core.Chart)

    chart.Axis(StandardAxis.PrimaryX).Ruler.PagingMode = RulerPagingMode.None

    chart.Axis(StandardAxis.PrimaryY).Ruler.PagingMode = RulerPagingMode.None

    chart.Axis(StandardAxis.Depth).Ruler.PagingMode = RulerPagingMode.None

    m_ChartControl.Refresh()

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.