0

I have on form1 designer a windows forms chart control. In form1 constructor i added:

chart1.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
chart1.MouseWheel += chart1_MouseWheel;

Then i have the MouseWheel event:

void chart1_MouseWheel(object sender, MouseEventArgs e)
        {
            MessageBox.Show("hi");
        }

And in the designer i also added the event AxisViewChanged:

private void chart1_AxisViewChanged(object sender, ViewEventArgs e)
        {
            paintToCalaculate = true;
            chart1.Invalidate();
        }

But using a breakpoint in the MouseWheel event or on the AxisViewChanged event it's never get and stop there.

Daniel Hamutel
  • 643
  • 1
  • 13
  • 30
  • 1
    possible duplicate of [Mousewheel event not firing](http://stackoverflow.com/questions/13782763/mousewheel-event-not-firing) – TaW May 15 '15 at 06:51
  • 1
    This is strange but you need to put the __Focus__ onto the Chart __explicity__. When the zoom works the AxisViewChanged will work, too.. You can [simplify](http://stackoverflow.com/questions/16787050/enabling-mouse-wheel-zooming-in-a-microsoft-chart-control) the linked solution, though.. – TaW May 15 '15 at 06:52

0 Answers0