title: cytoscape.js how to create a graph with weights for implement Dijkstra
body: <p>I am trying to create a graph with nodes and edges from scracth. I am creating nodes and edges like in the codes below but I can not see anything on the page. Please help. Here is my html and codes in it. I want to use Dijsktra adding weights to edges but until now, I can not see anything on the browser</p>
  
  <pre><code>    &lt;html&gt;
  
      &lt;head&gt;
           &lt;title&gt;Tutorial 1: Getting Started&lt;/title&gt;
           &lt;script src="cytoscape.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
  
     &lt;style&gt;
           #cy {
              width: 100%;
              height: 100%;
              position: absolute;
              top: 0px;
              left: 0px;
           }
      &lt;/style&gt;
  
      &lt;body&gt;
           &lt;div id="cy"&gt;&lt;/div&gt;
           &lt;script&gt;
             var cy = cytoscape({
             container: document.getElementById('cy'),
              elements: [
        { data: { id: 'a' } },
        { data: { id: 'b' } },
        { data: { id: 'c' } },
        { data: { id: 'd' } },
        { data: { id: 'e' } },
        {
          data: {
            id: 'ab',
            source: 'a',
            target: 'b'
          }
          data: {
            id: 'da',
            source: 'b',
            target: 'd'
          }
          data: {
            id: 'bd',
            source: 'b',
            target: 'd'
          }
          data: {
            id: 'eb',
            source: 'e',
            target: 'b'
          }
          data: {
            id: 'ba',
            source: 'b',
            target: 'a'
          }
          data: {
            id: 'ed',
            source: 'e',
            target: 'd'
          }
          data: {
            id: 'ce',
            source: 'c',
            target: 'e'
          }
          data: {
            id: 'bc',
            source: 'b',
            target: 'c'
          }
        }]
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>
  enter code here</p>