From 1fc2de231b7b38a058ddf4f7b459e1f0c8b7ea05 Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Fri, 10 Mar 2017 21:14:20 +0100 Subject: [PATCH] Show material type in graph --- static/slaveDisplay.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 },