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

Getting error when running custom visual using R script and Plotly

Hi!

 

I have created a small custom visual for Power BI using Plotly. I have used the rhtml way of doing this and everything works in POwer BI desktop, but when I publish the report using the visual I got an error saying 

 

Package 'Plotly' has a dependency that is currently unavailable.

 

I have also installed the visual in my organization part of power bi service. I am using R version 3.4.4 and I also checked the package version. I had to downgrade some of them. The only one I have problem with downgrading was XML. I didn't manage to run this, but I am not sure if this is the problem. Anyway, if somebody has a workaround on this please let me know

regards geir

downgrade code run in Rstudio

packageurl <- "https://cran.r-project.org/src/contrib/Archive/XML/XML_3.98-1.10.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

 

feil.png

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

There are some requirements and limitations of R packages. It is indicated in the official document that the supported version for ploty is 4.7.1. You may get it with the corresponding link. For further information, please refer to the document .

 

Best Regards

Allan

 

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

Anonymous
Not applicable

Hi again.

 

I am very aware of that document and as I said in my post I have downgraded many of the packages using RStudio, and I was succeeded to do that on every packages but one. I could not manage to downgrade XML to the version explained in my post from the CRAN archieve. I believe I need to be able to do that to come any further.

 

Or can I trust Rstudio? I have experienced that Rstudio actually not change the R installation and I have to use Rtools instead. Any comments on that?

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.