title: Cannot reading property 'GetTime' of undefined
body: <p>I am using canvasJS to graph data. I make an AJAX request and get a list of data that can be graphed in this format:</p>
  
  <pre><code> dataPoints: [{
       x: new Date(2012, 00, 1),
       y: 450
   }, {
       x: new Date(2012, 01, 1),
       y: 414
   }, ]
  </code></pre>
  
  <p>My list that I get back from the AJAX request looks like: </p>
  
  <pre><code>sup_2 = [{ x: new Date(2012, 00, 1), y: 450 },{ x: new Date(2012, 01, 1), y: 414 },]
  </code></pre>
  
  <p>I cannot seem to pass it in as a variable to use, even though it is formatted correctly. To clarify, if I copy what sup_2 is and paste it in, I will see a graph, but when I leave as is below, I get the above error and I see nothing.</p>
  
  <p>My function looks like this:</p>
  
  <pre><code>&lt;script&gt;
  function sample_current(sup_2) {
      console.log(sup_2)
      var chart = new CanvasJS.Chart("temperatureChart", {
          zoomEnabled: true,
          toolTip: {
              shared: "true" //disable here. 
          },
          title: {
              text: "Sample Temp",
              fontSize: 18
          },
          axisX: {
              title: "time",
              gridThickness: .2,
              lineThickness: .2,
              titleFontSize: 14,
              labelFontSize: 12,
          },
          axisY: {
              title: "Temperature (C)",
              gridThickness: .2,
              lineThickness: .2,
              titleFontSize: 14,
              labelFontSize: 12,
  
          },
          data: [{
              markerType: "triangle",
              type: "line",
              xValueType: "dateTime",
              showInLegend: true,
              name: "Supply",
              dataPoints: sup_2
          }, ],
      });
      chart.render();
  }
  &lt;/script&gt;
  
  &lt;script&gt;
  function get_temp_data(element_id, period){
          $("#temperatureChart").foggy();
          $.ajax({
          type: "GET",
          url: $SCRIPT_ROOT + "/sample/test_function",
          contentType: "application/xml; charset=utf-8",
          data:{},
          success: function(data) {
              sample_current(data.b)            
          },
          error: function(jqXHR, textStatus, errorThrown) {
              alert('choose the facility');
          }
        });        
      }
  &lt;script&gt;
  </code></pre>