Image Cropping

Hi,
I am creating the image by go js of my orgchart. its for small chart only If I maximize the size of the chart(maximizing the scale) then the image is getting crop from right side and in some cases from bottom also. Is there any way to set the size of image or any other property to make sure that image will not crop.
Below are the code which we are using,

            var imgData = myDiagram.makeImage({
                scale: 1,
                type: "image/jpeg",
                size: new go.Size(<span style="line-height: 16.7999992370605px;">Infinity</span>, Infinity),
            });

Thanks,

Hi,
How can I make SVG image data and use in 64 bit format?

Thanks

First, you cannot create a bitmap or image file that has infinite dimensions. I’m not sure what it’s doing, but I’ll bet it decided to ignore Infinity as either the width or the height and just used the current dimensions of the diagram.

Second, I assume you know about Diagram.makeSvg. I don’t understand what you mean about 64-bit format – SVG is just XML or text.

First is not working also for max size,

var imgData = myDiagram.makeImage({
scale: 1,
type: "image/jpeg",
size: new go.Size(2000,2000),
});
Image is cropping in this case also.
Actually I have an org chart having more than 20 nodes it may be 40,50 or 100 etc.. nodes, as I attached image. I want to make image of the org chart in same structure. When I am making the image by above code its working but only 10 nodes approx.. are in image and others getting crop. Can you please let me know how will I make image so that no any nodes get crop?
Second, I wanted to make Image in svg format and want to save in a folder so I can display image when ever required.
Thanks,

First, you can choose to show everything at a smaller scale, or you can choose to show a fraction of the area at a larger scale, but you cannot fit everything at a large scale into a fixed size area. I would call:
myDiagram.makeImage({
type: “image/jpeg”,
size: new go.Size(Math.min(2000, myDiagram.documentBounds.width), NaN)
})
or something like that. I’m not sure what you want, but it might be something like this.

Diagram.makeSvg returns an SVGElement, so I suppose you could save its outerHtml.

Thanks for reply…
Below code is working and making image of all nodes, but the texts on node are not visible. Is there any idea to increase the scale of texts only? so that text’s visibility is more clear.

myDiagram.makeImage({
type: "image/jpeg", size: new go.Size(Math.min(2000, myDiagram.documentBounds.width), NaN)
})

Thanks,

You can set the font or the scale on the TextBlock.