How i can detect panel width and height in my panel plugin?

I try reanimate flamegraph panel plugin for grafana https://github.com/Slach/grafana-flamegraph-panel which developed for grafana 4.x

how i can detect my panel width and height properly?
could anybody share direct link to examples where Panel plugin fill children DOM elements directly and can detect width and height of parent Panel?

Hi!

For angular plugins it can be done by checking .height() or .width() of the panel element since it’s a jquery object. Example in graph.ts here:

thanks a lot, my mistake was wrong usage .width() and .height() on link "stage "
directly inside link() plugin function
but right solution use .width() and .heght() inside render() function binded to “render” event