Background image does not export with SfChart.

I have ran into an issue with exporting SfCharts into JPEG, PNG, and SVG formats. In my code I have an "Export" button that lets the user pick between exporting the corresponding SfChart into those formats I just listed. When I proceed to download the file and open it, the background image of the chart does not export with the chart and the color of the chart is dark grey for PNG and JPEG formats. I have attached a text file containing my Home.razor code that reproduces my problem. Can this issue be fixed?



Attachment: homepagecode_96395b31.txt

1 Reply

AR AbubuckerSittiq RajaMohamed Syncfusion Team September 30, 2025 12:27 PM UTC

Hi Kiss,

 

Greetings from Syncfusion.

 

When exporting a Syncfusion chart with a locally referenced background image, the image may not appear in the exported output. This is because the chart is rendered using SVG or Canvas, and during export, only the chart content is serialized excluding any external or CSS-based background images.

 

The background Image property paints the image on the container during on-screen rendering, but it doesn’t embed the image within the chart’s SVG structure. As a result, when the chart is exported (typically by converting SVG to Canvas and then to PNG), the background image is lost.

 

Additionally, local file paths are inaccessible during export due to sandbox restrictions, and external image URLs may be blocked by CORS policies during the SVG-to-Canvas conversion.

 

Please let us know if you have any concerns.

 

Regards,

Abubucker Sittiq R


Loader.
Up arrow icon