Commit 0e1c12e6 by Torkel Ödegaard

Merge pull request #3279 from mtanda/override_null

override null point mode
parents 2e9303cb 37b125ca
...@@ -37,6 +37,7 @@ class TimeSeries { ...@@ -37,6 +37,7 @@ class TimeSeries {
yaxis: any; yaxis: any;
zindex: any; zindex: any;
stack: any; stack: any;
nullPointMode: any;
fillBelowTo: any; fillBelowTo: any;
transform: any; transform: any;
...@@ -57,6 +58,7 @@ class TimeSeries { ...@@ -57,6 +58,7 @@ class TimeSeries {
this.bars = {}; this.bars = {};
this.yaxis = 1; this.yaxis = 1;
this.zindex = 0; this.zindex = 0;
this.nullPointMode = null;
delete this.stack; delete this.stack;
for (var i = 0; i < overrides.length; i++) { for (var i = 0; i < overrides.length; i++) {
...@@ -70,6 +72,7 @@ class TimeSeries { ...@@ -70,6 +72,7 @@ class TimeSeries {
if (override.fill !== void 0) { this.lines.fill = translateFillOption(override.fill); } if (override.fill !== void 0) { this.lines.fill = translateFillOption(override.fill); }
if (override.stack !== void 0) { this.stack = override.stack; } if (override.stack !== void 0) { this.stack = override.stack; }
if (override.linewidth !== void 0) { this.lines.lineWidth = override.linewidth; } 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.pointradius !== void 0) { this.points.radius = override.pointradius; }
if (override.steppedLine !== void 0) { this.lines.steps = override.steppedLine; } if (override.steppedLine !== void 0) { this.lines.steps = override.steppedLine; }
if (override.zindex !== void 0) { this.zindex = override.zindex; } if (override.zindex !== void 0) { this.zindex = override.zindex; }
......
...@@ -227,7 +227,7 @@ function (angular, $, moment, _, kbn, GraphTooltip) { ...@@ -227,7 +227,7 @@ function (angular, $, moment, _, kbn, GraphTooltip) {
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
var series = data[i]; var series = data[i];
series.applySeriesOverrides(panel.seriesOverrides); 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 hidden remove points and disable stack
if (scope.hiddenSeries[series.alias]) { if (scope.hiddenSeries[series.alias]) {
......
...@@ -95,6 +95,7 @@ define([ ...@@ -95,6 +95,7 @@ define([
$scope.addOverrideOption('Lines', 'lines', [true, false]); $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 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('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('Fill below to', 'fillBelowTo', $scope.getSeriesNames());
$scope.addOverrideOption('Staircase line', 'steppedLine', [true, false]); $scope.addOverrideOption('Staircase line', 'steppedLine', [true, false]);
$scope.addOverrideOption('Points', 'points', [true, false]); $scope.addOverrideOption('Points', 'points', [true, false]);
......
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