Hi,
Starting with the last point: you need to add extra columns/data via customdata
in order to access them in the hovertemplate. Here is a link to the docs using graph_objects
(not express): Hover Text And Formatting
I am not 100% sure about the attempts 1 and 2, but I believe the issue is that the βtextβ column is not added in the aggregation to create the histogram and hover_data
is silently ignored. The method 2 you described works fine with scatter and bar, so you could consider doing the aggregation yourself and use px.bar
instead.
Hope this helps!