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
Export to image? #29
Comments
Love this idea. The solution should be client-side only, since setting up image processing libraries on the server can be a pain. This sounds like a solid approach: http://stackoverflow.com/questions/3975499/convert-svg-to-image-jpeg-png-etc-in-the-browser |
Implemented - https://github.com/ankane/chartkick.js/tree/download However, it won't work in any version of IE due to security restrictions, so the download button is hidden for IE users. A cross-browser compatible approach would be to setup a public server to convert SVGs to PNGs. This approach would work in any browser but would rely on an external service. |
Wow that was fast! I was also thinking about a server-side solution -- maybe using ImageMagick. I haven't had the chance to give it a real try though. |
Yeah, I was hoping to get away with a client-side solution for simplicity, but since it isn't cross-browser compatible, a server-side solution makes more sense. |
Looks like the Google Charts API now includes some similar functionality: https://developers.google.com/chart/interactive/docs/printing |
Hi, Is it possible to use this feature in the ruby gem? I couldn't quite figure out how. Do you need to use the JS file from the Download branch since it doesn't seem to be implemented on Master? |
Yeah, the branch is pretty outdated, so new features won't be there, but you can just add the file to |
Hi, is possible to integrate the download tree to the new version 1.4.1?? |
The latest version of Chartkick has a |
Would be a nice feature to have :)
The text was updated successfully, but these errors were encountered: