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
venkik79
Frequent Visitor

R custom visual - Error only in PowerBI Service ( works fine in powerbi Desktop and R studio)

I have the below script where i am plotting a HEATMAP using heatmaply function. This works with no issues in PowerBI desktop and R studio. When i publish it to powerbi service - i get the below SCRIPT RUN TIME error.

 

Error in eval(substitute(expr), data, enclos = parent.frame()) : object 'tickvals' not found

 

############### Library Declarations ###############
#libraryRequireInstall("ggplot2");
libraryRequireInstall("plotly")
libraryRequireInstall("heatmaply")
#libraryRequireInstall("tidyverse")
libraryRequireInstall("tidyr")
####################################################

################### Actual code ####################
#g = qplot(`Petal.Length`, data = iris, fill = `Species`, main = Sys.time());
pal1<-c("0"="gray","1"="orange","2"="yellow","3"="green","4"="blue")
#cm<-as.matrix(Values)
d1<-pivot_wider(Values,names_from = ProcessName,values_from=Level1)
d2<-as.data.frame(d1)
rnames<-d2[,1]
d3<-d2[,-1]
d3[is.na(d3)] <- 0
rownames(d3)=rnames
p = heatmaply(d3,dendrogram = FALSE,colors =pal1,grid_gap = 0.5,hide_colorbar = TRUE,fontsize_row = 6,fontsize_col=6);
####################################################

############# Create and save widget ###############
#p = ggplotly(p);
internalSaveWidget(p'out.html');
####################################################
2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @venkik79 

Please check if your R package is supported in power bi Service.

For more info you may refer to this blog: Create visuals by using R packages in the Power BI service

 

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. 

 

venkik79
Frequent Visitor

Appreciate your reply

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 Solution Authors
Top Kudoed Authors