From: Frans de Jonge Date: Wed, 7 Jun 2023 16:44:21 +0000 (+0200) Subject: [docs] HTML Legend sample: add flex-shrink: 0 to color box (#11330) X-Git-Tag: v4.3.1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6348f9ce9fc70ec7ee78e616a5ff282b254e0730;p=thirdparty%2FChart.js.git [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. --- 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';