From f6ac2f117e42173105d9603bb97e37f4c8050c48 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Tue, 3 Mar 2020 00:58:06 -0800 Subject: [PATCH] add in the other data lines, and unstack the graph... --- root/js/solardash.base.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/root/js/solardash.base.js b/root/js/solardash.base.js index fdbf472..09eeae4 100644 --- a/root/js/solardash.base.js +++ b/root/js/solardash.base.js @@ -64,8 +64,8 @@ socket.onmessage = function(m) { console.log(data); solarchart.sd_lastwindata = Date.now(); solarchart.series[consumIdx].setData(data.consumption, false); - //solarchart.navigator.series[gridIdx].setData(data.grid, false); - //solarchart.navigator.series[prodIdx].setData(data.production, false); + solarchart.series[gridIdx].setData(data.grid, false); + solarchart.series[prodIdx].setData(data.production, false); solarchart.redraw(); solarchart.hideLoading() } @@ -127,7 +127,7 @@ var solarchart = Highcharts.stockChart('solarchart', { }, plotOptions: { area: { - stacking: 'normal', + //stacking: 'normal', lineColor: '#666666', lineWidth: 1, marker: { @@ -137,11 +137,19 @@ var solarchart = Highcharts.stockChart('solarchart', { } }, series: [ + { + name: 'consumption', + type: 'area', + data: [ ], + }, { name: 'grid', type: 'area', - //gapSize: 0, - //gapUnit: 'value', + data: [ ], + }, + { + name: 'production', + type: 'area', data: [ ], }, ]