# Tooltips disappear while using PlotHighlighting

**URL:** <https://community.wolfram.com/t/tooltips-disappear-while-using-plothighlighting/23454>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [January 17, 2024, 9:26pm UTC](https://community.wolfram.com/t/tooltips-disappear-while-using-plothighlighting/23454 "2024-01-17T21:26:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![john7](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@john7](https://community.wolfram.com/u/john7)\
**Post date:** [January 17, 2024, 9:26pm UTC](https://community.wolfram.com/t/tooltips-disappear-while-using-plothighlighting/23454/1 "2024-01-17T21:26:40Z")

</div>

If I use the PlotHighlighting option in a plot, I lose the ability to see Tooltips. Is the Tooltip function incompatible with the new functionality?

Try this code (with and without PlotHighlighting):

```
ListLinePlot[
 Tooltip[#, #] & /@ Table[{x, 2 Sin[x] + x + 0.}, {x, 0, 50, 1}], 
 PlotHighlighting -> "Crosshairs"]

```

---

<div class="post-metadata">

**Author:** ![eric3](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/eric3/32/12760_2.png) [@eric3](https://community.wolfram.com/u/eric3)\
**Post date:** [January 18, 2024, 12:09am UTC](https://community.wolfram.com/t/tooltips-disappear-while-using-plothighlighting/23454/2 "2024-01-18T00:09:46Z")

</div>

I don’t know the official answer, but it seems like they might be incompatible, yes. However, you can recover the behavior by adding another highlighting option:

```
ListLinePlot[Table[{x, 2 Sin[x] + x + 0.}, {x, 0, 50, 1}], PlotHighlighting -> {"Crosshairs", "XYLabel"}]

```

---

<div class="post-metadata">

**Author:** ![john7](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@john7](https://community.wolfram.com/u/john7)\
**Post date:** [January 18, 2024, 12:43am UTC](https://community.wolfram.com/t/tooltips-disappear-while-using-plothighlighting/23454/3 "2024-01-18T00:43:12Z")

</div>

Yes, that is a workaround. I do find the ability to custom format the label with Tooltip very helpful especially with dates on the x-axis (the system defaults can be too granular).

Hopefully, the PlotHighlighting options will be improved in the next release.

---

<div class="post-metadata">

**Author:** ![brettc](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/brettc/32/39223_2.png) [@brettc](https://community.wolfram.com/u/brettc)\
**Post date:** [January 18, 2024, 2:49pm UTC](https://community.wolfram.com/t/tooltips-disappear-while-using-plothighlighting/23454/4 "2024-01-18T14:49:14Z")

</div>

Usually having PlotHighlighting and Tooltips at the same time is frustrating since they’re both reacting to the mouse, trying to put their popups in the same place, etc…

As a result, PlotHighlighting → Automatic turns off the highlighting if there are tooltips, callouts, etc…

Giving a specific setting for PlotHighlighting will turn it on.

---

<div class="post-metadata">

**Author:** ![john7](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@john7](https://community.wolfram.com/u/john7)\
**Post date:** [January 18, 2024, 5:19pm UTC](https://community.wolfram.com/t/tooltips-disappear-while-using-plothighlighting/23454/5 "2024-01-18T17:19:08Z")

</div>

Is there any way to have a custom label generator? This seems to sometimes work better, but can be temperamental.

```
ListLinePlot[Table[{x, 2 Sin[x] + x}, {x, 0, 50, 1}], 
 LabelingFunction -> (Placed[#1[[1]], Tooltip] &), 
 PlotHighlighting -> "Crosshairs"]
ListLinePlot[Table[{x, 2 Sin[x] + x}, {x, 0, 50, 1}], Mesh -> All, 
 LabelingFunction -> (Placed[#1[[1]], Tooltip] &), 
 PlotHighlighting -> "XYDroplines"]

```
