Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(board): render the Words-over-time chart (Recharts empty-fill on 0x0 initial measure)

Ruben Lütkee85523eece6f
diff --git a/jarvis/ui/web/frontend/src/components/board/WordsTrendChart.tsx b/jarvis/ui/web/frontend/src/components/board/WordsTrendChart.tsx
index ebbc8b5ca2..0cdd14469e 100644
--- a/jarvis/ui/web/frontend/src/components/board/WordsTrendChart.tsx
+++ b/jarvis/ui/web/frontend/src/components/board/WordsTrendChart.tsx
@@ -52,7 +52,11 @@ export function WordsTrendChart({ cells, days = 45 }: WordsTrendChartProps) {
}
return (
- <ResponsiveContainer width="100%" height="100%">
+ // minHeight guards the Recharts width/height(-1) initial-measure race in a
+ // grid/flex parent: without a positive floor the first measure is 0×0, the
+ // Area paths bake in a collapsed scale, and the ResizeObserver re-measure
+ // recovers the axes but not the (animated) fills — leaving an empty chart.
+ <ResponsiveContainer width="100%" height="100%" minHeight={176}>
<AreaChart data={data} margin={{ top: 6, right: 2, bottom: 0, left: 2 }}>
<defs>
<linearGradient id="board-grad-you" x1="0" y1="0" x2="0" y2="1">
@@ -85,6 +89,7 @@ export function WordsTrendChart({ cells, days = 45 }: WordsTrendChartProps) {
strokeWidth={1.5}
fill="url(#board-grad-jarvis)"
activeDot={{ r: 3, strokeWidth: 0 }}
+ isAnimationActive={false}
/>
<Area
type="monotone"
@@ -93,6 +98,7 @@ export function WordsTrendChart({ cells, days = 45 }: WordsTrendChartProps) {
strokeWidth={1.75}
fill="url(#board-grad-you)"
activeDot={{ r: 3, strokeWidth: 0 }}
+ isAnimationActive={false}
/>
</AreaChart>
</ResponsiveContainer>