Private Sub Chart1_MouseWheel(sender As Object, e As MouseEventArgs) Handles Chart1.MouseWheel
Dim yMax As Double = Chart1.ChartAreas(0).AxisY.Maximum
Dim yMin As Double = Chart1.ChartAreas(0).AxisY.Minimum
Dim yChange As Double = 1
If e.Delta > 0 Then
' マウスホイールを上に回すとズームイン
'Chart1.ChartAreas(0).AxisY.ScaleView.Zoom(Chart1.ChartAreas(0).AxisY.ScaleView.ViewMinimum * 0.9, Chart1.ChartAreas(0).AxisY.ScaleView.ViewMaximum * 0.9)
Chart1.ChartAreas(0).AxisY.Minimum = yMin + yChange
Chart1.ChartAreas(0).AxisY.Maximum = yMax - yChange
ElseIf e.Delta < 0 Then
' マウスホイールを下に回すとズームアウト
'Chart1.ChartAreas(0).AxisY.ScaleView.Zoom(Chart1.ChartAreas(0).AxisY.ScaleView.ViewMinimum * 1.1, Chart1.ChartAreas(0).AxisY.ScaleView.ViewMaximum * 1.1)
Chart1.ChartAreas(0).AxisY.Minimum = yMin - yChange
Chart1.ChartAreas(0).AxisY.Maximum = yMax + yChange
End If
End Sub