How to set the margin of a chart control to zero?

How to set the margin of a chart control to zero?

Hi,
I want to set the margin between the chart and its container to zero, pls see the attached file.
I tried to set all the Padding and the Margin properties of the chat control to zero, but it did not work.
How should I do?
Thank you

Sample.png

Sign in to comment on this post

Answers

Alex (DevExpress Support)

created 9 years ago

Hi Jun,
Yes, it is possible:

  1. You should adjust the chart's Diagram -> Margins property (e.g. set the Margins -> Left to 0).
  2. Update the chart's Padding property (e.g. set the Padding -> Left to 0).
  3. You might need to hide the leftmost axis label by handling the ChartControl.CustomDrawAxisLabel event and setting the e.Item.Text property to an empty string.
    Attached is a screenshot illustrating this approach in action. Hopefully, this will be of some help.
    Thanks,
    Alex
Published 17 original articles · won praise 224 · views 280 000 +

Guess you like

Origin blog.csdn.net/cxu123321/article/details/105054776