grafana-cal-heatmap-panel
grafana-cal-heatmap-panel copied to clipboard
Partially address FR #5 (Automatically setting a cell size)
Let me preface by saying that I'm not certain this is the correct way to do this. It was the best I could come up with for now, without editing cal-heatmap itself.
This partially addresses https://github.com/NeoCat/grafana-cal-heatmap-panel/issues/5
This PR adds getAutoCellSize()
, in which I return the max acceptable cell size given the size of the panel element. This is done by hardcoding the cal-heatmap default rows and cols for each unique domain set. The total available space is divided by the number of expected cells, taking other elements such as padding into consideration.
You can activate auto-sizing by setting:
- cell size to null or zero
- row/col limit to null
- vertical orientation to false
Let me know what you think.