[vtkusers] Reset vtkChartXY to original view

Jothy jothybasu at gmail.com
Tue Aug 16 10:46:59 EDT 2011


Hi Eric,

The second idea works, but you need call the RecalculateBounds() first (so
it updates the position of the plots) then call SetMinimum and SetMaximum.

Of course, I linked these actions to a pushButton in the GUI!

Thank you

Jothy

On Tue, Aug 16, 2011 at 2:28 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:

> 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.
>
> -Eric
>
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110816/d24d6e59/attachment.htm>


More information about the vtkusers mailing list