Add support for nullPointMode

Change-Id: Iedc5eec1ad06498a191b342cc70ce4424741e16f
This commit is contained in:
James E. Blair 2016-01-07 14:07:26 -08:00
parent 17e53a824d
commit 36682378fc
3 changed files with 53 additions and 0 deletions

View File

@ -84,6 +84,8 @@ class Graph(Base):
y_formats = [y_format]
null_point_modes = v.Any('connected', 'null', 'null as zero')
graph = {
v.Required('bars', default=False): v.All(bool),
v.Required('fill', default=1): v.All(int),
@ -97,6 +99,7 @@ class Graph(Base):
v.Required('targets', default=[]): v.All(list),
v.Required('x-axis', default=True): v.All(bool),
v.Required('y-axis', default=True): v.All(bool),
v.Optional('nullPointMode'): v.All(null_point_modes),
v.Optional('leftYAxisLabel'): v.All(str, v.Length(min=1)),
v.Optional('rightYAxisLabel'): v.All(str, v.Length(min=1)),
v.Optional('y_formats'): v.All(y_formats, v.Length(min=2, max=2)),

View File

@ -0,0 +1,39 @@
{
"dashboard": {
"new-dashboard": {
"rows": [
{
"collapse": false,
"editable": true,
"height": "250px",
"panels": [
{
"bars": false,
"editable": true,
"error": false,
"fill": 1,
"lines": true,
"linewidth": 2,
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [],
"title": "no title (click here)",
"type": "graph",
"x-axis": true,
"y-axis": true
}
],
"showTitle": false,
"title": "New row"
}
],
"timezone": "utc",
"title": "New dashboard"
}
}
}

View File

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
dashboard:
title: New dashboard
rows:
- title: New row
height: 250px
panels:
- title: no title (click here)
type: graph
nullPointMode: null as zero