Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.60 KB | None | 0 0
  1. window.onload = function () {
  2.        
  3.         var chart = new CanvasJS.Chart("chartContainer", {
  4.             title: {
  5.                 text: "Temperature over time"
  6.             },
  7.         axisX:{  
  8.             title: "time",  
  9.                     valueFormatString: "YYYY-DD-MM HH:mm:ss",
  10.             },
  11.         axisY: {
  12.                 title: "temperature [°C]"
  13.             },
  14.             data: [{
  15.                 type: "line",
  16.                 dataPoints: <?php echo json_encode(array_reverse($ydata1), JSON_NUMERIC_CHECK); ?>
  17.             }]
  18.         });
  19.         chart.render();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement