From 10ba8a05c4039574b67121d72d3ae9ad49203cdf Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Tue, 6 Jun 2023 16:42:56 +0200 Subject: [PATCH] [docs] HTML Legend sample: add flex-shrink: 0 to color box 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 d7d64357560..00c92c83fb2 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';