The rectangle enclosing the shown data range is called the LogicalExtent of the Chart. Therefore, store the LogicalExtent before performing a zoom in a TDoubleRect (savedExtent := Chart.LogicalExtent), and to go back you just assign it the other way: Chart.LogicalExtent := savedExtent.
(The  unzoomed extent already is available as "Chart.GetFullExtent").

All this is managed by the TChartExtentHistory. Details are explained in the Mandelbrot-Tutorial (http://wiki.lazarus.freepascal.org/TAChart_Tutorial:_ColorMapSeries,_Zooming#Zoom_history).

Am 04.06.2015 um 21:35 schrieb Richard Mace:
Hi,
Another quick question. How can you, via code, zoom out of a chart, effectively back to what it was by default? If that makes sense?

Thanks

Richard


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to