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
c1c1bcb8
Commit
c1c1bcb8
authored
Jun 27, 2017
by
Alexander Zobnin
Committed by
Daniel Lee
Jul 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
histogram: don't cut negative values, issue #8628
parent
1da98f5e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
public/app/plugins/panel/graph/graph.ts
+1
-1
public/app/plugins/panel/graph/histogram.ts
+4
-1
No files found.
public/app/plugins/panel/graph/graph.ts
View file @
c1c1bcb8
...
...
@@ -427,7 +427,7 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv, popoverSrv) {
ticks
=
_
.
map
(
data
[
0
].
data
,
point
=>
point
[
0
]);
// Expand ticks for pretty view
min
=
Math
.
max
(
0
,
_
.
min
(
ticks
)
-
bucketSize
)
;
min
=
_
.
min
(
ticks
)
-
bucketSize
;
max
=
_
.
max
(
ticks
)
+
bucketSize
;
ticks
=
[];
...
...
public/app/plugins/panel/graph/histogram.ts
View file @
c1c1bcb8
...
...
@@ -38,9 +38,12 @@ export function convertValuesToHistogram(values: number[], bucketSize: number):
}
}
return
_
.
map
(
histogram
,
(
count
,
bound
)
=>
{
let
histogam_series
=
_
.
map
(
histogram
,
(
count
,
bound
)
=>
{
return
[
Number
(
bound
),
count
];
});
// Sort by Y axis values
return
_
.
sortBy
(
histogam_series
,
point
=>
point
[
0
]);
}
function
getBucketBound
(
value
:
number
,
bucketSize
:
number
):
number
{
...
...
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