<div dir="ltr">Hi Eric,<br><br>The second idea works, but you need call the RecalculateBounds() first (so it updates the position of the plots) then call SetMinimum and SetMaximum.<br><br>Of course, I linked these actions to a pushButton in the GUI!<br>
<br>Thank you<br><br>Jothy<br><br><div class="gmail_quote">On Tue, Aug 16, 2011 at 2:28 PM, Eric E. Monson <span dir="ltr"><<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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()).<br>
<br>
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.<br>
<br>
-Eric<br>
<div><div></div><div class="h5"><br>
<br>
On Aug 16, 2011, at 8:18 AM, Jothy wrote:<br>
<br>
> Hi all,<br>
><br>
> Is it possible to reset the view in vtkChartXY?. I mean after zooming and panning I want to get back to the original view.<br>
><br>
> Thanks<br>
><br>
> Jothy<br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote></div><br></div>