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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Power BI R Custom Visual loading, except Leaflet Tiles for the basemap

Hi! I'm trying to incorporate a R-Custom Visual using leaflet. I've been able to load the visual and everything works except the base map. 

Here's a snippet with the tile part of the code: 

shape <-leaflet()%>%
addTiles("https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png")%>%
addPolygons(data = treatmentplants,
color =~pal(DWMLabel),weight = 1,smoothFactor = 0.5,
opacity = 0.5, fillOpacity = 0.5,
highlightOptions = highlightOptions(color = "white", weight = 2,
bringToFront = FALSE),

 

I switched from my original input which was " addProviderTiles(providers$Esri.WorldGrayCanvas)%>%" because of this link on stackoverflow. Both ways aren't working. Is it because the baselayer is coming from online and PowerBI doesn't support that with R custom visuals? 

 

Thanks in advance!

5 REPLIES 5
lbendlin
Super User
Super User

You need to use the renderer that comes with Power BI.  Matplotlib, basically.

Anonymous
Not applicable

Does that happen in the Rscript or the in the visual script? Are there examples you could point me too? Thanks!

Anonymous
Not applicable

I'm creating an R-Custom Visual not an R visual in the PowerBI desktop. I haven't seen any examples about the Matplotlib rendering

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.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors