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
Sign in to comment on this post
Answers
Alex (DevExpress Support)
created 9 years ago
Hi Jun,
Yes, it is possible:
- You should adjust the chart's Diagram -> Margins property (e.g. set the Margins -> Left to 0).
- Update the chart's Padding property (e.g. set the Padding -> Left to 0).
- 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