How to: Individually Adjust Axes Zooming (Runtime Sample)
This example demonstrates how you can individually adjust zooming for different panes along the required axes. A chart with two panes is used to demonstrate this feature.
using System.Windows.Forms;
using DevExpress.Utils;
using DevExpress.XtraCharts;
// ...
private void Form1_Load(object sender, EventArgs e) {
// Cast the chart's diagram to the XYDiagram type, to access its panes.
XYDiagram diagram = (XYDiagram)chartControl1.Diagram;
// Enable the X-axis zooming at the diagram's level.
diagram.EnableAxisXZooming = true;
// Individually enable zooming for panes.
diagram.DefaultPane.EnableAxisXZooming = DefaultBoolean.True;
diagram.Panes[0].EnableAxisXZooming = DefaultBoolean.False;
// Specify how zooming is performed.
diagram.ZoomingOptions.UseKeyboard = false;
diagram.ZoomingOptions.UseKeyboardWithMouse = true;
diagram.ZoomingOptions.UseMouseWheel = true;
}
See Also