From a31e1e59d6c33883b2932b422abaabf3a2340074 Mon Sep 17 00:00:00 2001 From: Dominic Jean Date: Fri, 29 Jul 2022 09:40:28 -0400 Subject: [PATCH] pass boxWidth only if pointStyleWidth presents (#10524) --- src/plugins/plugin.legend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/plugin.legend.js b/src/plugins/plugin.legend.js index 7c67cb52def..936111d848f 100644 --- a/src/plugins/plugin.legend.js +++ b/src/plugins/plugin.legend.js @@ -325,7 +325,7 @@ export class Legend extends Element { const centerY = y + halfFontSize; // Draw pointStyle as legend symbol - drawPointLegend(ctx, drawOptions, centerX, centerY, boxWidth); + drawPointLegend(ctx, drawOptions, centerX, centerY, labelOpts.pointStyleWidth && boxWidth); } else { // Draw box as legend symbol // Adjust position when boxHeight < fontSize (want it centered)