cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Frequent Visitor

Appreciate your reply

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. 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors