PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
20.55k stars 1.22k forks source link

Datapoint labels on stickiness graphs always count in `days` #22209

Open dabrady opened 3 months ago

dabrady commented 3 months ago

Bug description

In stickiness graphs, the label for each data point is always days, no matter what the X-axis actually is.

For example, in this basic pageview stickiness graph, if I set the window to Last 30 Days and group by week, the X-axis correctly counts in weeks but the flyout label that appears when you hover over a datapoint counts in days.

image

And if I set the window to Last 3 days and group by hour, same thing: X-axis is correct, datapoint label is not.

image

How to reproduce

  1. Make a stickiness graph.
  2. Change the grouped by from days to anything else.
  3. Hover over any datapoint to see the incorrect unit being used in the label.

Debug info

Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/018f5add-5d01-7469-9eed-ab648586bdd8?t=4866 
Admin: http://go/adminOrgUS/018ec041-b081-0000-e38c-eeae98ec37d3 (Project: 63416)
Sentry: http://go/sentryUS/63416
bell-boy commented 3 months ago

Hi, I would like to work on this issue. Is that okay?

KirtiPriya07 commented 2 months ago

is anyone working on this? If not i have kind of started working on this

matzexcom commented 2 months ago

@KirtiPriya07

22304 fixed the logical bug in the getFormattedDate

But now (my status from last week), it seems there is some backend problem see comment https://github.com/PostHog/posthog/pull/22440#issuecomment-2133719165 You can check if seriesData?.[0]?.filter?.interval is still an empty object in the latest commit.

KirtiPriya07 commented 2 months ago

@matzexcom Thank you for the heads up. I will surely look into it.

ghoti143 commented 6 days ago

Howdy 👋. I'm new around these parts, but I saw that this issue still exists in prod, so I took a stab at fixing it.

https://github.com/PostHog/posthog/pull/24728