posthog icon indicating copy to clipboard operation
posthog copied to clipboard

fix: Pie chart was behaving poorly with null or other breakdown values

Open aspicer opened this issue 9 months ago • 1 comments

https://posthog.slack.com/archives/C0368RPHLQH/p1714468798325329

We are doing a special sort order in trendsDataLogic to put bad breakdowns at the end of the list and return the value as indexedResults We were sorting indexedResults again in updateData for the Pie Chart. This undid the special sorting we were doing in trends data logic to put null or other breakdowns at the end of the list.

A second bug was discovered here and fixed, which was that the new /query endpoints would return some other more readable strings for label, so we lost our special sorting logic with the hogql switch. Change the sort to look at the "breakdown_value" instead.

Old (bug) https://github.com/PostHog/posthog/assets/1855120/bf0d4cfb-bd27-4b66-88b6-2f8b63d43681

New https://github.com/PostHog/posthog/assets/1855120/c560953b-47d3-4f1a-8ddf-11af1e86addc

aspicer avatar May 01 '24 05:05 aspicer

Size Change: 0 B

Total Size: 1.05 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.05 MB

compressed-size-action

github-actions[bot] avatar May 01 '24 05:05 github-actions[bot]