I have a digram with around 100 nodes and I have used circular layout.
But when we try to makeImage with scale:1, the png downloaded does not include all the nodes. I see only partial diagram in the downloaded image.
Here’s what I am using:
var goJsDiagram = this.mapPanel.goJsDiagram;
var imgData = goJsDiagram.makeImage({scale:1});
var download = document.createElement('a');
download.href = imgData.src;
download.download = 'map.png';
download.click();
Please let me know if I m missing anything.
Thanks in advance.
The reason for the maxSize option is to protect apps running in a limited memory environment (such as phones) from accidentally crashing due to running out of memory. (Not that it couldn’t happen in other manners.)
We don’t allow Infinity for the maxSize width or height, just to force you to think about what values really would be appropriate. Think of memory usage!
I tried to change the maxSize to 4000, 4000. This also doesnt seem to work.
I am still getting the warning saying maxSize is 2000,2000.
[Diagram.makeImage(data): Diagram width or height is larger than the default max size. (2286x2446 vs 2000x2000) Consider increasing the max size.]
Not sure, what I am missing. I am using this
var imgData = goJsDiagram.makeImage({
scale:1,
maxSize: go.Size(4000, 4000)
});
var download = document.createElement('a');
download.href = imgData.src;
download.download = `map_${Date.now()}.png`;
download.click();