Skip to content

Commit 0b9889a

Browse files
committed
adopts the new monospace relative width (#1880)
(tested by http://localhost:8008/?test=marginsMonospace)
1 parent e1dbe2c commit 0b9889a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/dimensions.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ export function autoMarginK(
2828
if (scale === "y" || scale === "fy") {
2929
const width = mark.monospace ? monospaceWidth : defaultWidth;
3030
const labelPenalty = actualLabel && (labelAnchor === "center" || (labelAnchor == null && scales[scale].bandwidth));
31-
const l =
32-
max(channels.text.value, (t) => (t ? width(`${t}`) : NaN)) * (mark.monospace ? 0.6 : 1) +
33-
(labelPenalty ? 100 : 0);
31+
const l = max(channels.text.value, (t) => (t ? width(`${t}`) : NaN)) + (labelPenalty ? 100 : 0);
3432
const m = l >= 500 ? marginLarge : l >= 295 ? marginMedium : null;
3533
return m === null
3634
? options

0 commit comments

Comments
 (0)