mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 04:59:15 -06:00
Merge pull request #3279 from mtanda/override_null
override null point mode
This commit is contained in:
commit
0e1c12e65f
@ -37,6 +37,7 @@ class TimeSeries {
|
||||
yaxis: any;
|
||||
zindex: any;
|
||||
stack: any;
|
||||
nullPointMode: any;
|
||||
fillBelowTo: any;
|
||||
transform: any;
|
||||
|
||||
@ -57,6 +58,7 @@ class TimeSeries {
|
||||
this.bars = {};
|
||||
this.yaxis = 1;
|
||||
this.zindex = 0;
|
||||
this.nullPointMode = null;
|
||||
delete this.stack;
|
||||
|
||||
for (var i = 0; i < overrides.length; i++) {
|
||||
@ -70,6 +72,7 @@ class TimeSeries {
|
||||
if (override.fill !== void 0) { this.lines.fill = translateFillOption(override.fill); }
|
||||
if (override.stack !== void 0) { this.stack = override.stack; }
|
||||
if (override.linewidth !== void 0) { this.lines.lineWidth = override.linewidth; }
|
||||
if (override.nullPointMode !== void 0) { this.nullPointMode = override.nullPointMode; }
|
||||
if (override.pointradius !== void 0) { this.points.radius = override.pointradius; }
|
||||
if (override.steppedLine !== void 0) { this.lines.steps = override.steppedLine; }
|
||||
if (override.zindex !== void 0) { this.zindex = override.zindex; }
|
||||
|
@ -227,7 +227,7 @@ function (angular, $, moment, _, kbn, GraphTooltip) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var series = data[i];
|
||||
series.applySeriesOverrides(panel.seriesOverrides);
|
||||
series.data = series.getFlotPairs(panel.nullPointMode, panel.y_formats);
|
||||
series.data = series.getFlotPairs(series.nullPointMode || panel.nullPointMode, panel.y_formats);
|
||||
|
||||
// if hidden remove points and disable stack
|
||||
if (scope.hiddenSeries[series.alias]) {
|
||||
|
@ -95,6 +95,7 @@ define([
|
||||
$scope.addOverrideOption('Lines', 'lines', [true, false]);
|
||||
$scope.addOverrideOption('Line fill', 'fill', [0,1,2,3,4,5,6,7,8,9,10]);
|
||||
$scope.addOverrideOption('Line width', 'linewidth', [0,1,2,3,4,5,6,7,8,9,10]);
|
||||
$scope.addOverrideOption('Null point mode', 'nullPointMode', ['connected', 'null', 'null as zero']);
|
||||
$scope.addOverrideOption('Fill below to', 'fillBelowTo', $scope.getSeriesNames());
|
||||
$scope.addOverrideOption('Staircase line', 'steppedLine', [true, false]);
|
||||
$scope.addOverrideOption('Points', 'points', [true, false]);
|
||||
|
Loading…
Reference in New Issue
Block a user