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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
az2451
Resolver I
Resolver I

Rename tooltip names in ggplot2

I'm trying to rename the names which are shown in the tooltip in a qplot

 

By using aes it worked so far but then i got the problem, that the values are incorrect because i dont know how to read each correct coordinate points

 

Is there a way changing the names directly without creating new text-fields with aes?

 

g=qplot(dataset[1], dataset[2], data=dataset, aes(x,y)) + geom_point(aes(text=sprintf("Costs: %s<br>Count: <br>Last Name: ", dataset[4])))

See screenshot here: https://ibb.co/bCN4Sx

2 ACCEPTED SOLUTIONS
v-viig
Community Champion
Community Champion

You might send an email to pbircvsupport@microsoft.com. There're expirienced R-script developers who is able to assist.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

You can access to the tooltip labels in this way:

 

p = ggplotly(fp);

  #tooltips on scatter
  p$x$data[[1]]$text = generateNiceTooltips(dataset[drawPoints,])
  
  #tooltips on lines
  p$x$data[[2]]$text = paste(as.character(conf1*100),"% limits (l)",sep ="")
  p$x$data[[3]]$text = paste(as.character(conf1*100),"% limits (u)",sep ="")
  p$x$data[[4]]$text = paste(as.character(conf2*100),"% limits (l)",sep ="")
  p$x$data[[5]]$text = paste(as.character(conf2*100),"% limits (u)",sep ="")
  p$x$data[[6]]$text = paste("baseline ", as.character(round(p.fem,4)), sep ="")
  
# save HTML with predefined name 
internalSaveWidget(p, 'out.html')

 

See more

 

View solution in original post

2 REPLIES 2
v-viig
Community Champion
Community Champion

You might send an email to pbircvsupport@microsoft.com. There're expirienced R-script developers who is able to assist.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

You can access to the tooltip labels in this way:

 

p = ggplotly(fp);

  #tooltips on scatter
  p$x$data[[1]]$text = generateNiceTooltips(dataset[drawPoints,])
  
  #tooltips on lines
  p$x$data[[2]]$text = paste(as.character(conf1*100),"% limits (l)",sep ="")
  p$x$data[[3]]$text = paste(as.character(conf1*100),"% limits (u)",sep ="")
  p$x$data[[4]]$text = paste(as.character(conf2*100),"% limits (l)",sep ="")
  p$x$data[[5]]$text = paste(as.character(conf2*100),"% limits (u)",sep ="")
  p$x$data[[6]]$text = paste("baseline ", as.character(round(p.fem,4)), sep ="")
  
# save HTML with predefined name 
internalSaveWidget(p, 'out.html')

 

See more

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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