Home Forums WinForms controls Xceed Chart for WinForms Reseting the zoom

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18731 |

    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???

    Imported from legacy forums. Posted by Serkan (had 2859 views)

    User (Old forums)
    Member
    Post count: 23064

    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();
    }

    Imported from legacy forums. Posted by André (had 3069 views)

    User (Old forums)
    Member
    Post count: 23064

    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()

    Imported from legacy forums. Posted by Paul (had 1239 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.