You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(plugin-charts): draw dashboard chart bars on first paint via isAnimationActive=false (#2756) (#2759)
#2727's settle re-mount tried to *heal* a frozen Recharts entrance
animation by re-mounting the ResponsiveContainer once the grid settled.
Live (react-grid-layout) that bet doesn't hold: the re-mount can land
back in mount-time measurement churn, so the rAF tween — which starts at
height 0 — stays stuck there and bars never draw, though axes/labels and
the data are present. Reproduced in a real browser on the showcase Chart
Gallery dashboard: pre-fix, bars sit at ~0 for 8s+; identical to the
reported magic-flow symptom.
Fix: dashboard chart widgets render with isAnimationActive={false}, so
there is no entrance-animation tween to freeze — bars render at final
geometry on the first committed frame, deterministically. With the
animation off there is nothing to heal, so ChartContainer skips its
settle re-mount (new disableSettleRemount prop), avoiding a needless
1-frame ResponsiveContainer reflow on first paint.
Every dashboard chart schema carries the flag (DatasetWidget +
DashboardRenderer + DashboardGridLayout, both chart and object-chart);
AdvancedChartImpl now honors isAnimationActive uniformly across
bar/line/area/pie/funnel/treemap/radar/scatter (funnel/treemap/radar/
scatter previously hard-coded animation on). Standalone chart views keep
their entrance animation.
Verified end-to-end in a real browser (worktree console → live backend):
before = frozen empty bars after 8s, after = bars drawn on first paint,
zero console errors, deterministic across fresh navigations and a fresh
tab. plugin-charts + plugin-dashboard: 156 tests pass; both type-check.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments