I think the above answer should be,
chData.MouseWheel += new MouseEventHandler(chData_MouseWheel);
But according to what I found out, chart's mouse-wheel doesn't work as long as you don't set focus on the chart control in your code. So I used mouse-enter of the chart control to set focus to the chart and mouse leave event of the chart control to set the control back to its parent.
So you need to add below lines to your code, bind the mouse leave and mouse enter events of the chart control correspondingly plus add the above line too.
private void chartTracking_MouseEnter(object sender, EventArgs e)
{
this.chartTracking.Focus();
}
private void chartTracking_MouseLeave(object sender, EventArgs e)
{
this.chartTracking.Parent.Focus();
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…