4

I'm working with System.Windows.Forms.DataVisualization.Charting (C#, VS 2008).

I have two ChartAreas, one containing a SeriesChartType.Line and the other containing a SeriesChartType.RangeBar. Separatly the two charts plot what I want. The horizontal axis in both is time, and I'd like to align them so that I can zoom them together, etc.

The horizontal axis of the Line chart is the x axis, but the horizontal axis of the RangeBar chart is the y axis. When I set AlignWithChartArea of one chart with the name of the other, the linked axes are crossed (the horizontal (x) axis of the Line chart links with the vertical (x) axis of the RangeBar chart).

Is there an easy way to get the two horizontal axes to link, or am I asking too much?

Thanks as always.

John
  • 15,990
  • 10
  • 70
  • 110

1 Answers1

3

Is this what you are looking for? http://betterdashboards.wordpress.com/2009/02/11/align-multiple-chart-areas/

Dustin Laine
  • 37,935
  • 10
  • 86
  • 125
  • Thanks for the link Dustin. There are a bunch of blogs from there that I had no idea existed. The post you reference doesn't address the issue I have, because it deals with two line charts. These series both have the same orientation (x axis is horizontal). One of mine has the y axis horizontal, and this is turning out to be a big headache. – John May 12 '11 at 21:53
  • I appreciate your response though (it's the first one I've gotten on four questions on the charting tools!) (+1) Cheers! – John May 12 '11 at 22:05