flant / grafana-statusmap

Grafana panel plugin to visualize status of multiple objects over time
MIT License
829 stars 43 forks source link

Add functionality to Max width and Min Width for y-axis #272

Open alextdnreb opened 2 years ago

alextdnreb commented 2 years ago

Overview

Currently, the width of the y-axis only depends on the length of the labels, which is problematic when multiple graphs are stacked vertically. With this change, I want to implement the functionality for the Max width and Min width fields for the y-axis.

What this PR does / why we need it

This PR extends the calculation of the width for the y-axis. When the user gives a max / min width, the current calculation will be overwritten. When the y-axis labels are longer than the configured max width, labels will be clipped with "..." and the full label will show on hover. The issue related to this change is #71

add functionality for `Max width` and `Min width` fields for y-axis