Heatmap: Fix ability to define bucket size as an interval string, like 30s (#95923)

* validate with durations

* update docs

* Add default values to calculation, show error if too many bins

* move default generation to separate function

* Update docs/sources/panels-visualizations/visualizations/heatmap/index.md

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

* dont try to parse ‘’ as a duration, move max to variable

* Add new function to support duration and ms, only calculate if valid

* Add radix

* Remove validation and precalc to determine bucket quantity

* simplify

* simplify more

* less

* cleanup transformationsVariableSupport. reset value to auto on mode changes

* maybe...

* by hook or by crook

* Change function name back

---------

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
Kristina
2024-12-02 13:08:45 -06:00
committed by GitHub
co-authored by Isabel Matwawana Leon Sorokin
parent 88621d6fa0
commit 53052def52
7 changed files with 123 additions and 65 deletions
@@ -80,7 +80,7 @@ This setting determines if the data is already a calculated heatmap (from the da
### X Bucket
This setting determines how the X-axis is split into buckets. You can specify a time interval in the **Size** input. For example, a time range of `1h` makes the cells 1-hour wide on the X-axis.
This setting determines how the X-axis is split into buckets. You can specify a time interval in the **Size** input. For example, a time range of `1h` makes the cells 1-hour wide on the X-axis. If the value is a number only, the duration is in milliseconds.
### Y Bucket