Allow filtering product analytics visualization designer by date
Problem to solve
When viewed on an analytics dashboard, visualizations will be filtered based on a date range defined at the dashboard level.
The visualization designer has no way of applying these filters, so when building visualizations, there is no way to see how the visualization will actually look on your dashboard. Additionally when using the viz designer for exploring your data it can be impossible to answer your question due to lack of date filtering.
Proposed solution
Add a date filter to the visualization designer. It should be clear that the date filter is not saved as part of the visualization, but is just a preview option.
Mockup
Implementation plan
- Reuse the existing date range filter from our dashboards within the visualization designer if possible
- Make sure to default the date range to 7 days to reduce the amount of data to retrieve
- Add help info icon showing this filter is not saved as part of the query
- Tidy the layout of the date filter / main filtered-search to ensure widths are sensible on large displays and the two filters stack nicely at smaller sizes
- Emitted selection should be applied to the query, such that the cube query-builder component will render the correct range.
- When saving the query, be sure to omit the date filter
- Ensure any date range filtering generated by Duo is mapped into this component (best effort, since Duo may return relative date range labels, e.g.
last week
, which we may not be able to easily map into the date range component) - Tests
Edited by Robert Hunt