[vtkusers] Reset vtkChartXY to original view

Eric E. Monson emonson at cs.duke.edu
Tue Aug 16 09:28:54 EDT 2011

There's not a built-in interaction that does this (e.g. double-click), but if you have the axis behaviors set on auto, then you should be able to tie some GUI interaction to a call to chart->RecalculateBounds() and the plots will refill the chart area. Otherwise, if you "original view" isn't an autoscaled one, then you'll just have to save the max/min values and make calls to axis->SetMaximum() and ->SetMinimum() (or SetRange()).

At some point I'd like to get the interactions to detect a double-click, but it hasn't been a high-enough priority yet.


On Aug 16, 2011, at 8:18 AM, Jothy wrote:

> Hi all,
> Is it possible to reset the view in vtkChartXY?. I mean after zooming and panning I want to get back to the original view.
> Thanks
> Jothy
> _______________________________________________
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

More information about the vtkusers mailing list