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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.