Iframe in Bootstrap modal not working - "Invalid dimensions for plot, width = 892"

Hi everyone,

I started using Grafana for one of my projects and i have to insert graph into webpage, specificaly into Bootstrap/jQuery modal box.

Outside modal box graph is working correctly but inside modal box i get empty box and only aliases are visible. In top left corner there is an orange exclamation mark with error “Invalid dimensions for plot, width = 892, height = 0”

Can anyone help me?

The graph will not render if it is too small and in this case it looks like the height is 0. Maybe you need to set the height of your iframe?

http://docs.grafana.org/reference/sharing/#embed-panel

<iframe src="http://192.168.1.113:3000/dashboard-solo/db/legadademo?orgId=1&from=1499684061938&to=1499770461938&panelId=3" width="450" height="200" frameborder="0"></iframe>

Height and widrh are set so this is not a problem

Height 200 sounds pretty small. The panel for whatever reason is not getting the right height.

  • Try increasing the height of the iframe and see if it works then.
  • Try setting the panel height.