MartinS
MartinS

Reputation: 751

How to disable Chart axis autosize

I need to stop autosizing (or autoscaling) of Y Axis in c# chart and set it manually. Any advice? Thanks

Upvotes: 0

Views: 9057

Answers (1)

endofzero
endofzero

Reputation: 1820

You can set the minimum and maximum of the Y axis like so:

chart.ChartAreas[0].AxisY.Minimum = 0;
chart.ChartAreas[0].AxisY.Maximum = 10;

Upvotes: 4

Related Questions