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

Disable hovering on NaN cells #32

Open
mmarfat opened this issue Mar 4, 2024 · 1 comment
Open

Disable hovering on NaN cells #32

mmarfat opened this issue Mar 4, 2024 · 1 comment

Comments

@mmarfat
Copy link

mmarfat commented Mar 4, 2024

It would be great if hovering was disabled on unassigned (empty) cells. For example, when showing a heatmap with data for just one month (2024-03-01 to 2024-03-31):

image

With the current implementation the empty cells show the raw hovertemplate value. Can this somehow be disabled (or perhaps replaced with an empty value based on condition)?

@JustinAimiable
Copy link

I haven't figured out excluding the NaN values piece yet, but since it does export a plotly plot, I was able to iterate over the traces and update the hovertemplate:

for trace in fig.data:
    trace.update(
        hovertemplate=some_template_string
    )

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

No branches or pull requests

2 participants