When I try saving a column chart to an image (jpg), I'm trying to add some margin to the sides of the chart. It seems like the Margin property only applies to the UserControls in which the chart is placed. When the chart image is saved using the Save method, all the margin is removed. It doesn't seem like the Padding property works for this either.
If it matters, I'm trying to save this image without showing it on the screen and am using the UIElement.Measure() and Arrange() methods.
DADevi Aruna Maharasi Murugan Syncfusion Team March 21, 2017 09:59 AM UTC
Thanks for contacting Syncfusion Support.
We have exported chart as image by using RenderTargetBitmap. If control background is “Transparent”, then output of control image background will be “Black” in RenderTargetBitmap. So, while applying the background for SfChart, it will get applied to SfChart by excluding its margin (margin parts of control also exported, but it is not visible due to black background).
However, we have achieved your requirement by placing the chart inside an additional container (Grid). We have prepared a demo sample for your requirement and it can be downloaded from below link,