Hi I’m trying to show objects of gojs on canvas, but its not coming up. Canvas comes up in the div when I inspect, but no data/elements come on ui.
Even the height of empty canvas comes as 1px, even after increasing height the canvas shows up is empty.
Please help
let $ = go.GraphObject.make; // for conciseness in defining templates
let myDiagram = $(go.Diagram, this.refs.mydiagram, // must name or refer to the DIV HTML element
{
initialContentAlignment: go.Spot.Center
});
// response is the object having my data
let myPreviewDiagram = new go.Diagram();
myDiagram.model = new go.GraphLinksModel(response.nodeDataArray, response.linkDataArray);
myPreviewDiagram.makeSVG({
size: new go.Size(100, 100)
});
this.refs.mydiagram.appendChild(kk);