I want to do what would be when you hover on the X axis in msChart and scrolling the wheel, the schedule scaled . But! The zoom responds only when the mouse cursor is over the axis label , and when you hover over an empty space, nothing happens !

Why it happens? and how to solve this problem?

<chartingToolkit:Chart x:Name="mcChart"> <chartingToolkit:Chart.Axes> <chartingToolkit:LinearAxis Name="AxisY" MouseWheel="LinearAxis_MouseWheel_2"/> <chartingToolkit:LinearAxis Name="AxisX" MouseWheel="LinearAxis_MouseWheel_1"/> </chartingToolkit:Chart.Axes> </chartingToolkit:Chart> 


    1 answer 1

    Small crutch: Set the LinearAxis property to Background to Transparent. It works like magic on my machine.

    • one
      This advice is not only good for this particular case. The absence of a Background (or rather, Background = null) in WPF is interpreted as transparency for mouse events, so at least some Background is needed. Transparent is the same color (# 00000000), and conceptually no different from, say, black. That is, it is most likely not a crutch, but a logical behavior. Another thing is that the default LinearAxis default should be more meaningful. - VladD