Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
db0a5bd5
Commit
db0a5bd5
authored
Oct 10, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph: fix for legend values min & max, avg & current when series only has null values, Closes #923
parent
c6cb01aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/app/components/timeSeries.js
+7
-2
No files found.
src/app/components/timeSeries.js
View file @
db0a5bd5
...
...
@@ -63,8 +63,10 @@ function (_, kbn) {
this
.
yaxis
=
this
.
info
.
yaxis
;
this
.
stats
.
total
=
0
;
this
.
stats
.
max
=
-
212312321312
;
this
.
stats
.
min
=
212312321312
;
this
.
stats
.
max
=
Number
.
MIN_VALUE
;
this
.
stats
.
min
=
Number
.
MAX_VALUE
;
this
.
stats
.
avg
=
null
;
this
.
stats
.
current
=
null
;
var
ignoreNulls
=
fillStyle
===
'connected'
;
var
nullAsZero
=
fillStyle
===
'null as zero'
;
...
...
@@ -101,6 +103,9 @@ function (_, kbn) {
this
.
stats
.
timeStep
=
result
[
1
][
0
]
-
result
[
0
][
0
];
}
if
(
this
.
stats
.
max
===
Number
.
MIN_VALUE
)
{
this
.
stats
.
max
=
null
;
}
if
(
this
.
stats
.
min
===
Number
.
MAX_VALUE
)
{
this
.
stats
.
min
=
null
;
}
if
(
result
.
length
)
{
this
.
stats
.
avg
=
(
this
.
stats
.
total
/
result
.
length
);
this
.
stats
.
current
=
result
[
result
.
length
-
1
][
1
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment