How to adjust iframe size to the browser size when dashboard is displayed

pvn
Tera Contributor

Hi All,

I am displaying dashboards using iframe, how we can adjust its size to the browser size as the dashboards are shown in native view? If the data in the reports is large, we get scroll bars, can we avoid it if the iframe size is adjusted?

Thanks.

3 REPLIES 3

jcmings
Mega Sage

Are you on the service portal? If so, you can clone the iFrame widget and assign a height/width in HTML style tags. I don't know if you can get rid of the scrollbars -- my solution was ultimately to make the dashboard as tall (height) as necessary. This was in October 2024 so maybe there's a more modern solution nowadays.

pvn
Tera Contributor

Hi @jcmings 

Yes on service portal. I tried below but seems it does not work
<iframe src="{{data.dashboard}}" style = "overflow: hidden; height: 1000px; width: 1000px;" frameborder="0" allow="fullscreen" scrolling="no"></iframe>

My style tags look like this: style="overflow: hidden; height: 2000px; width: 100%;"

 

Otherwise, you may have to play around with scroll-related tags. Like I said, I'm not sure if they will work.