Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[charts] Export/Save as PNG / JPG / SVG / PDF #11746

Open
Ghouse1991 opened this issue Jan 19, 2024 · 7 comments
Open

[charts] Export/Save as PNG / JPG / SVG / PDF #11746

Ghouse1991 opened this issue Jan 19, 2024 · 7 comments
Labels
component: charts This is the name of the generic UI component, not the React module! feature: Export new feature New feature or request plan: Pro Impact at least one Pro user

Comments

@Ghouse1991
Copy link

Ghouse1991 commented Jan 19, 2024

Right now I'm not able to see any export/save option available currently in mui x charts (e.g., bar/pie charts) on right click/ any other way. Is that option already exists in latest version or any plan to introduce that in future

Expected behavior

Export/Save option to be available in x charts

Search keywords: export option mui x charts

User requests

Benchmarks

SCR-20240717-kjun
@Ghouse1991 Ghouse1991 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 19, 2024
@Ghouse1991 Ghouse1991 changed the title Export option from mui x charts Export/Save option from mui x charts Jan 19, 2024
@alexfauquette
Copy link
Member

Hi, thanks for your interest. Yes it's planned to be done as a pro feature.

The feature is still not well defined do you have some particular needs in mind?

@alexfauquette alexfauquette added enhancement This is not a bug, nor a new feature component: charts This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 19, 2024
@Ghouse1991
Copy link
Author

Thanks for your response @alexfauquette . What I'm really looking for is to have an export option on somewhere around the chart and the exported file should have series of data that we're passing to chart in categorized manner. and the snap of the chart would be really great.

@ShreyasJejurkar
Copy link

ShreyasJejurkar commented Jan 19, 2024

The feature is still not well defined do you have some particular needs in mind?

With MUI X charts, users can see visual representations of data in various formats and diagrams. But let's say the user wants to use that graphic or diagram for an email attachment, in that case, there is no easier/built-in way to export that diagram as a PNG, or JPEG image so that the user can use that to their respective needs.

So it will be good to have a feature where we can show a downloadable icon when user hover over the diagram so that they can download that diagram to their machine.

@oliviertassinari oliviertassinari changed the title Export/Save option from mui x charts [charts] Export/Save option Jan 29, 2024
@oliviertassinari oliviertassinari changed the title [charts] Export/Save option [charts] Export/Save as png/jpg option Jan 29, 2024
@oliviertassinari oliviertassinari added the plan: Pro Impact at least one Pro user label Jan 29, 2024
@oliviertassinari oliviertassinari changed the title [charts] Export/Save as png/jpg option [charts] Export/Save as png/jpg Jan 29, 2024
@oliviertassinari oliviertassinari added new feature New feature or request and removed enhancement This is not a bug, nor a new feature labels Jan 29, 2024
@SunPj
Copy link

SunPj commented Mar 14, 2024

Here is my solution https://gist.github.com/SunPj/14fe4f10db43be2d84751f5595d48246
Not ideal but still working

Demo (download button is far on the right) https://f29qcl.csb.app/

@Ghouse1991
Copy link
Author

thanks @SunPj for your effort. but I'm getting some error "Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules" - I'm opening in new window only

@SunPj
Copy link

SunPj commented Mar 18, 2024

@Ghouse1991 That's because of strict CORS rules of codesandbox, the demo is shown on one domain and the scripts are loaded from another domain. The best if you just clone and try it yourself.

@Ghouse1991
Copy link
Author

Sure. I'll give a try on that. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! feature: Export new feature New feature or request plan: Pro Impact at least one Pro user
Projects
None yet
Development

No branches or pull requests

5 participants