We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Is it possible to export a Cartesian Chart as an image, using a button on a different page?

Currently I have my chart displayed on the homepage of my app. 

I would like to export this chart as an image and display it on a different page of the app. You can only navigate to this page by opening a sidebar menu, and clicking the page name.  

In the documentation for "Exporting in Flutter Cartesian Charts", the _renderChartAsImage() function is called with the use of a TextButton. However, I would like to export the image when I click on an "Export" tile in the sidebar menu of the app, and then display it on an already existing "Export" page. I can't figure out how to call this  _renderChartAsImage() function on a different page of the app (this page is saved as a separate dart file). 

Any idea how this can be achieved? I am still new to flutter and any assistance would be appreciated.

4 Replies 1 reply marked as answer

NR Natrayan Ramalingam Syncfusion Team November 14, 2022 09:27 AM

Hi Matt Keller,

Currently, we are validating your query and will update the complete details in one business day.



SK Sriram Kiran Senthilkumar Syncfusion Team November 15, 2022 08:03 AM

We have created a simple sample in which we have rendered the chart widget on the home page, and in the side navigation drawer, we have placed an export tile button which on clicked will export the chart widget rendered on the home page to image and display it on the separate export page that already exists. You can find the below attached sample for reference.

Attachment: f178809_84e6eac8.zip

Marked as answer

MK Matt Keller December 7, 2022 11:22 AM

Sorry for the late response, but thank you! This was very helpful :)

YG Yuvaraj Gajaraj Syncfusion Team December 8, 2022 04:46 AM

Most Welcome. Kindly get back to us if you have further queries. We are always happy to assist you.

Live Chat Icon For mobile
Up arrow icon