Chart Export is black on UWP

Hi,
When I'm trying to use chart.SaveAsImage("ChartSample.jpg"); on UWP,  the image I get has a black background. It makes the image unreadable.
However on Android and iOS, it export what I see on the screen (White background).

Is it going to be fixed ?
If no, is there a workaround to get what I see on the screen ?

Thanks

Attachment: ChartFile_e378e219.zip

3 Replies

DV Divya Venkatesan Syncfusion Team April 6, 2018 06:59 AM UTC

Hi Torrent, 
 
Thanks for using Syncfusion products. 
 
We have exported chart as image by using RenderTargetBitmap in UWP. If control background is “Transparent”, then output of control image background will be “Black” in RenderTargetBitmap. However, we can resolve this problem by setting chart Background as White to get white background image as shown in the below code snippets. 
 
Code snippet[Xaml]: 
<chart:SfChart BackgroundColor="White"> 
   . . . 
</chart:SfChart> 
 
Code snippet[C#]: 
chart.BackgroundColor = Color.White; 
 
Please let us know if you need any further assistance. 
 
Regards, 
Divya Venkatesan 



JT Julien Torrent April 6, 2018 08:41 AM UTC

Hi,

The only problem is when I don't have a title, the last upper label is half black.
The chart white stop at the last horizontal line.


Thanks

Attachment: Images_57466377.zip


MK Muneesh Kumar G Syncfusion Team April 9, 2018 05:12 AM UTC

Hi Torrent,  
  
We can resolve your problem by setting Margin property for SfChart as per the below code snippet.  
 
Code snippet [XAML]: 
 
<chart:SfChart BackgroundColor="White" Margin="10"> 
 
</chart:SfChart> 
 
 
Code snippet [C#]: 
 
 
chart.Margin = new Thickness(10); 
 
 
Please let us know if you need any further assistance.  
  
Regards,  
Muneesh Kumar G 
 


Loader.
Up arrow icon