From: Bernhard Tittelbach Date: Thu, 10 Oct 2013 03:31:00 +0000 (+0000) Subject: date in graph X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=2d2b56de27b644964adcd5b8f90c03e558714547;p=svn42.git date in graph --- diff --git a/raspberry-kiosk/kiosk.js b/raspberry-kiosk/kiosk.js index ef1e420..8919004 100644 --- a/raspberry-kiosk/kiosk.js +++ b/raspberry-kiosk/kiosk.js @@ -180,9 +180,22 @@ function drawGauge(targetelem, label, temp, options) { } var linecharts = {} -function drawLineGraph(targetelem, dataarray, options) { +function drawLineGraph(targetelem, dataarray, options, x_is_epochdate) { if (dataarray) { - var data = google.visualization.arrayToDataTable(dataarray); + var data; + if (x_is_epochdate) { + data=new google.visualization.DataTable(); + data.addColumn('datetime',dataarray[0][0]); + for (var c=1; c