Browse Source

add in the other data lines, and unstack the graph...

main
John-Mark Gurney 4 years ago
parent
commit
f6ac2f117e
1 changed files with 13 additions and 5 deletions
  1. +13
    -5
      root/js/solardash.base.js

+ 13
- 5
root/js/solardash.base.js View File

@@ -64,8 +64,8 @@ socket.onmessage = function(m) {
console.log(data); console.log(data);
solarchart.sd_lastwindata = Date.now(); solarchart.sd_lastwindata = Date.now();
solarchart.series[consumIdx].setData(data.consumption, false); 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.redraw();
solarchart.hideLoading() solarchart.hideLoading()
} }
@@ -127,7 +127,7 @@ var solarchart = Highcharts.stockChart('solarchart', {
}, },
plotOptions: { plotOptions: {
area: { area: {
stacking: 'normal',
//stacking: 'normal',
lineColor: '#666666', lineColor: '#666666',
lineWidth: 1, lineWidth: 1,
marker: { marker: {
@@ -137,11 +137,19 @@ var solarchart = Highcharts.stockChart('solarchart', {
} }
}, },
series: [ series: [
{
name: 'consumption',
type: 'area',
data: [ ],
},
{ {
name: 'grid', name: 'grid',
type: 'area', type: 'area',
//gapSize: 0,
//gapUnit: 'value',
data: [ ],
},
{
name: 'production',
type: 'area',
data: [ ], data: [ ],
}, },
] ]


Loading…
Cancel
Save