# Local Currency in Hover Text

**URL:** <https://community.plotly.com/t/local-currency-in-hover-text/219>\
**Category:** plotly.js\
**Created:** [December 10, 2015, 8:55pm UTC](https://community.plotly.com/t/local-currency-in-hover-text/219 "2015-12-10T20:55:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![collin](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@collin](https://community.plotly.com/u/collin)\
**Post date:** [December 10, 2015, 8:55pm UTC](https://community.plotly.com/t/local-currency-in-hover-text/219/1 "2015-12-10T20:55:45Z")

</div>

I am working on a plot that displays investment data over a period of time, but it needs to display the hover data in GBP (British Pound) not dollar. Right now I am using

yaxis:{zeroline:false, hoverformat:’$,2f’}

to format it as currency, with the decimal and $ sign. That part works great, I just need to change $ to £. I thought about using d3 formatting, but I am not familiar with how to implement that. Just changing the symbol in the code above did not work btw. Thanks for any suggestions.

---

<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:** [December 30, 2015, 3:39am UTC](https://community.plotly.com/t/local-currency-in-hover-text/219/2 "2015-12-30T03:39:10Z")

</div>

Looks like the formatting engine we use does not allow for currency signs other than `$`.

I’d recommend using the axis [`ticksuffix`](https://plot.ly/javascript/reference/#layout-xaxis-ticksuffix) or [`tickprefix`](https://plot.ly/javascript/reference/#layout-xaxis-tickprefix) to display local currency signs.

I hope this helps.

---

<div class="post-metadata">

**Author:** ![collin](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@collin](https://community.plotly.com/u/collin)\
**Post date:** [January 7, 2016, 2:24pm UTC](https://community.plotly.com/t/local-currency-in-hover-text/219/3 "2016-01-07T14:24:28Z")

</div>

Thanks Etienne for the help. Just before your response I stumbled on the tickprefix solution. I ended up using it as such - tickprefix:‘£’ within the yaxis parameters.

---

<div class="post-metadata">

**Author:** ![collin](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@collin](https://community.plotly.com/u/collin)\
**Post date:** [August 24, 2017, 1:55pm UTC](https://community.plotly.com/t/local-currency-in-hover-text/219/4 "2017-08-24T13:55:13Z")

</div>

Bringing this same issue back up. So I upgraded to the latest js code, and now the currency symbol that was working perfectly before no longer works. I tried just adding the GBP sign in as a string, as well as ‘&pound’, neither of them worked. Seems like the newer version may be limiting what you can show in the prefixes, but surely other currencies should be allowed.

In the meantime I have reverted back to the previous version of plotly that I had been using. The original reason I wanted to upgrade was that the download to png was not working.
