# Adding hover tooltip for "NaN" values in choropleth

**URL:** <https://community.plotly.com/t/adding-hover-tooltip-for-nan-values-in-choropleth/28656>\
**Category:** plotly.js\
**Created:** [September 13, 2019, 5:53pm UTC](https://community.plotly.com/t/adding-hover-tooltip-for-nan-values-in-choropleth/28656 "2019-09-13T17:53:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lizzicodes](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@lizzicodes](https://community.plotly.com/u/lizzicodes)\
**Post date:** [September 13, 2019, 5:53pm UTC](https://community.plotly.com/t/adding-hover-tooltip-for-nan-values-in-choropleth/28656/1 "2019-09-13T17:53:04Z")

</div>

How do I add hover tooltips for values that are “NaN” in choropleths? Is there a way to change the color of “NaN” states to gray?

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [September 17, 2019, 5:59pm UTC](https://community.plotly.com/t/adding-hover-tooltip-for-nan-values-in-choropleth/28656/2 "2019-09-17T17:59:52Z")

</div>

See [https://codepen.io/etpinard/pen/ExYerMx?editors=1010](https://codepen.io/etpinard/pen/ExYerMx?editors=1010)

We don’t render locations with `NaN` values and in turn that they don’t get hover labels.

* * *

I would suggest splitting your data arrays into two traces, one with non-NaNs values and one showing the `NaN` using some dummy value: [https://codepen.io/etpinard/pen/mdbGvYM?editors=1010](https://codepen.io/etpinard/pen/mdbGvYM?editors=1010)
