Commit b5d378c4 by Torkel Ödegaard

Merge branch 'master' into dashboard_loading_refactoring

parents 5c78fe10 145d65fd
...@@ -11,7 +11,7 @@ vNext ...@@ -11,7 +11,7 @@ vNext
**Fixes** **Fixes**
- Fix formatting negative values (PR #545) - Fix formatting negative values (PR #545)
- Fix for Max legend value when max value is zero (Issue #460)
# 1.6.1 (2014-06-24) # 1.6.1 (2014-06-24)
......
...@@ -340,7 +340,7 @@ function (angular, $, kbn, moment, _) { ...@@ -340,7 +340,7 @@ function (angular, $, kbn, moment, _) {
if (seriesInfo.alias) { if (seriesInfo.alias) {
group = '<small style="font-size:0.9em;">' + group = '<small style="font-size:0.9em;">' +
'<i class="icon-circle" style="color:'+item.series.color+';"></i>' + ' ' + '<i class="icon-circle" style="color:'+item.series.color+';"></i>' + ' ' +
(decodeURIComponent(seriesInfo.alias)) + seriesInfo.alias +
'</small><br>'; '</small><br>';
} else { } else {
group = kbn.query_color_dot(item.series.color, 15) + ' '; group = kbn.query_color_dot(item.series.color, 15) + ' ';
......
...@@ -3,28 +3,6 @@ ...@@ -3,28 +3,6 @@
style="min-height:{{panel.height || row.height}}" style="min-height:{{panel.height || row.height}}"
ng-class="{'panel-fullscreen': fullscreen}"> ng-class="{'panel-fullscreen': fullscreen}">
<!-- <table style="width: 100%">
<tr>
<td style="width: 100%">
<div style="position: relative">
<div ng-if="datapointsWarning" class="datapoints-warning">
<span class="small" ng-show="!datapointsCount">No datapoints <tip>Can be caused by timezone mismatch between browser and graphite server</tip></span>
<span class="small" ng-show="datapointsOutside">Datapoints outside time range <tip>Can be caused by timezone mismatch between browser and graphite server</tip></span>
</div>
<div grafana-graph class="pointer histogram-chart">
</div>
</div>
</td>
<td>
<div ng-if="panel.legend.show" ng-include="'app/panels/graph/legend.html'">
</div>
</td>
</tr>
</table> -->
<div class="graph-wrapper" ng-class="{'graph-legend-rightside': panel.legend.rightSide}"> <div class="graph-wrapper" ng-class="{'graph-legend-rightside': panel.legend.rightSide}">
<div class="graph-canvas-wrapper"> <div class="graph-canvas-wrapper">
......
...@@ -20,17 +20,21 @@ function (_, kbn) { ...@@ -20,17 +20,21 @@ function (_, kbn) {
this.yaxis = this.info.yaxis; this.yaxis = this.info.yaxis;
this.info.total = 0; this.info.total = 0;
this.info.max = null; this.info.max = -212312321312;
this.info.min = 212312321312; this.info.min = 212312321312;
_.each(this.datapoints, function(valueArray) { var ignoreNulls = fillStyle === 'connected';
var currentTime = valueArray[1]; var nullAsZero = fillStyle === 'null as zero';
var currentValue = valueArray[0]; var currentTime;
var currentValue;
for (var i = 0; i < this.datapoints.length; i++) {
currentValue = this.datapoints[i][0];
currentTime = this.datapoints[i][1];
if (currentValue === null) { if (currentValue === null) {
if (fillStyle === 'connected') { if (ignoreNulls) { continue; }
return; if (nullAsZero) {
}
if (fillStyle === 'null as zero') {
currentValue = 0; currentValue = 0;
} }
} }
...@@ -48,7 +52,7 @@ function (_, kbn) { ...@@ -48,7 +52,7 @@ function (_, kbn) {
} }
result.push([currentTime * 1000, currentValue]); result.push([currentTime * 1000, currentValue]);
}, this); }
if (result.length > 2) { if (result.length > 2) {
this.info.timeStep = result[1][0] - result[0][0]; this.info.timeStep = result[1][0] - result[0][0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment