[Stacked area chart] Prevent hovering on empty data

Hi,
Iโ€™m displaying a stacked area chart, but missing values mess up with the hover behavior:

  • when any value is either missing or null/zero, you can only see the hover of the last added marker, thus a nulll/zero/empty one
  • when values are missing, the hovertemplate cannot be interpolated, thus is displayed as is

This leads to the amazingly beautiful caption below:

Any thoughts on how to fix/work around this ?

Only way to bypass this behavior imo is to โ€œfillโ€ your dataframe, i.e. replace absent values by zeroes in your dataframe (e.g. in your example having a value corresponding to 0 for orange label in your dataframe).

AFAIK there is no conditionnal hovering yet so the only way to get rid of the weird un-interpolated hovertemplate is to prevent having absence of values in your dataframe.

Hello, I am also struggling with the same kind of issue. Could you please let me know if you find any solutionโ€ฆ? other than filling the nulls with any value in the data frame.
Thank you.

I have found no other solutions yet. However I know there is WIP on Plotly OSS about hovering on multiple points with the same coordinates. This might be linked with this issue in the future.