How to add info to hover name in y_unified mode?

Hello all and thanks in advance …

I have this view currently created:

but I want something similar to this:

that is, my state variable >> customdata[0] that appears repeatedly 4, only 1 appears.
Is this possible ?

this is my code:

Hi @gabino.alonso,

With this kind of very specific questions, it is really hard to help without having the data and the complete code which generated the chart.

I would say it’s possible tweaking the hovertemplate.

Also, please provide your code in a way that it can be copy pasted.

1 Like

ok, my apologies for being so brief, I’ll try again :sweat_smile:

I am graphing a series of discrete variables (Y) against time (x)
What I want is that currently my variable ‘state’ appears 4 times repeatedly and I would like it to only appear 1 time, for example in hovername.

but I am not able to add more values to “hover_name”

my code here:

        customdata = (df_monitor_prod['estado'])

        fig = px.line(df_monitor_prod,
                      y=["rendimiento", "disponibilidad", "calidad", "oee"],
                      markers=True, line_shape='spline',

        fig.update_traces(hovertemplate='%{y} %{_yother} %{customdata[0]}')

        fig.update_layout(yaxis={'range': [0,110]},
                        hoverlabel_align = 'right',
                        hovermode="x unified",
                        legend=dict(x=0, y=1.0),
                        margin=dict(l=40, r=0, t=10, b=20))

Thanks a lot