Print image with diagram's legend

Hi :)
I have a question - whether it is possible to print diagram with the attached user diagram’s legend
(description of the symbols and other information … ) ?


Yes. Have you read the Introduction page about printing?

You may also find it instructive to read the adjacent pages about generating images and SVG.

I still couldn’t find any solution to this when I use the layer as ‘Grid’. Can someone help me out?

What have you tried? What is it that you are unable to figure out?

Can you produce the legend that you want? If not, what kind of legend do you want to show? Have you read GoJS Legends and Titles -- Northwoods Software ? Is your legend always visible, or only when printing?

Or do you have some kind of problem with @media CSS rules?

Or something else?

I am able to show the legend (layer=grid) in the diagram, but when I try to download the diagram as SVG/image, I don’t get the legend (only the nodes/links are visible)

Ah, the legend is in the “Grid” Layer, which is a Layer.isTemporary layer, so it’s not pickable/hittable, can’t be selected, and changes to it aren’t recorded in the UndoManager.

The value of the showTemporary option is false in the call to Diagram.makeImageData or Diagram.makeSvg. Set it to true.