You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a d3 graph within a svg element and wanted to export it. Just grabbed the svg element and called simg like shown in your example:
function exportToPNG() {
var simg = new Simg(document.getElementsByTagName("svg"));
// Replace the current SVG with an image version of it.
simg.replace();
// And trigger a download of the rendered image.
simg.download();
}
simg.js:37 Uncaught TypeError: svg.setAttribute is not a function
at simg.js:37
at Array.forEach (<anonymous>)
at root.Simg.toString (simg.js:36)
at root.Simg.toSvgImage (simg.js:57)
at root.Simg.toCanvas (simg.js:44)
at root.Simg.toImg (simg.js:74)
at root.Simg.replace (simg.js:90)
at exportToPNG (itsv.pws.ui.projStruct.js?ver:50)
at HTMLAnchorElement.onclick (ProjStruct.aspx:1)
The text was updated successfully, but these errors were encountered:
I have a d3 graph within a svg element and wanted to export it. Just grabbed the svg element and called simg like shown in your example:
The text was updated successfully, but these errors were encountered: