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
e0a874f6
Commit
e0a874f6
authored
Feb 22, 2018
by
Alexander Zobnin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
heatmap tooltip: fix bucket bounds for 'tsbuckets' mode
parent
cc34c9a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
public/app/plugins/panel/heatmap/heatmap_tooltip.ts
+12
-4
No files found.
public/app/plugins/panel/heatmap/heatmap_tooltip.ts
View file @
e0a874f6
...
...
@@ -113,10 +113,15 @@ export class HeatmapTooltip {
if
(
yData
)
{
if
(
yData
.
bounds
)
{
// Display 0 if bucket is a special 'zero' bucket
let
bottom
=
yData
.
y
?
yData
.
bounds
.
bottom
:
0
;
boundBottom
=
valueFormatter
(
bottom
);
boundTop
=
valueFormatter
(
yData
.
bounds
.
top
);
if
(
data
.
tsBuckets
)
{
boundBottom
=
data
.
tsBuckets
[
yBucketIndex
];
boundTop
=
yBucketIndex
<
data
.
tsBuckets
.
length
-
1
?
data
.
tsBuckets
[
yBucketIndex
+
1
]
:
''
;
}
else
{
// Display 0 if bucket is a special 'zero' bucket
let
bottom
=
yData
.
y
?
yData
.
bounds
.
bottom
:
0
;
boundBottom
=
valueFormatter
(
bottom
);
boundTop
=
valueFormatter
(
yData
.
bounds
.
top
);
}
valuesNumber
=
valueFormatter
(
yData
.
count
);
tooltipHtml
+=
`<div>
bucket: <b>
${
boundBottom
}
-
${
boundTop
}
</b> <br>
...
...
@@ -163,6 +168,9 @@ export class HeatmapTooltip {
getYBucketIndex
(
offsetY
,
data
)
{
let
y
=
this
.
scope
.
yScale
.
invert
(
offsetY
-
this
.
scope
.
chartTop
);
if
(
data
.
tsBuckets
)
{
return
Math
.
floor
(
y
);
}
let
yBucketIndex
=
getValueBucketBound
(
y
,
data
.
yBucketSize
,
this
.
panel
.
yAxis
.
logBase
);
return
yBucketIndex
;
}
...
...
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