Hi I have used following code to download my diagram as Image, but it is giving partial image of partial diagram and not the full diagram.
Can you please guide me where am i going wrong.
Is there a way to give size Infinity, or the actually size of Diagram.
So that diagram is not cropped.
I can not give maxSize to 3000 or 5000 as it may me more than that in some cases.
In-fact we cannot guess the maxSize for it
As the documentation states, setting scale: NaN will cause the scale to be computed so that it fits in whatever maxSize you specify, if it’s bigger. But if it’s smaller, then that’s fine.
When I tried the code that I quoted above, it worked well.
And it sounds as if you want to increase it, because when the height is about 9300, the rendering has been scaled down to 2000/9300.
If you really want to have only a single image, then you need to make the tradeoff for your app how big an image you can afford to render and how big your users would want them to be. For example, a 10000x10000 image would require about 400MB in memory.
That depends on how complicated the rendering is. In general we recommend using SVG if the diagram might become large. But sometimes you have to have a raster image. Depends on the app’s requirements.