mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 08:03:13 +09:00
Show material type in graph
This commit is contained in:
1 parent
1f06d3eb48
commit
1fc2de231b
1 file changed
+5
-3
@@ -82,14 +82,13 @@ function generateLineChartArray(data, nameKey) {
|
|||||||
y = 0
|
y = 0
|
||||||
}
|
}
|
||||||
chartData[chartData.length] = {
|
chartData[chartData.length] = {
|
||||||
/*x: new Date(data[i].timestamp),*/
|
x: new Date(data[i].timestamp),
|
||||||
x: new Date(data[i].timestamp),//new Date(2012, 00, i),
|
|
||||||
y: Number(y)
|
y: Number(y)
|
||||||
}
|
}
|
||||||
// console.log(i + " | " + y)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let xyz = {};
|
let xyz = {};
|
||||||
|
xyz.name = nameKey;
|
||||||
xyz.type = "spline";
|
xyz.type = "spline";
|
||||||
xyz.dataPoints = chartData;
|
xyz.dataPoints = chartData;
|
||||||
return xyz;
|
return xyz;
|
||||||
@@ -101,6 +100,9 @@ function drawChart(selector, chartData) {
|
|||||||
title:{
|
title:{
|
||||||
text: "Production graph"
|
text: "Production graph"
|
||||||
},
|
},
|
||||||
|
toolTip:{
|
||||||
|
content: "{name}: {y}"
|
||||||
|
},
|
||||||
axisY:{
|
axisY:{
|
||||||
includeZero: true
|
includeZero: true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user