Information about more items at certain x,y position in the plotly graph


I am trying to show information of more datapoints on the same x,y position on hover. Is it possible? (I am using python API)

For example, I have count of 5 items on a certain date in a time series visualization. As a user, when I hover on the count of number 5, I would like to see information about the 5 items which make up the count (for example the texts of items). How can I do that?

I am trying to do it this way, for example:

  1. I create a list named ‘text_list’.
  2. I join all the texts of the items that belong to the count at certain x,y position into one string. Then I assign this into a variable. I append this variable to the aforementioned list. I do this for all counts.
  3. When creating go.Scatter(), I set the attribute text to the ‘text_list’.

Is there a better solution, which is nicer from UX standpoint?

Thank you.