heatmaply
heatmaply copied to clipboard
Is it possible to have `custom_hovertext` appear on row/col side?
I would like to add numerical values to be displayed on hover over a categorical row/col side.
I thought that creating an identical dataframe and overwriting the categorical column with numerical values and then passing this dataframe to custom_hovertext
would make this work.
library(heatmaply)
# e.g. showing just the actual value twice on hover does not work
mtcars$test_col <- "test"
heatmaply(mtcars, custom_hovertext = mtcars)
# e.g. substituting the categorical with numeric does not work for the row/col side
mtcars_w_num_for_categorical <- mtcars
mtcars_w_num_for_categorical[] <- 10**6
heatmaply(mtcars, custom_hovertext = mtcars_w_num_for_categorical)
This requires adding col_side_hovertext
and row_side_hovertext
args
Ok, thanks. I was thinking that custom_hovertext
will apply to the whole heatmap, not just the core. I guess this is in essence core_heatmap_hovertext
.
Probably when the categorical columns are pulled out we can also pull out the accompanying hovertext for those columns, but yeah unfortunately atm there's no custom hovertext for colsidecolors or rowsidecolors afaik