Hi I tried using the cytoscape-svg library to download my network in .svg format but it didnt work. I had the below error:
Below is the code which I have:
const downloadPng = (cyToDownload, picFormat) => {
if (picFormat == 'png') {
const png = cyToDownload.png()
var a = document.createElement("a"); //Create <a>
a.href = png
a.download = "local_network.png"; //File name Here
a.click(); //Download file
}
else if (picFormat == 'jpg') {
const jpg = cyToDownload.jpg()
var a = document.createElement("a"); //Create <a>
a.href = jpg
a.download = "local_network.jpg"; //File name Here
a.click(); //Download file
}
else if (picFormat == 'svg') {
console.log("download func called")
const svgPic = cyToDownload.svg()
console.log(svgPic)
var a = document.createElement("a"); //Create <a>
a.href = svgPic
a.download = "local_network.svg"; //File name Here
a.click(); //Download file
}
}
So my functions to download my network in png and jpg work, so I don't know why it can't download the network in .svg format. Could I get some help please?
Hi I tried using the cytoscape-svg library to download my network in .svg format but it didnt work. I had the below error:
Below is the code which I have:
So my functions to download my network in png and jpg work, so I don't know why it can't download the network in .svg format. Could I get some help please?
Thank you Jonathan