fix: switch sessions chart from stacked to independent areas#560
fix: switch sessions chart from stacked to independent areas#560ColeMurray merged 1 commit intomainfrom
Conversation
Stacked area chart caused misleading visuals — users with 0 sessions on a given day still rendered their stroke on top of other users' data, making them appear as the dominant contributor. Independent areas show each user's line from y=0 so the chart reads correctly. Fill opacity reduced to keep overlapping areas legible.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change modifies the analytics timeseries chart to filter out data series with non-positive total values and removes stacking from area series. The chart rendering becomes less visually dense through reduced gradient opacity, and UI labels are updated to reflect the unstacked visualization. Changes
Possibly related PRs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Terraform Validation Results
Pushed by: @ColeMurray, Action: |
Summary
stackId="sessions"from the timeseries<Area>components so each user gets an independent line from y=0 instead of stacking on top of each otherbuildTimeseriesChartDatato prevent phantom legend entriesProblem: The stacked area chart caused misleading visuals. On any day where a user had 0 sessions, their stroke still rendered on top of the previous user's data at the cumulative height — making it look like they were the dominant contributor (e.g., "Unknown user" appearing as the highest green line despite having 0 sessions).
Fix: Independent (non-stacked) areas. Each user's line directly represents their session count. No stacking confusion, and the chart reads correctly for the typical 1-3 user single-tenant deployment.
Test plan
analytics.test.tspasses (8 tests)Summary by CodeRabbit
Bug Fixes
Style