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
180772f1
Commit
180772f1
authored
Apr 10, 2019
by
Alexander Zobnin
Committed by
Torkel Ödegaard
Apr 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Heatmap: Fix empty graph if panel is too narrow (#16460)
Fixes #16378
parent
c0bb1546
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
public/app/plugins/panel/heatmap/rendering.ts
+4
-6
No files found.
public/app/plugins/panel/heatmap/rendering.ts
View file @
180772f1
...
...
@@ -594,7 +594,8 @@ export class HeatmapRenderer {
yGridSize
=
Math
.
floor
((
this
.
yScale
(
1
)
-
this
.
yScale
(
base
))
/
splitFactor
);
}
this
.
cardWidth
=
xGridSize
-
this
.
cardPadding
*
2
;
const
cardWidth
=
xGridSize
-
this
.
cardPadding
*
2
;
this
.
cardWidth
=
Math
.
max
(
cardWidth
,
MIN_CARD_SIZE
);
this
.
cardHeight
=
yGridSize
?
yGridSize
-
this
.
cardPadding
*
2
:
0
;
}
...
...
@@ -611,16 +612,13 @@ export class HeatmapRenderer {
}
getCardWidth
(
d
)
{
let
w
;
let
w
=
this
.
cardWidth
;
if
(
this
.
xScale
(
d
.
x
)
<
0
)
{
// Cut card left to prevent overlay
const
cuttedWidth
=
this
.
xScale
(
d
.
x
)
+
this
.
cardWidth
;
w
=
cuttedWidth
>
0
?
cuttedWidth
:
0
;
w
=
this
.
xScale
(
d
.
x
)
+
this
.
cardWidth
;
}
else
if
(
this
.
xScale
(
d
.
x
)
+
this
.
cardWidth
>
this
.
chartWidth
)
{
// Cut card right to prevent overlay
w
=
this
.
chartWidth
-
this
.
xScale
(
d
.
x
)
-
this
.
cardPadding
;
}
else
{
w
=
this
.
cardWidth
;
}
// Card width should be MIN_CARD_SIZE at least, but cut cards shouldn't be displayed
...
...
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