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
ojbowden
Regular Visitor

Interactive R custom visuals not displaying in Power BI Desktop

Hi

 

I've tried multiple guides and multiple scripts to create  R custom visuals (such as the link shown below), and all of them seem to end in just a blank, white image showing on my visualiser. Some guides I've followed: 

 

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

https://datakuity.com/2019/06/25/power-bi-create-custom-interactive-visuals-with-r/

 

What is frustrating me is I am getting no errors, and everything seems to package correctly. Then when I pull in my custom visualiser and turn on the Fields, the visualiser thinks for a second, then turns blank and doesn't show anything. 

 

This has also been true of sampleRHTMLVisual template:

 

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');

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

 

Could this be I haven't got the correct node_modules installed? I am not getting an error to refer back to at any stage so I am at a loss here. Any help would be much appreciated. 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @ojbowden ,

 

Please check the Known limitations of R visual in Power BI.

R visuals in Power BI Desktop have the following limitations:

  • Data sizes: Data used by an R visual for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used and a message is displayed on the image.

  • Output size : R visual has an output size limit of 2MB.

  • Resolution: All R visuals are displayed at 72 DPI.

  • Plotting device: Only plotting to the default device is supported.

  • Calculation times: If an R visual calculation exceeds five minutes, it causes a time-out error.

  • Relationships: As with other Power BI Desktop visuals, if data fields from different tables with no defined relationship between them are selected, an error occurs.

  • Refreshes: R visuals are refreshed upon data updates, filtering, and highlighting. However, the image itself isn't interactive and can't be the source of cross-filtering.

  • Highlights: R visuals respond if you highlight other visuals, but you can't select elements in the R visual to cross filter other elements.

  • Display devices: Only plots that are plotted to the R default display device are displayed correctly on the canvas. Avoid explicitly using a different R display device.

  • Column renaming: R visuals do not support renaming input columns. Columns will be referred to by their original name during script execution.

  • RRO installations: In this release, the 32-bit version of Power BI Desktop doesn't automatically identify RRO installations; you must manually provide the path to the R installation directory in Options and settings > Options > R Scripting.

For reference: Create Power BI visuals using R

And you can check whether you have install and configure R script correctly.

For reference: Run R scripts in Power BI Desktop

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @ojbowden ,

 

Please check the Known limitations of R visual in Power BI.

R visuals in Power BI Desktop have the following limitations:

  • Data sizes: Data used by an R visual for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used and a message is displayed on the image.

  • Output size : R visual has an output size limit of 2MB.

  • Resolution: All R visuals are displayed at 72 DPI.

  • Plotting device: Only plotting to the default device is supported.

  • Calculation times: If an R visual calculation exceeds five minutes, it causes a time-out error.

  • Relationships: As with other Power BI Desktop visuals, if data fields from different tables with no defined relationship between them are selected, an error occurs.

  • Refreshes: R visuals are refreshed upon data updates, filtering, and highlighting. However, the image itself isn't interactive and can't be the source of cross-filtering.

  • Highlights: R visuals respond if you highlight other visuals, but you can't select elements in the R visual to cross filter other elements.

  • Display devices: Only plots that are plotted to the R default display device are displayed correctly on the canvas. Avoid explicitly using a different R display device.

  • Column renaming: R visuals do not support renaming input columns. Columns will be referred to by their original name during script execution.

  • RRO installations: In this release, the 32-bit version of Power BI Desktop doesn't automatically identify RRO installations; you must manually provide the path to the R installation directory in Options and settings > Options > R Scripting.

For reference: Create Power BI visuals using R

And you can check whether you have install and configure R script correctly.

For reference: Run R scripts in Power BI Desktop

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This answer doesn't really seem to address the issue.

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.