1

In geom_boxplot of ggiraph by default the values are shown in tooltip for outliers. Is there a way to modify the tooltip for the outliers? We can change the tooltip for the plot using tooltip parameter. Is there a parameter to change the tooltip for the outlier also?

The following is my sample code:

 library(ggiraph)
 library(ggplot2)
 library(shiny)

    ui <- fluidPage(

      ggiraphOutput("plot")
    )

    server <- function(input, output, session){

      output$plot <- renderggiraph({
        p <- ggplot(data = diamonds, aes(x=cut, y=carat, tooltip=cut))+geom_boxplot_interactive()
        ggiraph(code = print(p))
      })

    }

    shinyApp(ui = ui, server = server)

I referred to the the documentation in this link but it does not mention any such parameter. If parameter to change the outlier's tooltip does not exist can we change it using maybe some sort of js function?

Any type of help would be highly appreciated.

Axeman
  • 32,068
  • 8
  • 81
  • 94
SBista
  • 7,479
  • 1
  • 27
  • 58
  • Is `shiny` necessary here? I.e. I guess the problem/solution is similar when simply using `ggiraph` by itself. – Axeman May 22 '17 at 12:49
  • Yes, `shiny` is not necessary if there is a parameter to change the tooltip values. I thought in case that is not available, it might be possible using some kind of javascript if it is a `shinyapp`. – SBista May 22 '17 at 12:57
  • 1
    You could turn off outliers and manually put them back with `geom_point_interactive` and choose your tooltip that way. – Axeman May 22 '17 at 12:58
  • @Axeman Thanks. That would be a good option if there is no parameter to change the tooltip. – SBista May 23 '17 at 05:01

0 Answers0