Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Set minimum range for all graphs #3765

Merged
merged 4 commits into from
Nov 2, 2021

Conversation

VWSCoronaDashboard16
Copy link
Contributor

This makes the minimum range of all graphs 10, except for the R-number (since it will hopefully stay far away from 10 at all times)

Since exceptions will probably happen more often in the future, I made the minimum range configurable through metric configs. This way inline graphs can automatically pick up the right range as well. This needed some refinements to how we type data & metric configs. I made some utility types for our data which accommodate this, and replaced some repeated types through the codebase with these centralised utility types.

* value it can find. This way we can catch the properties of both 'normal'
* values as well as grouped values (i.e. 'sewer per installation' or 'variants')
*/
type ValueKeys<T> = T extends ValuesMetric<infer V> ? ValueKeys<V> : keyof T;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@VWSCoronaDashboard16 VWSCoronaDashboard16 merged commit d667904 into develop Nov 2, 2021
@VWSCoronaDashboard16 VWSCoronaDashboard16 deleted the topic/minimum-range-for-all-graphs branch November 2, 2021 14:50
VWSCoronaDashboard26 added a commit that referenced this pull request Dec 21, 2022
… it did not introduce any logic that did not already work but instead caused certain graphs on certain pages to not scale properly; removing the minimumRange prop will now facilitate automatic scaling on the y-axis of all time series charts;
VWSCoronaDashboard26 added a commit that referenced this pull request Dec 23, 2022
… it did not introduce any logic that did not already work but instead caused certain graphs on certain pages to not scale properly; removing the minimumRange prop will now facilitate automatic scaling on the y-axis of all time series charts; (#4551)

Co-authored-by: VWSCoronaDashboard26 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants