@cryptotaxi247 / netdata-1 / commits / 959255cce

increased legends width to 120px; restored legend indicators of graph type

Costa Tsaousis (ktsaou) committed Dec 23, 2015 at 22:59 UTC 959255cce40e84123c52ef8a0401a121a6e8ca87
2 files changed +11 -13
web/dashboard.css
+6 -6
@@ -74,8 +74,8 @@ html {
74 text-overflow: ellipsis;
75 line-height: 14px;
76 display: block;
77 - width: 110px;
78 - height: calc(100% - 15px); /* 10px for the resize handler and 5px for the top margin */
77 + width: 120px; /* --legend-width */
78 + height: calc(100% - 15px); /* 10px for the resize handler and 5px for the top margin */
79 font-size: 10px;
80 margin-top: 5px;
81 /* width and height is calculated (depends on the appearance of the legend) */
@@ -102,7 +102,7 @@ html {
102 }
103 .netdata-legend-series {
104 position: absolute;
105 - width: 110px;
105 + width: 120px; /* --legend-width */
106 height: calc(100% - 50px);
107 overflow: hidden;
108 text-overflow: ellipsis;
@@ -166,7 +166,7 @@ html {
166 .netdata-legend-name-table-line {
167 display: inline-block;
168 width: 13px;
169 - height: 3px;
169 + height: 4px;
170 border-width: 0px;
171 border-bottom-width: 2px;
172 border-bottom-style: solid;
@@ -244,8 +244,8 @@ html {
244 left: 0; /* within .netdata-container */
245 display: block;
246 overflow: hidden;
247 - margin-right: 110px;
248 - width: calc(100% - 110px); /* for the legend */
247 + margin-right: 120px; /* --legend-width */
248 + width: calc(100% - 120px); /* --legend-width */
249 height: 100%;
250 flex-grow: 1;
251
web/dashboard.js
+5 -7
@@ -207,11 +207,9 @@
207
208 smooth_plot: true, // enable smooth plot, where possible
209
210 - color_fill_opacity: {
211 - line: 1.0,
212 - area: 0.2,
213 - stacked: 0.8
214 - },
210 + color_fill_opacity_line: 1.0,
211 + color_fill_opacity_area: 0.2,
212 + color_fill_opacity_stacked: 0.8,
213
214 set_option_callback: function() { ; }
215 },
@@ -265,7 +263,7 @@
263 break;
264
265 case 'number':
268 - var n = parseInt(value);
266 + var n = parseFloat(value);
267 if(isNaN(n) === false) {
268 obj[i] = n;
269 // console.log('read ' + prefix + '.' + i.toString() + ' = ' + obj[i].toString());
@@ -1338,7 +1336,7 @@
1336 label.name.innerHTML = '<table class="netdata-legend-name-table-'
1337 + state.chart.chart_type
1338 + '" style="background-color: '
1341 - + 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + NETDATA.options.current.color_fill_opacity[state.chart.chart_type] + ')'
1339 + + 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + NETDATA.options.current['color_fill_opacity_' + state.chart.chart_type] + ')'
1340 + '"><tr class="netdata-legend-name-tr"><td class="netdata-legend-name-td"></td></tr></table>'
1341
1342 var text = document.createTextNode(' ' + name);