Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Recently I learned that we can use plotly function of R in Power BI, which I think is awesome. The link is as follows:
https://github.com/Microsoft/PowerBI-visuals/blob/master/RVisualTutorial/CreateRHTML.md
However, it seems like the plot generated by plotly squeezes too much, as shown below. Any way to fix this?
You can take a look at this blog post. It describes how to add an interactive javascript Plotly Chart in Power BI. Its quite easy.
You can tweak it to your liking.
Kind regards,
Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Hi @Dailey,
Please refer to below links:
Bar width in bar chart not changing
Customizing Individual Bar Widths
Best regards,
Yuliana Gu
Hi Yuliana,
Thank you so much for the reply. I don't think it is the problem of R though.
I ran the code in RStudio and the plot generated was fine. However, when I imported this into the Power BI, the whole plot got squeezed. So I guess I should probably do something in Power BI.
Thank you and best regards,
Dailey
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |