Forum Discussion
Plotly in Power BI
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?
3 Replies
- v-yulgu-msftMicrosoft Employee
Hi Dailey,
Please refer to below links:
Bar width in bar chart not changing
Customizing Individual Bar Widths
Best regards,
Yuliana Gu
- DaileyFrequent Visitor
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
- stevedepMemorable Member
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.