2
votes

I have a requirement to make the X-Axis and Y-Axis intersect at the middle of my chart created using MS-Chart.

The scale for both X and Y axis needs to be set based on the data points being returned from the Web Service. How to do it programmatically using MS Chart?

1

1 Answers

3
votes

ok there are properties to set the minimum, maximum, and interval of all of the scales associated with a chart. they are located something like the following:

chart1.ChartAreas(ChartAreaName).AxisX.Mimimum
chart1.ChartAreas(ChartAreaName).AxisX.Maximum
chart1.ChartAreas(ChartAreaName).AxisX.Interval
chart1.ChartAreas(ChartAreaName).AxisY.Mimimum
chart1.ChartAreas(ChartAreaName).AxisY.Maximum
chart1.ChartAreas(ChartAreaName).AxisY.Interval

you can use those combined with the dimensions of your chart to display any kind of scale you would like.