Thre are no special methods in the software to track the zoom stack.
You can keep track of the number of levels in the zoom stack by incrementing a counter in a subclass of the ChartZoom class, as in the example below.
private class ZoomWithStack: ChartZoom
{
int zoomstackcount = 0;
public ZoomWithStack(ChartView component, CartesianCoordinates transform,
double zpos, bool brescale): base( component, transform, zpos, brescale)
{
}
public override void OnMouseDown (MouseEventArgs mouseevent)
{
// if right mouse buggon, pop zoom stack one level
if ((mouseevent.Button & MouseButtons.Right) != 0)
{
this.PopZoomStack();
if (zoomstackcount > 0)
zoomstackcount--;
}
else
base.OnMouseDown(mouseevent);
}
public override void OnMouseUp (MouseEventArgs mouseevent)
{
if ((mouseevent.Button & MouseButtons.Left) != 0)
zoomstackcount++;
base.OnMouseUp(mouseevent);
}
}
Or you could get the source to the QCChart2D software, which would give you access to internals of the ChartZoom class.