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

As a dashboard consumer, I want to be able to modify the granularity of a time-series chart #14747

Closed
EBoisseauSierra opened this issue May 21, 2021 · 3 comments

Comments

@EBoisseauSierra
Copy link
Contributor

Issue

  • Chart builders can specify the reporting time-range of a time-serie chart, and dashboard consumers can also modify that reporting time-range themselves using either dashboard (time) filter or the line chart time-range filter “footer”.
  • Only Chart builders can specify the granularity of aggregation over time.

We believe it would be beneficial for Dashboard consumers to be able to change the aggregation granularity of the time-serie chart themselves.

Features

  • Just like for the time range filter (cf. Line chart) that a dashboard consumer can “play with”, we would like to have a time granularity dropdown selector to modify how the metrics are aggregated against time.

Screenshot from 2021-05-21 10-54-25

  • Similarly, the “granularity change” event could be propagated to other charts in the dashboard (if “propagate” enabled in chart options),
  • Chart builder should have the possibility to {en, dis}able this feature (like for showing the range filter),
  • Chart builder should have the possibility to specify which time granularity to enable (i.e. they might want to not offer for “per-second” or “per-year” aggregation),
  • Possible time granularity should cover the different orders of magnitude (ms, s, min, h, day, week, month, quarter, year), but also — possibly user-defined — multiples thereof (1 min, 5 min, 15 min, 20 min, 30 min, etc.). This could either be pre-defined by the Chart builder and showed to Dashboard consumer as a fixed list of options they can chose from, or given as “you can have it all” selector where the Dashboard consumer can specify the time unit (ms, s, min, etc.) and the count thereof (1, 2, 5, etc.) they want to aggregate time with.

Alternatives

  • One already-feasible possibility is to generate multiple charts with all the wished for granularities, and add tabs in the dashboard (one tab for each time granularity). This is however quite inefficient, as changing one graph definition actually leads to modify n charts.
  • Another (not implemented yet) approach would be to offer time granularity as a dashboard-generic user input (and not chart specify) — cf. User Input acquisition through dashboard  #14622.
@EBoisseauSierra EBoisseauSierra changed the title As a dashboard consumer, I want to be able to modify the granularity of a time-serie chart As a dashboard consumer, I want to be able to modify the granularity of a time-series chart May 21, 2021
@EBoisseauSierra
Copy link
Contributor Author

An alternative currently exists (Superset 1.1.0), when using a FilterBox “chart” in the dashboard, and selecting its “Show {SQL, Druid} granularity dropdown” when setting it up.

Time grain isn't, however, part of the native filter (in Superset 1.1.0) — yet it's on the roadmap (cf. #13591 ).

Using filters is slightly different than the feature requested here (i.e., it's dashboard-specific rather than chart-specific); but (imho) it's likely to be satisfactory for most use cases.

@EBoisseauSierra
Copy link
Contributor Author

Closing as timegrain has been implemented in native filters (#13484) — to be (likely) released as part of Superset 1.2.0.

@villebro
Copy link
Member

villebro commented Jun 9, 2021

@EBoisseauSierra you are correct - this is available on native filters, and will be available by default on 1.3.0 (will be cut soon after 1.2.0 is released).

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

No branches or pull requests

2 participants