From de76ce6e4eeae4b6d4549bc603fb43dfbb91a46c Mon Sep 17 00:00:00 2001 From: Jonathan Van Buren Date: Thu, 5 Aug 2021 10:32:13 +0800 Subject: [PATCH] Allow fontweight set in theme to effect canvas axes --- packages/axes/src/canvas.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/axes/src/canvas.ts b/packages/axes/src/canvas.ts index 70b52b754..9e3b360f0 100644 --- a/packages/axes/src/canvas.ts +++ b/packages/axes/src/canvas.ts @@ -65,7 +65,9 @@ export const renderAxisToCanvas = ( ctx.textAlign = textAlign ctx.textBaseline = textBaseline - ctx.font = `${theme.axis.ticks.text.fontSize}px ${theme.axis.ticks.text.fontFamily}` + ctx.font = `${theme.axis.ticks.text.fontWeight ? `${theme.axis.ticks.text.fontWeight} ` : ''}${ + theme.axis.ticks.text.fontSize + }px ${theme.axis.ticks.text.fontFamily}` if ((theme.axis.domain.line.strokeWidth ?? 0) > 0) { ctx.lineWidth = Number(theme.axis.domain.line.strokeWidth)