0

I have a Windows Form Microsoft Data Visualization application. I have one chart, with two chart areas and two series. I stack one on top of the other.

The series I am loading are time-series. So the x-axis index is DataTime for both. The two series more often than not have different y-value ranges. For example, series-0 might go from 20 to 80, while series-1 might go from 140 to 245. Since the series x-axis are identical because the data start to end are the exact same dates, I would like the two charts to line up visually.

Problem is, the label used on one series only has to fit a number of length two, while the label used to fit the other series has to fit a number of length three. So the chart is offset just a little to the right for the series going from 140 to 245 than the series going from 20 to 80.

I don't know how to tell the chart control to make the label of the y-axis be at least a certain amount, so that a label of two numbers and three numbers will take the same amount of space.

Ivan
  • 7,448
  • 14
  • 69
  • 134
  • 1
    You can set suitable values for the ChartArea.Position and also the InnerplotPosition.Position . Both are ElementPositions are each is in percent of its container. See [here](https://stackoverflow.com/questions/43763361/c-sharp-mschart-charts-area-limits/43764417?s=4|0.0000#43764417) (my answer, not so much the accepted one) – TaW Sep 04 '17 at 22:36
  • @TaW that works. Thanks. – Ivan Sep 05 '17 at 00:09

0 Answers0