|
|
@ -17,43 +17,43 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
var palette = new Rickshaw.Color.Palette({scheme: "classic9"});
|
|
|
|
var palette = new Rickshaw.Color.Palette({scheme: "classic9"});
|
|
|
|
var graphMap = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function drawGraph_connectedcup(from, to) {
|
|
|
|
function drawGraph_connectedcup(from, to) {
|
|
|
|
var devices = $("#connectedcup-details").data("devices");
|
|
|
|
$("#y_axis-temperature").html("");
|
|
|
|
var tzOffset = new Date().getTimezoneOffset() * 60;
|
|
|
|
$("#smoother-temperature").html("");
|
|
|
|
|
|
|
|
$("#legend-temperature").html("");
|
|
|
|
var streamIndex = 0;
|
|
|
|
$("#chart-temperature").html("");
|
|
|
|
var streams = ["temperature", "coffeelevel"];
|
|
|
|
$("#x_axis-temperature").html("");
|
|
|
|
|
|
|
|
$("#slider-temperature").html("");
|
|
|
|
populateGraph();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function populateGraph() {
|
|
|
|
|
|
|
|
if (streamIndex < 2) {
|
|
|
|
|
|
|
|
retrieveDataAndDrawLineGraph(streams[streamIndex], from, to);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
streamIndex++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function clearContent(type) {
|
|
|
|
$("#y_axis-coffeelevel").html("");
|
|
|
|
$("#y_axis-" + type).html("");
|
|
|
|
$("#smoother-coffeelevel").html("");
|
|
|
|
$("#smoother-" + type).html("");
|
|
|
|
$("#legend-coffeelevel").html("");
|
|
|
|
$("#legend-" + type).html("");
|
|
|
|
$("#chart-coffeelevel").html("");
|
|
|
|
$("#chart-" + type).html("");
|
|
|
|
$("#x_axis-coffeelevel").html("");
|
|
|
|
$("#x_axis-" + type).html("");
|
|
|
|
$("#slider-coffeelevel").html("");
|
|
|
|
$("#slider-" + type).html("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function initGraph(type, isMultilined) {
|
|
|
|
var devices = $("#connectedcup-details").data("devices");
|
|
|
|
if (graphMap[type]) {
|
|
|
|
var tzOffset = new Date().getTimezoneOffset() * 60;
|
|
|
|
return graphMap[type];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var chartWrapperElmId = "#connectedcup-div-chart";
|
|
|
|
var chartWrapperElmId = "#connectedcup-div-chart";
|
|
|
|
var graphWidth = $(chartWrapperElmId).width() - 50;
|
|
|
|
var graphWidth = $(chartWrapperElmId).width() - 50;
|
|
|
|
|
|
|
|
var temperatureGraphConfig = {
|
|
|
|
|
|
|
|
element: document.getElementById("chart-temperature"),
|
|
|
|
|
|
|
|
width: graphWidth,
|
|
|
|
|
|
|
|
height: 400,
|
|
|
|
|
|
|
|
strokeWidth: 2,
|
|
|
|
|
|
|
|
renderer: 'line',
|
|
|
|
|
|
|
|
interpolation: "linear",
|
|
|
|
|
|
|
|
unstack: true,
|
|
|
|
|
|
|
|
stack: false,
|
|
|
|
|
|
|
|
xScale: d3.time.scale(),
|
|
|
|
|
|
|
|
padding: {top: 0.2, left: 0.02, right: 0.02, bottom: 0.2},
|
|
|
|
|
|
|
|
series: []
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var graphConfig = {
|
|
|
|
var coffeelevelGraphConfig = {
|
|
|
|
element: document.getElementById("chart-" + type),
|
|
|
|
element: document.getElementById("chart-coffeelevel"),
|
|
|
|
width: graphWidth,
|
|
|
|
width: graphWidth,
|
|
|
|
height: 400,
|
|
|
|
height: 400,
|
|
|
|
strokeWidth: 2,
|
|
|
|
strokeWidth: 2,
|
|
|
@ -68,7 +68,7 @@ function drawGraph_connectedcup(from, to) {
|
|
|
|
|
|
|
|
|
|
|
|
if (devices) {
|
|
|
|
if (devices) {
|
|
|
|
for (var i = 0; i < devices.length; i++) {
|
|
|
|
for (var i = 0; i < devices.length; i++) {
|
|
|
|
graphConfig['series'].push(
|
|
|
|
temperatureGraphConfig['series'].push(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
'color': palette.color(),
|
|
|
|
'color': palette.color(),
|
|
|
|
'data': [{
|
|
|
|
'data': [{
|
|
|
@ -77,37 +77,28 @@ function drawGraph_connectedcup(from, to) {
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
'name': devices[i].name
|
|
|
|
'name': devices[i].name
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
coffeelevelGraphConfig['series'].push(
|
|
|
|
if (isMultilined) {
|
|
|
|
|
|
|
|
graphConfig['series'].push(
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'color': palette.color(),
|
|
|
|
|
|
|
|
'data': [{
|
|
|
|
|
|
|
|
x: parseInt(new Date().getTime() / 1000),
|
|
|
|
|
|
|
|
y: 0
|
|
|
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
'name': "x"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
'color': palette.color(),
|
|
|
|
'color': palette.color(),
|
|
|
|
'data': [{
|
|
|
|
'data': [{
|
|
|
|
x: parseInt(new Date().getTime() / 1000),
|
|
|
|
x: parseInt(new Date().getTime() / 1000),
|
|
|
|
y: 0
|
|
|
|
y: 0
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
'name': "y"
|
|
|
|
'name': devices[i].name
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
temperatureGraphConfig['series'].push(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
'color': palette.color(),
|
|
|
|
'color': palette.color(),
|
|
|
|
'data': [{
|
|
|
|
'data': [{
|
|
|
|
x: parseInt(new Date().getTime() / 1000),
|
|
|
|
x: parseInt(new Date().getTime() / 1000),
|
|
|
|
y: 0
|
|
|
|
y: 0
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
'name': "z"
|
|
|
|
'name': $("#connectedcup-details").data("devicename")
|
|
|
|
}
|
|
|
|
});
|
|
|
|
);
|
|
|
|
coffeelevelGraphConfig['series'].push(
|
|
|
|
} else {
|
|
|
|
|
|
|
|
graphConfig['series'].push(
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
'color': palette.color(),
|
|
|
|
'color': palette.color(),
|
|
|
|
'data': [{
|
|
|
|
'data': [{
|
|
|
@ -117,37 +108,78 @@ function drawGraph_connectedcup(from, to) {
|
|
|
|
'name': $("#connectedcup-details").data("devicename")
|
|
|
|
'name': $("#connectedcup-details").data("devicename")
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var graph = new Rickshaw.Graph(graphConfig);
|
|
|
|
var temperatureGraph = new Rickshaw.Graph(temperatureGraphConfig);
|
|
|
|
graph.render();
|
|
|
|
var coffeelevelGraph = new Rickshaw.Graph(coffeelevelGraphConfig);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
temperatureGraph.render();
|
|
|
|
|
|
|
|
coffeelevelGraph.render
|
|
|
|
|
|
|
|
|
|
|
|
var xAxis = new Rickshaw.Graph.Axis.Time({
|
|
|
|
var xAxisTemepature = new Rickshaw.Graph.Axis.Time({
|
|
|
|
graph: graph
|
|
|
|
graph: temperatureGraph
|
|
|
|
});
|
|
|
|
});
|
|
|
|
xAxis.render();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var yAxis = new Rickshaw.Graph.Axis.Y({
|
|
|
|
xAxisTemepature.render();
|
|
|
|
graph: graph,
|
|
|
|
|
|
|
|
|
|
|
|
var xAxisCoffeelevel = new Rickshaw.Graph.Axis.Time({
|
|
|
|
|
|
|
|
graph: coffeelevelGraph
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xAxisCoffeelevel.render();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var yAxisTemperature = new Rickshaw.Graph.Axis.Y({
|
|
|
|
|
|
|
|
graph: temperatureGraph,
|
|
|
|
orientation: 'left',
|
|
|
|
orientation: 'left',
|
|
|
|
element: document.getElementById("y_axis-" + type),
|
|
|
|
element: document.getElementById("y_axis-temperature"),
|
|
|
|
width: 40,
|
|
|
|
width: 40,
|
|
|
|
height: 410
|
|
|
|
height: 410
|
|
|
|
});
|
|
|
|
});
|
|
|
|
yAxis.render();
|
|
|
|
|
|
|
|
|
|
|
|
yAxisTemperature.render();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var yAxisCoffeelevel = new Rickshaw.Graph.Axis.Y({
|
|
|
|
|
|
|
|
graph: coffeelevelGraph,
|
|
|
|
|
|
|
|
orientation: 'left',
|
|
|
|
|
|
|
|
element: document.getElementById("y_axis-coffeelevel"),
|
|
|
|
|
|
|
|
width: 40,
|
|
|
|
|
|
|
|
height: 410
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yAxisCoffeelevel.render();
|
|
|
|
|
|
|
|
|
|
|
|
var slider = new Rickshaw.Graph.RangeSlider.Preview({
|
|
|
|
var slider = new Rickshaw.Graph.RangeSlider.Preview({
|
|
|
|
graph: graph,
|
|
|
|
graph: temperatureGraph,
|
|
|
|
element: document.getElementById("slider-" + type)
|
|
|
|
element: document.getElementById("slider-temperature")
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var legend = new Rickshaw.Graph.Legend({
|
|
|
|
var legend = new Rickshaw.Graph.Legend({
|
|
|
|
graph: graph,
|
|
|
|
graph: temperatureGraph,
|
|
|
|
element: document.getElementById("legend-" + type)
|
|
|
|
element: document.getElementById('legend-temperature')
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var sliderCoffee = new Rickshaw.Graph.RangeSlider.Preview({
|
|
|
|
|
|
|
|
graph: coffeelevelGraph,
|
|
|
|
|
|
|
|
element: document.getElementById("slider-coffeelevel")
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var legendCoffee = new Rickshaw.Graph.Legend({
|
|
|
|
|
|
|
|
graph: coffeelevelGraph,
|
|
|
|
|
|
|
|
element: document.getElementById('legend-coffeelevel')
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var hoverDetail = new Rickshaw.Graph.HoverDetail({
|
|
|
|
var hoverDetail = new Rickshaw.Graph.HoverDetail({
|
|
|
|
graph: graph,
|
|
|
|
graph: temperatureGraph,
|
|
|
|
|
|
|
|
formatter: function (series, x, y) {
|
|
|
|
|
|
|
|
var date = '<span class="date">' +
|
|
|
|
|
|
|
|
moment((x + tzOffset) * 1000).format('Do MMM YYYY h:mm:ss a') + '</span>';
|
|
|
|
|
|
|
|
var swatch = '<span class="detail_swatch" style="background-color: ' +
|
|
|
|
|
|
|
|
series.color + '"></span>';
|
|
|
|
|
|
|
|
return swatch + series.name + ": " + parseInt(y) + '<br>' + date;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var hoverDetailCoffeelevel = new Rickshaw.Graph.HoverDetail({
|
|
|
|
|
|
|
|
graph: coffeelevelGraph,
|
|
|
|
formatter: function (series, x, y) {
|
|
|
|
formatter: function (series, x, y) {
|
|
|
|
var date = '<span class="date">' +
|
|
|
|
var date = '<span class="date">' +
|
|
|
|
moment((x + tzOffset) * 1000).format('Do MMM YYYY h:mm:ss a') + '</span>';
|
|
|
|
moment((x + tzOffset) * 1000).format('Do MMM YYYY h:mm:ss a') + '</span>';
|
|
|
@ -158,48 +190,59 @@ function drawGraph_connectedcup(from, to) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var shelving = new Rickshaw.Graph.Behavior.Series.Toggle({
|
|
|
|
var shelving = new Rickshaw.Graph.Behavior.Series.Toggle({
|
|
|
|
graph: graph,
|
|
|
|
graph: temperatureGraph,
|
|
|
|
legend: legend
|
|
|
|
legend: legend
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var order = new Rickshaw.Graph.Behavior.Series.Order({
|
|
|
|
var order = new Rickshaw.Graph.Behavior.Series.Order({
|
|
|
|
graph: graph,
|
|
|
|
graph: temperatureGraph,
|
|
|
|
legend: legend
|
|
|
|
legend: legend
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var highlighter = new Rickshaw.Graph.Behavior.Series.Highlight({
|
|
|
|
var highlighter = new Rickshaw.Graph.Behavior.Series.Highlight({
|
|
|
|
graph: graph,
|
|
|
|
graph: temperatureGraph,
|
|
|
|
legend: legend
|
|
|
|
legend: legend
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
graphMap[type] = {};
|
|
|
|
var shelvingCoffee = new Rickshaw.Graph.Behavior.Series.Toggle({
|
|
|
|
graphMap[type].graph = graph;
|
|
|
|
graph: coffeelevelGraph,
|
|
|
|
graphMap[type].config = graphConfig;
|
|
|
|
legend: legendCoffee
|
|
|
|
return graphMap[type];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function retrieveDataAndDrawLineGraph(type, from, to) {
|
|
|
|
var orderCoffee = new Rickshaw.Graph.Behavior.Series.Order({
|
|
|
|
clearContent(type);
|
|
|
|
graph: coffeelevelGraph,
|
|
|
|
|
|
|
|
legend: legendCoffee
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var graphObj = initGraph(type, false);
|
|
|
|
var highlighterCoffee = new Rickshaw.Graph.Behavior.Series.Highlight({
|
|
|
|
var graph = graphObj.graph;
|
|
|
|
graph: coffeelevelGraph,
|
|
|
|
var graphConfig = graphObj.config;
|
|
|
|
legend: legendCoffee
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var deviceIndex = 0;
|
|
|
|
var deviceIndex = 0;
|
|
|
|
|
|
|
|
|
|
|
|
if (devices) {
|
|
|
|
if (devices) {
|
|
|
|
getData();
|
|
|
|
getData();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
var backendApiUrl = $("#connectedcup-div-chart").data("backend-api-url") + type + "?from=" + from + "&to=" + to;
|
|
|
|
var backendApiUrl = $("#connectedcup-div-chart").data("backend-api-url") + "/sensors/temperature" + "?from=" + from + "&to=" + to;
|
|
|
|
var successCallback = function (data) {
|
|
|
|
var successCallback = function (data) {
|
|
|
|
if (data) {
|
|
|
|
if (data) {
|
|
|
|
drawLineGraph(JSON.parse(data));
|
|
|
|
drawTemperatureLineGraph(JSON.parse(data));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
populateGraph();
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
invokerUtil.get(backendApiUrl, successCallback, function (message) {
|
|
|
|
invokerUtil.get(backendApiUrl, successCallback, function (message) {
|
|
|
|
console.log(message);
|
|
|
|
console.log(message);
|
|
|
|
populateGraph();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var coffeeLevelApiUrl = $("#connectedcup-div-chart").data("backend-api-url") + "/sensors/coffeelevel"
|
|
|
|
|
|
|
|
+ "?from=" + from + "&to=" + to;
|
|
|
|
|
|
|
|
var successCallbackCoffeeLevel = function (data) {
|
|
|
|
|
|
|
|
if (data) {
|
|
|
|
|
|
|
|
drawCoffeeLevelLineGraph(JSON.parse(data));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
invokerUtil.get(coffeeLevelApiUrl, successCallbackCoffeeLevel, function (message) {
|
|
|
|
|
|
|
|
console.log(message);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -208,10 +251,11 @@ function drawGraph_connectedcup(from, to) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var backendApiUrl = $("#connectedcup-div-chart").data("backend-api-url") + devices[deviceIndex].deviceIdentifier
|
|
|
|
var backendApiUrl = $("#connectedcup-div-chart").data("backend-api-url") + devices[deviceIndex].deviceIdentifier
|
|
|
|
+ "/sensors/" + type + "?from=" + from + "&to=" + to;
|
|
|
|
+ "/sensors/temperature"
|
|
|
|
|
|
|
|
+ "?from=" + from + "&to=" + to;
|
|
|
|
var successCallback = function (data) {
|
|
|
|
var successCallback = function (data) {
|
|
|
|
if (data) {
|
|
|
|
if (data) {
|
|
|
|
drawLineGraph(JSON.parse(data));
|
|
|
|
drawTemperatureLineGraph(JSON.parse(data));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
deviceIndex++;
|
|
|
|
deviceIndex++;
|
|
|
|
getData();
|
|
|
|
getData();
|
|
|
@ -221,9 +265,20 @@ function drawGraph_connectedcup(from, to) {
|
|
|
|
deviceIndex++;
|
|
|
|
deviceIndex++;
|
|
|
|
getData();
|
|
|
|
getData();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
var coffeeLevelApiUrl = $("#connectedcup-div-chart").data("backend-api-url") + devices[deviceIndex].deviceIdentifier
|
|
|
|
|
|
|
|
+ "/sensors/coffeelevel" + "?from=" + from + "&to=" + to;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var successCallbackCoffeeLevel = function (data) {
|
|
|
|
|
|
|
|
if (data) {
|
|
|
|
|
|
|
|
drawCoffeeLevelLineGraph(JSON.parse(data));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
invokerUtil.get(coffeeLevelApiUrl, successCallbackCoffeeLevel, function (message) {
|
|
|
|
|
|
|
|
console.log(message);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function drawLineGraph(data) {
|
|
|
|
function drawTemperatureLineGraph(data) {
|
|
|
|
if (data.length === 0 || data.length === undefined) {
|
|
|
|
if (data.length === 0 || data.length === undefined) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -233,28 +288,31 @@ function drawGraph_connectedcup(from, to) {
|
|
|
|
chartData.push(
|
|
|
|
chartData.push(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
x: parseInt(data[i].values.time) - tzOffset,
|
|
|
|
x: parseInt(data[i].values.time) - tzOffset,
|
|
|
|
y: parseInt(getFieldData(data[i], type))
|
|
|
|
y: parseInt(data[i].values.temperature)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
graphConfig.series[deviceIndex].data = chartData;
|
|
|
|
temperatureGraphConfig.series[deviceIndex].data = chartData;
|
|
|
|
graph.update();
|
|
|
|
temperatureGraph.update();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getFieldData(data, type) {
|
|
|
|
function drawCoffeeLevelLineGraph(data) {
|
|
|
|
var columnData;
|
|
|
|
if (data.length === 0 || data.length === undefined) {
|
|
|
|
switch (type) {
|
|
|
|
return;
|
|
|
|
case "temperature" :
|
|
|
|
|
|
|
|
columnData = data.values.temperature;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "coffeelevel" :
|
|
|
|
|
|
|
|
columnData = data.values.coffeelevel;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return columnData;
|
|
|
|
var chartData = [];
|
|
|
|
|
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
|
|
|
|
|
chartData.push(
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
x: parseInt(data[i].values.time) - tzOffset,
|
|
|
|
|
|
|
|
y: parseInt(data[i].values.coffeelevel)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
coffeelevelGraphConfig.series[deviceIndex].data = chartData;
|
|
|
|
|
|
|
|
coffeelevelGraph.update();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|