# Area chart hovertext problem

**URL:** <https://community.plotly.com/t/area-chart-hovertext-problem/72067>\
**Category:** 📊 Plotly Python\
**Created:** [January 29, 2023, 8:03pm UTC](https://community.plotly.com/t/area-chart-hovertext-problem/72067 "2023-01-29T20:03:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sberman](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sberman](https://community.plotly.com/u/sberman)\
**Post date:** [January 29, 2023, 8:03pm UTC](https://community.plotly.com/t/area-chart-hovertext-problem/72067/1 "2023-01-29T20:03:24Z")

</div>

I’m trying to create an area chart with customized hovertext for each point. That is working, but the plot has the same text showing on each point, cluttering the presentation.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/9/e/9e927a0f3b9307c079b3c4f790ab3c7ecba2b066.png)

Code is as follows: (hovertext is a dataframe field showing exactly what should be shown)

```
fig = px.area(df_pbp, x=x_col, y=y_col_norm,
              text="hovertext",
              #hover_data=["hovertext"],
              color_discrete_sequence=["blue"],
              title="Win probabilities throughout game"
)

fig.update_traces(hovertemplate="%{text}",
                  showlegend=False)

```

How do I hide this text in the chart but still keep in the hovertext properly? Thanks.

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [January 30, 2023, 3:18pm UTC](https://community.plotly.com/t/area-chart-hovertext-problem/72067/2 "2023-01-30T15:18:47Z")

</div>

hi @sberman  
👋 Welcome to the community.

Try to remove the `text="hovertext",` from the px.area(…). That should help.

Here’s an example with a customized hover, but without the text appearing.

```auto
import plotly.express as px

df = px.data.tips()
print(df.head())

fig = px.scatter(
    data_frame=df,
    x = 'day',
    y = 'tip'
)

fig.update_traces(
    hovertemplate=
    '<i>Tip</i>: $%{y:.1f}'+
    '<br><b>X</b>: %{x}<br>',
    showlegend = False)
fig.show()

```

You can read more about it in the [hover formatting chapter](https://plotly.com/python/hover-text-and-formatting/#customizing-hover-text-with-a-hovertemplate).

---

<div class="post-metadata">

**Author:** ![sberman](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sberman](https://community.plotly.com/u/sberman)\
**Post date:** [January 30, 2023, 6:08pm UTC](https://community.plotly.com/t/area-chart-hovertext-problem/72067/3 "2023-01-30T18:08:47Z")

</div>

You were right - I removed it as text, but had to add the ‘hovertext’ field as custom\_data, and then refer to customdata[0] in the hovertemplate. Thanks.
