Home > Net >  Customising heatmaply hover in R Shiny app
Customising heatmaply hover in R Shiny app

Time:01-31

I have a plotlyOutput heatmap in a R Shiny app, which I render through heatmaply.

When I hover the mouse on the heatmap I get a popup saying

Row - [rowname] 
Column - [columnname]
Value - xxxxx

How would I go about customising this to a custom string?

CodePudding user response:

We can overwrite the default hovertemplate via style():

library(heatmaply)
library(datasets)

heatmaply(mtcars) |> style(hovertemplate = paste0("X: %{x}<extra></extra>"))
  • Related