}

  function load() {
    myDiagram.model = go.Model.fromJson(document.getElementById('mySavedModel').innerText);
  }
  window.addEventListener('DOMContentLoaded', init);
</script>

<div id="sample">
  <div id="myDiagramDiv" style="border: solid 1px black; width: 100%; height: 400px"></div>
  <p>
    This defines a node template consisting of a top half and a bottom half. Each half's text and color are data bound. However the size of each node is fixed,
    so if the text is too long, it will be clipped.
 