For me it seems, that the zoom functionalty does not work on custom axis. Is ther any bug report for this?
Thanks, Markus.
Zoom on cutom axis
Hi.
Yes, you're correct, this one is a missing feature. Custom axes do not support automatic zooming. This has to be done manually via code. The zooming and unzooming can be controlled with chart axis SetMinMax method and Automatic property. In the example below I've used tChart Zoomed and UndoneZoom events to zoom and reset axis scale
Yes, you're correct, this one is a missing feature. Custom axes do not support automatic zooming. This has to be done manually via code. The zooming and unzooming can be controlled with chart axis SetMinMax method and Automatic property. In the example below I've used tChart Zoomed and UndoneZoom events to zoom and reset axis scale
Code: Select all
private void tChart1_UndoneZoom(object sender, System.EventArgs e)
{
line1.GetVertAxis.Automatic = true;
}
private void tChart1_Zoomed(object sender, System.EventArgs e)
{
Steema.TeeChart.Axis axis = line1.GetVertAxis;
double amin = axis.CalcPosPoint(line1.Chart.Zoom.y0);
double amax = axis.CalcPosPoint(line1.Zoom.y1);
axis.Automatic = false;
axis.SetMinMax(amin,amax);
}
Marjan Slatinek,
http://www.steema.com
http://www.steema.com