title: highcharts error 14 when passing time
body: <p>I'm in need of help passing info to Highcharts in order to chart durations. Part of the application I'm working on tracks the times of a baby's diaper changes. When run, I get highcharts error #14, which I know is the passing of a string, rather than a number. I tried changing the datatype of my x-axis, but the error still appears. I'd appreciate any help.</p>
  
  <p>The graph code:</p>
  
  <pre><code>`$(function () { 
      $('#diaperContainer').highcharts({
          title: {
              text: 'Diaper Chart'
          },
          chart: {
              type: 'line'
          },
          xAxis: {
              type: 'datetime',
              title: {
                  text: 'Time of Diaper Change'
              }
          },
          yAxis: {
              title: {
                  text: 'Type of Change'
              }
          },
          tooltip: {
              backgroundColor: '#FCFFC5',
              borderColor: 'black',
              borderRadius: 10,
              borderWidth: 3,
              shared: true,
          },
          series: [{
              data: [{{ $diaperData }}]
          }]
      });
  });`
  </code></pre>
  
  <p>The logic in the event controller, pulling database info:</p>
  
  <pre><code>$diaperData = array();
      $diapers = $baby-&gt;diapers;
  
      foreach ($diapers as $diaper) {
          if ($diaper-&gt;number_one &amp;&amp; $diaper-&gt;number_two){
              array_push($diaperData, "['" . date('Y-m-d H:i:s', strtotime($diaper-&gt;created_at)) . "', '3']");
          } elseif ($diaper-&gt;number_one){
              array_push($diaperData, "['" . date('Y-m-d H:i:s', strtotime($diaper-&gt;created_at)) . "', '1']");
          } elseif ($diaper-&gt;number_two) {
              array_push($diaperData, "['" . date('Y-m-d H:i:s', strtotime($diaper-&gt;created_at)) . "', '2']");
          }
      }
      $diaperData = join($diaperData, ',');
  </code></pre>