From 11662e18b397a516bbb0c342bdfb23dd5f94922e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Ny=C3=ADri?= Date: Fri, 12 Jan 2024 19:59:46 +0100 Subject: [PATCH] TimelineChart: Fix rendering of small boxes (#72775) (#80420) --- public/app/core/components/TimelineChart/timeline.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/app/core/components/TimelineChart/timeline.ts b/public/app/core/components/TimelineChart/timeline.ts index 442c2679a28..7d7dc8406d2 100644 --- a/public/app/core/components/TimelineChart/timeline.ts +++ b/public/app/core/components/TimelineChart/timeline.ts @@ -133,10 +133,8 @@ export function getConfig(opts: TimelineCoreOptions) { value: number | null, discrete: boolean ) { - // do not render super small boxes - if (boxWidth < 1) { - return; - } + // clamp width to allow small boxes to be rendered + boxWidth = Math.max(1, boxWidth); const valueColor = getValueColor(seriesIdx + 1, value); const fieldConfig = getFieldConfig(seriesIdx);