Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power Bi Custom Visual using R and plotly

Hi everyone, there's a use-case I've come across that requires me to create a clustered + stacked column chart in Power BI. An important requirement is that the visuals should be interactive i.e. it should show tooltips on hovering. I searched on the marketplace. However, the only seemingly feasible custom viz there I could find was one by DEFTEAM SOLUTIONS PVT LTD. but for some reason it wasn't behaving as I expected. It's not an option for me.

 

Then, a lil' bit of research - I found out that the plotly library in R language allows for the interactive feature (mentioned above). But there's a caveat here too. It can render an interactive manner only when one creates a custom visualization using R language & NodeJS. I tried that using this article. However, I keep getting one error or another. This is probably a good place to mention that I have not coded in R before (ever). Even when the code was working just fine in R studio, the same code is giving me error in the custom viz I create by following the article mentioned above. [baffled]

 

Basically, I have 2 questions -

  • Has anyone done this in R --> create a visual that shows (grouped + stacked) columns AND shows tooltips upon hover using plotly ? If so, could you help me out / point me in the right direction ?
  • Any ideas about how I get the code which is working in R Studio to also work when I compile the files during creation of custom visual (this is something I do by running some NodeJS commands in CommandPrompt) ??

Any kind of help is appreciated. Do let me know if there's additional information required to grasp the whole picture. I'll try my best to share the details/data.

 

Thanks,

Nachiket

1 REPLY 1
stevedep
Memorable Member
Memorable 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. 

 

Kind regards,

 

Steve. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.