diff --git a/static/slaveDisplay.js b/static/slaveDisplay.js index f07a75a1..4149374a 100644 --- a/static/slaveDisplay.js +++ b/static/slaveDisplay.js @@ -82,14 +82,13 @@ function generateLineChartArray(data, nameKey) { y = 0 } chartData[chartData.length] = { - /*x: new Date(data[i].timestamp),*/ - x: new Date(data[i].timestamp),//new Date(2012, 00, i), + x: new Date(data[i].timestamp), y: Number(y) } - // console.log(i + " | " + y) } } let xyz = {}; + xyz.name = nameKey; xyz.type = "spline"; xyz.dataPoints = chartData; return xyz; @@ -101,6 +100,9 @@ function drawChart(selector, chartData) { title:{ text: "Production graph" }, + toolTip:{ + content: "{name}: {y}" + }, axisY:{ includeZero: true },