How can i set the height and width for the nodes in diagram

I want to set the height and width of the diagram nodes in the json something like this . If i can define cellHeight

{ "class": "go.GraphLinksModel",
  "linkFromPortIdProperty": "fromPort",
  "linkToPortIdProperty": "toPort",
  "nodeDataArray": [ {"text":"dhiman", "link":"www.bhaskar.com","cellHeight":"40px", "info":"mojuanjana", "key":-3, "loc":"-100.99999999999977 -212.9999999999998"} ],
  "linkDataArray": [  ]} 

2) is there a way to use dashed link lines to connect the nodes ??something like this

"linkDataArray": [{'line':"dashed", "from":110,"to":120 }{"line":"plain", "from":140,"to":160} ]}
  1. Sure, just bind the “height” of the appropriate element in your Node to “cellHeight”. This might be the whole Node, but for a more complicated node template is more likely to be some main element within the node.

  2. Yes, add a binding on the Link’s main path Shape’s Shape.strokeDashArray property. As documented at http://gojs.net/latest/api/symbols/Shape.html#strokeDashArray, a value of null indicates a solid stroke and a value that is an Array of non-negative numbers determines the dash pattern. You can either have such an array as the value of some property of your link data objects, or you can use a conversion to convert whatever values you have there to the desired Array of numbers (or just null).

Something like:

  var DashPattern = [4, 4];
  myDiagram.linkTemplate =
    $(go.Link, . . .
        $(go.Shape,
           new go.Binding("strokeDashArray", "line",
                function(d) { return (d === "dashed") ? DashPattern : null; })
        ),
        . . .
    );