Hi Mark,
You can create a custom tool based on the zoom tool that overrides the wheel action:
class CustomZoomTool : NZoomTool
{
/// <summary>
/// Processes wheel operations
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public override void DoWheel(object sender, NMouseEventArgs e)
{
if ((ModifierKeys & Keys.Control) == Keys.Control)
{
if (this.GetActiveChart() != null)
{
this.GetActiveChart().Height *= (float)(1.0 + 10.0 / e.Delta);
base.Repaint();
}
}
else
{
base.DoWheel(sender, e);
}
}
}
private void Form1_Load(object sender, EventArgs e)
{
NChart chart = nChartControl1.Charts[0];
chart.Enable3D = true;
NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(30);
chart.Series.Add(bar);
nChartControl1.Controller.Tools.Add(new NPanelSelectorTool());
CustomZoomTool zt = new CustomZoomTool();
zt.BeginDragMouseCommand = new NMouseCommand(MouseAction.Wheel, MouseButton.Middle, 0);
zt.ZoomStep = 16;
nChartControl1.Controller.Tools.Add(zt);
}
Let us know if you meet any problems.
Best Regards,
Nevron Support Team