I am showing data using the express library (here as an example, the iris dataset dataframe):
fix = px.scatter_3d(df, x="sepal_width", y="sepal_length", z="petal_length", color="species",
size='petal_length', hover_data=['petal_width', 'additionalcolumn1'])
By default the hover box for each data point, shows the values for x, y, z, color, size, plus what is in the list of columns for the “hover_data” keyword.
It is easy to specify an alternate template for the hover box with
fig.update_traces(hovertemplate=sometmpl)
However, I cannot figure out which variable names to use to refer to the data that already gets used in the default hover box via the color, size and hover_data parameters. I can use “%{x}” but “%{color}” or “%{hover_data}” is apparently not known.
The documentation I found about using a hover template here only shows how to use “${x}” as an example but does not tell how to access the other data, especially the one from “hover_data”.