mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
fix(insights): give the mood distribution chart a zero-bucket track
A mood level with no days painted a zero-height bar with no affordance, reading as missing rather than "0". Add a faint full-height track behind each bar so empty buckets stay legible; the coloured bar paints over the track for the populated levels.
This commit is contained in:
1 parent
bd0b284201
commit
b10569dc44
1 file changed
+9
-1
@@ -85,7 +85,15 @@ export function MoodDistributionChart({
|
||||
] as [string, string]
|
||||
}
|
||||
/>
|
||||
<Bar dataKey="count" radius={[3, 3, 0, 0]}>
|
||||
<Bar
|
||||
dataKey="count"
|
||||
radius={[3, 3, 0, 0]}
|
||||
// v1.8.5 — faint full-height track behind each bar so a
|
||||
// zero-count level still reads as a present "0" bucket rather
|
||||
// than a missing slot. The coloured bar paints over the track
|
||||
// for non-empty levels.
|
||||
background={{ fill: "var(--secondary)", opacity: 0.35, radius: 3 }}
|
||||
>
|
||||
{data.map((row) => (
|
||||
<Cell
|
||||
key={row.score}
|
||||
|
||||
Reference in new issue
Block a user