Is there a way to set the inital zoom? (ie. the visible rectangle). I have tried setting the following:
TChart1.Zoom.Zoomed = true;
TChart1.Zoom.x0 = myRowView("X0");
TChart1.Zoom.x1 = myRowView("X1");
TChart1.Zoom.y0 = myRowView("Y0");
TChart1.Zoom.y1 = myRowView("Y1");
Where myRowView stores the x0, x1, y0, y1 that I gathered from the Zoom method.
Am I doing things correctly?
Thanks!
Setting Inital Zoom?
Hi,
you can use SetMinMax method for the bottom and left axis to set a inicial zoom.
you can use SetMinMax method for the bottom and left axis to set a inicial zoom.
Pep Jorge
http://support.steema.com
http://support.steema.com
I've tried to implement your idea about setting the initial extents of the graph, but I've run into a problem. For some reason, I've determined that the UndoneZoom event is called before the Zoomed Event. (As a side note, could this cause some of the performance problems?).
I have a function within the UndoneZoom Event to reset the X axis to the max and min of the series (I've tried both TChart1.Axes.Bottom.AdjustMaxMin as well as setting the Maximum and Minimum Properties directly).
Since my UndoneZoom event resets the X axis, the Zoomed event does not seem to work (since I've reset the max and min values the x-axis does not scale).
I need to reset the Max/Min for the X-axis since I initally set it to reset from saved extents, but would still like to see the entire graph if they zoom out.
Any help would be appreciated.
I have a function within the UndoneZoom Event to reset the X axis to the max and min of the series (I've tried both TChart1.Axes.Bottom.AdjustMaxMin as well as setting the Maximum and Minimum Properties directly).
Since my UndoneZoom event resets the X axis, the Zoomed event does not seem to work (since I've reset the max and min values the x-axis does not scale).
I need to reset the Max/Min for the X-axis since I initally set it to reset from saved extents, but would still like to see the entire graph if they zoom out.
Any help would be appreciated.
Hi,
In meantime you can add the following line :
Yes, you're correct, this seems to be a bug. I've added it on our defect list to be reviewed for the next upcoming release.into a problem. For some reason, I've determined that the UndoneZoom event is called before the Zoomed Event. (As a side note, could this cause some of the performance problems?).
In meantime you can add the following line :
Code: Select all
private void tChart1_UndoneZoom(object sender, System.EventArgs e)
{
if (!tChart1.Zoom.Zoomed)
{
MessageBox.Show ("Undo Zoom");
}
}
Pep Jorge
http://support.steema.com
http://support.steema.com