From 106a46eae794b784a60a809e0ae75d8fd7242a47 Mon Sep 17 00:00:00 2001 From: dalley Date: Thu, 11 Jun 2026 16:47:58 -0500 Subject: [PATCH] fix(chart): don't render bars without a computed layout position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A task whose date normalization was skipped — an unscheduled task, or any task without a start date — never gets numeric $x/$w coordinates. The layout math leaves them NaN, taskStyle() then emits left/width values like "NaNpx", the browser rejects the invalid declarations, and a ghost bar renders at the chart origin, auto-sized by its own label text. To a user this reads as a real (and very wrong) schedule. Repro: add a task with no start/end to any demo dataset — a bar appears at the chart start whose 'duration' is the pixel length of its title. Guard the main bar and the baseline bar on Number.isFinite of their computed positions: the row still appears in the grid, but nothing is painted on the timeline until the task has real coordinates. --- src/components/chart/Bars.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/chart/Bars.jsx b/src/components/chart/Bars.jsx index 0b0a7e0..4ccdf80 100644 --- a/src/components/chart/Bars.jsx +++ b/src/components/chart/Bars.jsx @@ -662,7 +662,7 @@ function Bars(props) { (isTaskCritical(task) ? ' wx-critical' : ''); return ( - {!task.$skip && ( + {!task.$skip && Number.isFinite(task.$x) && (
)) : null} - {baselinesValue && !task.$skip_baseline ? ( + {baselinesValue && !task.$skip_baseline && Number.isFinite(task.$x_base) ? (