plotly-calplot icon indicating copy to clipboard operation
plotly-calplot copied to clipboard

Disable hovering on NaN cells

Open mmarfat opened this issue 1 year ago • 1 comments

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)?

mmarfat avatar Mar 04 '24 11:03 mmarfat

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
    )

JustinAimiable avatar Mar 25 '24 18:03 JustinAimiable