Sankey diagram: how to display custom data on click, not on hover

Hi,

I am creating a Sankey diagram using plotly.graph_objects, and no dash. I would like to keep it that way.
I export these diagrams as html files. So far so good.

I am wondering if the following is possible:

  • I would like to display some specific data (e.g.: a numpy array) when clicking on a node.
  • Importantly, to avoid cluttering the diagram, I would like these specific data not to be displayed on hover.
  • So, using customdata and hovertemplate is not a valid solution for me I believe.

Is there any way to do this?

Thanks in advance.