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
e58e9176
Commit
e58e9176
authored
Dec 11, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #742 from yamakatu/master
Fix for #741. add no zero filling option to histogram
parents
4384772d
43b844fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/app/panels/histogram/timeSeries.js
+18
-0
No files found.
src/app/panels/histogram/timeSeries.js
View file @
e58e9176
...
...
@@ -101,6 +101,8 @@ function (_, Interval) {
strategy
=
this
.
_getAllFlotPairs
;
}
else
if
(
this
.
opts
.
fill_style
===
'null'
)
{
strategy
=
this
.
_getNullFlotPairs
;
}
else
if
(
this
.
opts
.
fill_style
===
'no'
)
{
strategy
=
this
.
_getNoZeroFlotPairs
;
}
else
{
strategy
=
this
.
_getMinFlotPairs
;
}
...
...
@@ -211,6 +213,21 @@ function (_, Interval) {
return
result
;
};
/**
* ** called as a reduce stragegy in getFlotPairs() **
* Not fill zero's on either side of the current time, only the current time
* @return {array} An array of points to plot with flot
*/
ts
.
ZeroFilled
.
prototype
.
_getNoZeroFlotPairs
=
function
(
result
,
time
,
i
,
times
)
{
var
next
,
expected_next
,
prev
,
expected_prev
;
// add the current time
if
(
this
.
_data
[
time
]){
result
.
push
([
time
,
this
.
_data
[
time
]]);
}
return
result
;
};
return
ts
;
});
\ No newline at end of file
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