Skip to content

Commit

Permalink
fix(chart & heatmap): make to fix that y label is rendering out of bo…
Browse files Browse the repository at this point in the history
…unds (#20011)
  • Loading branch information
prosdev0107 authored May 20, 2022
1 parent e766f8c commit 56e9695
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function Heatmap(element, props) {
let showY = true;
let showX = true;
const pixelsPerCharX = 4.5; // approx, depends on font size
const pixelsPerCharY = 6; // approx, depends on font size
let pixelsPerCharY = 6; // approx, depends on font size

const valueFormatter = getNumberFormatter(numberFormat);

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

records.forEach(datum => {
if (typeof datum.y === 'number') pixelsPerCharY = 7;
longestX = Math.max(
longestX,
(datum.x && datum.x.toString().length) || 1,
Expand Down

0 comments on commit 56e9695

Please sign in to comment.