You can manually set the ChartArea
's ElementPosition
like this:
ChartArea CA = chart1.ChartAreas[0];
CA.Position = new ElementPosition(0, 0, 100, 100);
This means: Set it to the Top Left and make it fill the chart to 100%
.
The remaining white space is needed for the labels; you can tweak it further still by using numbers less than 0% and/or greater than 100%.
Do note that they are not pixels but percent, so they will always relate to the whole ClientSize
of the chart control!
Before and after:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…