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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors