mirror of
https://github.com/supabase/supabase.git
synced 2026-09-10 03:51:51 +08:00
Line-style report charts (auth processing time, percentiles, edge functions, realtime, etc.) hardcoded `stackId="1"` on every `<Area>`, so recharts summed the series additively instead of overlaying them. When multiple series share a value (e.g. Max/Min/Avg all `153.98`), they rendered as three stacked bands at 1x/2x/3x the value, even though the tooltip showed the true identical values. ## Fix Default each area to its own `stackId` (its attribute name) so series overlay, while still honoring an explicit per-attribute `stackId` from config — matching the existing bar-chart path directly above it. `normalizeVisibleStackToPercent`, the only flag that would make stacked areas intentional, is never enabled anywhere. ## Before / after Before: three equal values drawn at `0→153.98`, `153.98→307.96`, `307.96→461.94`. After: all three overlay at `153.98`. Affects every line-style multi-series report, not just auth. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved stacked chart behavior by consistently applying configured series stacking settings. - Ensured area charts can overlay correctly when no explicit stacking configuration is provided. - Added safeguards for missing or invalid chart attribute data. - **Tests** - Added coverage for configured stack IDs, fallback behavior, empty values, and invalid inputs. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2.3 KiB
2.3 KiB