Bring Trends and SQL charts closer together
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 222
Description
Feature request
Is your feature request related to a problem?
Currently, creating charts from the Trends section (Product analytics --> New Insight) vs. from the SQL editor is a very different experience. I'd love for there to be more overlap between the two.
Describe the solution you'd like
There are advantages that both chart types have exclusively. For charts from Trends, being able to drill-down into the data, showing the %-change to previous period, the ability to filter by time in the dashboards, showing values on series, are very nice.
Conversely, for SQL charts, the individual HEX-code colors, SQL variables, other Display customizations like prefix for currency data are super cool.
With the new SQL variables within SQL insights, I think I'll stick to charts from the SQL editor for now, because some of the flexibility there outweighs the advantages of Trends charts. But I'd love to see some features from Trends get adopted here. As a start, it would be super cool if there were dedicated SQL variables for time (minimum and maximum) that correspond to the time feature used by Trends. Currently, I'm creating a mindate and a maxdate variable to be able to filter by time in the dashboard, but the time calendar used by Trends is much more user friendly. I'm attaching a screenshot showing how it currently looks, with two separate time filters in the same dashboard.
Describe alternatives you've considered
Additional context
https://posthoghelp.zendesk.com/agent/tickets/29697 (moved to PostHog: https://us.posthog.com/project/2/support/tickets/32193)
Debug info
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names the Trends section, Product analytics → New Insight, the SQL editor, and dashboard time filters, but no files or tests. Start by reproducing the separate Trends and SQL chart experiences and listing the requested overlap, especially time controls and SQL variables. Done requires an agreed scope and consistent behavior across both chart types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100