Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow hourly aggregation for other date ranges #2768

Open
ccrvlh opened this issue May 29, 2024 · 11 comments · May be fixed by #3013
Open

feat: allow hourly aggregation for other date ranges #2768

ccrvlh opened this issue May 29, 2024 · 11 comments · May be fixed by #3013
Labels
enhancement New feature or request

Comments

@ccrvlh
Copy link

ccrvlh commented May 29, 2024

Describe the feature or enhancement

Currently hourly stats seems to only be supported for the "last 24hrs" range. It would be great to look into hourly data for +1 week ranges.

@franciscao633
Copy link
Collaborator

Are you looking to set the aggregation range within the app, or just an update to the API to allow it? We set minimum units of aggregation per date range to avoid resource intensive queries like hourly by year, etc.

Copy link

github-actions bot commented Aug 3, 2024

This issue is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Aug 3, 2024
@ksaitor
Copy link

ksaitor commented Aug 7, 2024

Surprised this is not a thing. Would be super useful to have hourly chart across a week. Max 2 weeks really.

@github-actions github-actions bot removed the stale label Aug 8, 2024
@ccrvlh
Copy link
Author

ccrvlh commented Aug 15, 2024

We set minimum units of aggregation per date range to avoid resource intensive queries like hourly by year

@franciscao633 That seems totally fair and reasonable. Although hourly by week or sometimes even month still seems to make sense without breaking the bank.

I'd be happy to open a PR for this.

@ccrvlh
Copy link
Author

ccrvlh commented Aug 21, 2024

@franciscao633 thoughts here? one option would be just allow the user to select the unit. Plausible does something similar with a small dropdown menu close to the charts: https://plausible.io/plausible.io?period=7d&keybindHint=W. Umami could implement this right beside the date filter, or maybe on the bottom of the chart?

@franciscao633
Copy link
Collaborator

Sorry for delayed response. I can see the hour option being available up to 7 days (maybe 30?) and the day option being available up to 1 year. Don't feel a need to minutes / weeks for this first iteration. Feel free to put in a PR. I'll mark as enhancement so it doesn't become stale.

@franciscao633 franciscao633 added the enhancement New feature or request label Aug 22, 2024
@ccrvlh
Copy link
Author

ccrvlh commented Oct 19, 2024

@franciscao633 suggesting one implementation here: #3013

The idea is that there's a new icon right beside the arrows on the DateFilter component. That would be an "engine" icon, that would open a modal, allowing the user to set the timeUnit.

Because there's this (valid) concern about long running queries, we could add a logic that shows a warning if the user selects a non-recommended unit based on the date range.

Suggestion this specific UX since it would allow for other secondary settings (eg. chart type) as well, and wouldn't clutter the current chart view.

@ccrvlh ccrvlh linked a pull request Oct 19, 2024 that will close this issue
@ccrvlh
Copy link
Author

ccrvlh commented Oct 30, 2024

@franciscao633 had a change to take a look at this? happy to continue this work, it's a feature we would very much value in prod

@mikecao
Copy link
Collaborator

mikecao commented Nov 20, 2024

@ccrvlh Is the PR ready for review? It's still marked WIP.

@ccrvlh
Copy link
Author

ccrvlh commented Nov 20, 2024

@mikecao It is a WIP. Would be great to get validation on the approach / UI before polishing it for review.

EDIT: Just realized I didn't include the SS, will try to add that later today to validate the UI approach.

@ccrvlh
Copy link
Author

ccrvlh commented Nov 21, 2024

@mikecao just added a couple of screenshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants