Skip to content

Commit 56e9695

Browse files
authored
fix(chart & heatmap): make to fix that y label is rendering out of bounds (#20011)
1 parent e766f8c commit 56e9695

File tree

1 file changed

+2
-1
lines changed
  • superset-frontend/plugins/legacy-plugin-chart-heatmap/src

1 file changed

+2
-1
lines changed

superset-frontend/plugins/legacy-plugin-chart-heatmap/src/Heatmap.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function Heatmap(element, props) {
111111
let showY = true;
112112
let showX = true;
113113
const pixelsPerCharX = 4.5; // approx, depends on font size
114-
const pixelsPerCharY = 6; // approx, depends on font size
114+
let pixelsPerCharY = 6; // approx, depends on font size
115115

116116
const valueFormatter = getNumberFormatter(numberFormat);
117117

@@ -121,6 +121,7 @@ function Heatmap(element, props) {
121121
let longestY = 1;
122122

123123
records.forEach(datum => {
124+
if (typeof datum.y === 'number') pixelsPerCharY = 7;
124125
longestX = Math.max(
125126
longestX,
126127
(datum.x && datum.x.toString().length) || 1,

0 commit comments

Comments
 (0)