diff --git a/src/api/static/js/dashboard.js b/src/api/static/js/dashboard.js index d23c91c..a3338d1 100755 --- a/src/api/static/js/dashboard.js +++ b/src/api/static/js/dashboard.js @@ -34,13 +34,17 @@ dashboard = { // monitoring apps chart var dataChart = { labels: ['24','23','22','21','20','19','18','17','16','15','14','13','12','11','10','9','8','7','6','5','4','3','2','1' ], - series: [cpu, memory_used, [1,2,3,50], ] // TODO: Check the order, the graph is by index not name. + series: [cpu, memory_used, [1,2,3,5], ] // TODO: Check the order, the graph is by index not name. }; + dataChartArray = dataChart.series + var maxlist = dataChartArray.map(dataChartArray => Math.max.apply(null, dataChartArray)); + maxNum = Math.max.apply(null, maxlist) + var optionsChart = { lineSmooth: false, low: 0, - high: 10, + high: maxNum + 1, showArea: true, height: "245px", axisX: { diff --git a/src/api/templates/dashboard.html b/src/api/templates/dashboard.html index 904e291..02edef5 100644 --- a/src/api/templates/dashboard.html +++ b/src/api/templates/dashboard.html @@ -301,7 +301,6 @@