Merge pull request #56 from benagricola/master
Add y-axis 'max' configuration option for flot
This commit is contained in:
commit
dc31aaf4ab
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
view.View.call(this, json);
|
||||
this.query = json.query;
|
||||
this.title = json.title;
|
||||
this.max = json.max || null;
|
||||
this.graphType = json.graphType || 'line';
|
||||
this.stackMode = json.stackMode || 'false';
|
||||
this.lineWidth = json.lineWidth || 1;
|
||||
|
@ -94,6 +95,7 @@
|
|||
yaxis: {
|
||||
font: this.font,
|
||||
min: 0,
|
||||
max: this.max
|
||||
},
|
||||
xaxis: {
|
||||
font: this.font,
|
||||
|
@ -239,6 +241,7 @@
|
|||
type: 'Flot',
|
||||
title: this.title,
|
||||
query: this.query,
|
||||
max: this.max,
|
||||
timeRange: this.timeRange / 1000,
|
||||
graphType: this.graphType,
|
||||
stackMode: this.stackMode
|
||||
|
@ -262,7 +265,9 @@
|
|||
'<label for="query">query</label>' +
|
||||
'<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}}" />'
|
||||
'<input type="text" name="timeRange" value="{{timeRange / 1000}}" />' +
|
||||
'<label for="max">Max</label>' +
|
||||
'<input type="text" name="max" value="{{max}}" />'
|
||||
);
|
||||
|
||||
// Returns the edit form
|
||||
|
|
Loading…
Reference in a new issue