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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors