From 6348f9ce9fc70ec7ee78e616a5ff282b254e0730 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Wed, 7 Jun 2023 18:44:21 +0200 Subject: [PATCH] [docs] HTML Legend sample: add flex-shrink: 0 to color box (#11330) This way the color box is prevented from shrinking in case of larger legends. --- docs/samples/legend/html.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/samples/legend/html.md b/docs/samples/legend/html.md index d7d643575..00c92c83f 100644 --- a/docs/samples/legend/html.md +++ b/docs/samples/legend/html.md @@ -61,6 +61,7 @@ const htmlLegendPlugin = { boxSpan.style.borderColor = item.strokeStyle; boxSpan.style.borderWidth = item.lineWidth + 'px'; boxSpan.style.display = 'inline-block'; + boxSpan.style.flexShrink = 0; boxSpan.style.height = '20px'; boxSpan.style.marginRight = '10px'; boxSpan.style.width = '20px'; -- 2.47.3