0

Continuing my code incantations with DataVisualization.Charting in the System.Windows.Forms namespace.

Still working to figure out how to tie two horizontal axes: one with a Point ChartArea and another with a RangeBar ChartArea.

As I scroll around on the axes of these graphs, I can handle ChartArea.AxisViewChanging or ChartArea.AxisViewChanged. Both events provide a ViewEventArgs object as input, which contains fields like NewPosition, NewSize, NewSizeType, which I'd think would be the updated values for the axis view range, position, etc.

When would I want to handle AxisViewChanging vs. AxisViewChanged? Are things "more finalized" when AxisViewChanged is called? For what I'm trying to do (here, here, and here) it may make a big difference when the object "takes" the new values provided in the ViewEventArgs.

Thanks!

Community
  • 1
  • 1
John
  • 15,990
  • 10
  • 70
  • 110

1 Answers1

1

From books online (links included below):

AxisViewChanging Occurs when the axis scale view position or size is about to change.

AxisViewChanged Called when the axis scale view position or size is changed.

The first fires before anything has actually changed.

RThomas
  • 10,702
  • 2
  • 48
  • 61