0

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?

nico
  • 50,859
  • 17
  • 87
  • 112

1 Answers1

2

We can overwrite the default hovertemplate via style():

library(heatmaply)
library(datasets)

heatmaply(mtcars) |> style(hovertemplate = paste0("X: %{x}<extra></extra>"))
bretauv
  • 7,756
  • 2
  • 20
  • 57
ismirsehregal
  • 30,045
  • 5
  • 31
  • 78