Programmatically change a panel size

How can I change the width and height of a panel from inside my components?

1 Like

As a panel plugin creator… I’m also looking to do this. Some times, depending on variable selection - we have more data to show, so the height of the panel would be nice to grow. Most of the time the panel can be half the height, but we don’t want an excessive gap on the dashboard to the next panel below it.

Hi. Only the user can change the height of a panel.

What many plugins do is use the passed height and weight to display their charts, so even though they look small they won’t look stretched. you can also detect this and display a message to the user indicating that a bigger panel size is recommended,

1 Like

Thank you @academo for your suggestion - but this wouldn’t work in a dynamic way (aka depending on the data - which can change at anytime). But it’s a good suggestion for more static data sizes.

I’ve found that the “Grafana Scenes” paradigm will offer a solution to resizable panels.

yes! An app plugin using Grafana scenes will allow you wide control of how you display your data. This might be just what you need.