fixed export png function
This commit is contained in:
parent
e10e838745
commit
93ecc88ade
2 changed files with 5 additions and 4 deletions
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
<div id="loading">Loading chart, please wait...</div>
|
||||
|
||||
<svg width="1400" height="600"></svg>
|
||||
<svg id="chart" width="1400" height="600"></svg>
|
||||
|
||||
<div class="legend" id="legend"></div>
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,8 @@ d3.csv("PHSwithContinent.csv").then(function(data) {
|
|||
].filter(Boolean);
|
||||
|
||||
const filename = parts.join("_") + ".png";
|
||||
saveSvgAsPng.saveSvgAsPng(document.querySelector("svg"), filename);
|
||||
|
||||
saveSvgAsPng(document.getElementById("chart"), filename);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue