Simple method for exporting a dygraph chart

262 views
Skip to first unread message

Philipp U

unread,
Jan 13, 2017, 4:26:13 AM1/13/17
to dygraphs-users
I'm really enjoying working with dygraphs but one thing that keeps bugging me is that i can't find a way to export my chart to an image.
I know there is this one script to achieve the funcionality, but it seems that it doesn't work for newer dypgraph versions (it is still exporting the graph, but only a part of it is visible). You can check the problem on the website of the script.
Does anyone know a simple method for exporting the graph?
Either how to fix the script or if there is any other option to export the graph?

Thank you in advance,

Philipp

Dan Vanderkam

unread,
Jan 13, 2017, 7:47:19 AM1/13/17
to dygraphs-users
Client side or server side? Rendering the chart in phantomjs and taking a screenshot would work great on a server.
--
You received this message because you are subscribed to the Google Groups "dygraphs-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Philipp U

unread,
Jan 13, 2017, 9:35:40 AM1/13/17
to dygraphs-users
Thank you, that's a great solution for the server side export and I will definitely check it out.
Yet for my application a solution quite like the one I posted would fit better, because the user should be able to configure the chart in some ways and than take a snap of the chart.
Do you have also a solution for a client side screenshot?

Dan Vanderkam

unread,
Jan 13, 2017, 11:27:18 AM1/13/17
to dygraph...@googlegroups.com
Send the configuration to the server?

If you want to do it client-side, you'll need to take the same approach as that script: render the axes and legend using a canvas instead of DOM.

To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages