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
Wing
Frequent Visitor

Interactive R custom visuals not displaying in Power BI Desktop

I tried several online tutorials on how to begin creating interactive R custom visuals (such as the link shown below), and followed all these tutorials carefully. 

 

   http://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1

 

Every thing seemed to go as expected and according to the instructions, all the way to (apparently successfully) importing the packaged .pbiviz file as a custom visual into the set of available charts visible in the visualization pane of Power BI Desktop.

 

However, when I click on the newly available custom visual icon, only a generic empty chart tile is placed on the report page. 

 

The same unssuccessful end result happens no matter which sample interactive R custom visual I tried, including the one from the sampleRHTMLVisual template, which I copied and pasted below the script.r file:

 

source('./r_files/flatten_HTML.r')

 

############### Library Declarations ###############

libraryRequireInstall("ggplot2");

libraryRequireInstall("plotly")
####################################################

 

################### Actual code ####################

g = qplot(`Petal.Length`, data = iris, fill = `Species`, main = Sys.time());

####################################################

 

############# Create and save widget ###############

p = ggplotly(g);

internalSaveWidget(p, 'out.html');

####################################################

 

 

I am fairly good with R; and have successfully implemented many R scripts to run within Power BI Desktop, and have also published them onto the Power BI Pro online service displaying static R visuals.   However, I am a relative beginner with Power BI, and have not (yet) created any custom visuals.  I'm excited about the ability to create interactive R custom visuals in Power BI. 

 
Additional info: 
  • I installed the latest LTS version (8.12.0) of Node.js on my 64-bit Windows 10 Pro computer.
  • Running 64-bit R 3.5.1 on this Windows 10 machine.
  • All required R packages are installed.

 

Would appreciate assistance to overcome this hurdle.

 

 

1 ACCEPTED SOLUTION
deldersveld
Resident Rockstar
Resident Rockstar

Have you added data into the visual's Values as well? Even though it references a sample dataset and not the Power BI data, adding data to Values should trigger the visual to appear.

View solution in original post

2 REPLIES 2
deldersveld
Resident Rockstar
Resident Rockstar

Have you added data into the visual's Values as well? Even though it references a sample dataset and not the Power BI data, adding data to Values should trigger the visual to appear.

It works now.   Thanks for the hint.   I'm off to the races making R-powered Interactive Custom Visuals !

 

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.