title: How to get javascript var data from html element? (working with canvasjs)
body: <p>I am trying to make a chart with CanvasJS. Here is my HTML:</p>
  
  <pre><code>&lt;div id="chartContainer" style="height: 360px; width: 100%;"&gt;&lt;/div&gt;
  &lt;div id="test1"&gt;100&lt;/div&gt;
  &lt;div id="test2"&gt;110&lt;/div&gt;
  </code></pre>
  
  <p>and my JS is</p>
  
  <pre><code>var dataPoint1 = document.getElementById("test1");
  var dataPoint2 = document.getElementById("test2");
  
  var chart = new CanvasJS.Chart("chartContainer",
  {  
    data: [
    {
      type: "column",
      dataPoints: [
          { label: "Apple", y: dataPoint1},
          { label: "Mango", y: dataPoint2}
      ]
    }
    ]
  });
  
  chart.render();
  </code></pre>
  
  <p>See my fiddle <a href="http://jsfiddle.net/onlinesquad/6gawzc74/" rel="nofollow">here</a>: the chart is not correctly rendered. </p>