fix(retention): show all series values in the chart tooltip#60768
Merged
Conversation
The retention line/bar chart tooltip listed every series but showed a value
for only one of them ("–" for the rest) when broken down (e.g. by browser).
RetentionTooltip set `breakdown_value` on every row, which flips InsightTooltip
into its breakdown-column pivot — one column per series — so each series only
has a value in its own column and "–" everywhere else. Each retention series is
already its own row and carries its breakdown value in `label`, so drop
`breakdown_value` and let the simple row layout render label + value per series.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Size Change: 0 B Total Size: 80.8 MB ℹ️ View Unchanged
|
Contributor
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
Contributor
|
Reviews (1): Last reviewed commit: "Merge branch 'master' into sam/fix-reten..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The retention line/bar chart tooltip lists every series but shows a value for only one of them —
–for the rest — when the insight is broken down (e.g. by browser). The legacy chart.js tooltip shows all of them.Changes
RetentionTooltipno longer setsbreakdown_valueon its rows. Setting it flippedInsightTooltipinto its breakdown-column pivot (one column per series), so each series only had a value in its own column and–in every other cell. Each retention series is already its own row and carries its breakdown value inlabel, so the simple row layout renders label + value per series correctly.How did you test this code?
I'm an agent (Claude Code). Traced the dash back to
InsightTooltip'sitemizeEntitiesAsColumnsbranch (triggered by a row'sbreakdown_value) and confirmed the non-itemized path renderslabel+countwithout needingbreakdown_value. No automated test covers this tooltip path; the change is a one-field removal in the seriesData mapping. Not yet verified in a running app.Automatic notifications
🤖 Agent context
Authored with Claude Code (Opus 4.8). The breakdown case was the only one affected — for non-breakdown retention
breakdown_valuewas alreadyundefined, so itemization never triggered and that path is unchanged. Agent-assisted; requires human review.