Forum Discussion
Display a report inside a React.js application
Hello,
I'm trying to display a published report inside a React Component but I've got some problems with dimensions.
The report doesn't fit the container without using fixed width and height.
With the config:
displayOption: models.DisplayOption.FitToWidth
inside a customLayout configuration, seems to work but not for the height, the container displays only a section of the report with a scrollbar.
With the config:
displayOption: models.DisplayOption.FitToPage
the report is displayed fitting the container area without adapting the height to the report size, so the report is shrunked and unreadable.
How can i automatically make the container adapt to the report's size or make the report adapt to the container? Suggestions?
Without sizing the container in pixel.
Thank you
1 Reply
- v-chenwuz-msftCommunity Support
Hi dwh ,
How to embed a Power BI item in a React app | Microsoft Docs
-
cssClassName - Gives the embedded item a CSS class names that let you control the style of the embedded iframe using CSS.
Maybe you can try this change the css mentioned by this post.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
-