Merge pull request #90 from millmobile/feature/flot-negative-y-axis

Let the y axis of flot chart extend to negative numbers.
This commit is contained in:
Kyle Kingsbury 2015-02-06 11:10:33 -08:00
commit 83e2b87817

View file

@ -6,6 +6,7 @@
this.query = json.query;
this.title = json.title;
this.max = json.max || null;
this.min = json.min || null;
this.graphType = json.graphType || 'line';
this.stackMode = json.stackMode || 'false';
this.lineWidth = json.lineWidth || 1;
@ -94,7 +95,7 @@
},
yaxis: {
font: this.font,
min: 0,
min: this.min,
max: this.max
},
xaxis: {
@ -241,6 +242,7 @@
type: 'Flot',
title: this.title,
query: this.query,
min: this.min,
max: this.max,
timeRange: this.timeRange / 1000,
graphType: this.graphType,
@ -266,6 +268,10 @@
'<textarea type="text" class="query" name="query">{{ query }}</textarea><br />' +
'<label for="timeRange">Time range (s)</label>' +
'<input type="text" name="timeRange" value="{{timeRange / 1000}}" />' +
'<br />' +
'<label for="min">Min</label>' +
'<input type="text" name="min" value="{{min}}" />' +
'<br />' +
'<label for="max">Max</label>' +
'<input type="text" name="max" value="{{max}}" />'
);