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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
krishna_sharma
New Member

Unable to add tooltips to R script visual in PowerBI

Hi All,

 

I have created a R script visual. I want to add tooltip(hovering mouse) feature to it. But I am not able to achieve it.

 

Below is my R code:

 

require("ggplot2")

h<-ggplot(dataset, aes(x=Depth)) +
geom_line(aes(y =OB , colour = "OB")) +
geom_line(aes(y = PP, colour = "PP"))+geom_line(aes(y =FGshale , colour = "FGshale")) +
geom_line(aes(y = FGsand, colour = "FGsand"))+scale_colour_manual(values=c( "red","maroon","black","blue"))
h+coord_flip()+ scale_x_reverse()+scale_y_continuous(position = "top") +labs(x="",y="")+theme(axis.text=element_text(size=15)) +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.background = element_blank(), axis.line = element_line(colour = "black"))+theme(legend.position="none")

4 REPLIES 4
v-viig
Community Champion
Community Champion

We would recommend to send this issue to pbircvsupport@microsoft.com.

This email alias is maintained by experienced R developer who will be able to assist.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

krishna_sharma
New Member

Hi All,

 

I have created a custom line chart using R script visual in PowerBI. I am not able to add tooltip(hovering mouse) feature to it. Mentioned below is my R script code:

 

require("ggplot2")

h<-ggplot(dataset, aes(x=Depth)) +
geom_line(aes(y =OB , colour = "OB")) +
geom_line(aes(y = PP, colour = "PP"))+geom_line(aes(y =FGshale , colour = "FGshale")) +
geom_line(aes(y = FGsand, colour = "FGsand"))+scale_colour_manual(values=c( "red","maroon","black","blue"))
h+coord_flip()+ scale_x_reverse()+scale_y_continuous(position = "top") +labs(x="",y="")+theme(axis.text=element_text(size=15)) +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.background = element_blank(), axis.line = element_line(colour = "black"))+theme(legend.position="none")

 

 

 

 

 

Anonymous
Not applicable

I was facing the same problem. Did you find how to add hover over feature in R Visual ?

v-viig
Community Champion
Community Champion

We'd recommend to take a look at this topic.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.