Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to have custom_hovertext appear on row/col side? #268

Open
bjohnnyd opened this issue Jul 20, 2021 · 3 comments
Open

Is it possible to have custom_hovertext appear on row/col side? #268

bjohnnyd opened this issue Jul 20, 2021 · 3 comments

Comments

@bjohnnyd
Copy link

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)
@alanocallaghan
Copy link
Collaborator

This requires adding col_side_hovertext and row_side_hovertext args

@bjohnnyd
Copy link
Author

bjohnnyd commented Jul 21, 2021

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.

@bjohnnyd bjohnnyd reopened this Jul 21, 2021
@alanocallaghan
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants