# Tick Label format function

**URL:** <https://community.plotly.com/t/tick-label-format-function/670>\
**Category:** plotly.js\
**Created:** [March 18, 2016, 2:52pm UTC](https://community.plotly.com/t/tick-label-format-function/670 "2016-03-18T14:52:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pscanlon1](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@pscanlon1](https://community.plotly.com/u/pscanlon1)\
**Post date:** [March 18, 2016, 2:52pm UTC](https://community.plotly.com/t/tick-label-format-function/670/1 "2016-03-18T14:52:49Z")

</div>

Is there a way to pass a tick label formatting function?

I am trying to do something like convert large numbers and reduce by 1000, for example

5000 should be 5k

any suggestions?

as an aside, it looks like for numbers over 10000 it already does this?

---

<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:** [March 21, 2016, 1:45pm UTC](https://community.plotly.com/t/tick-label-format-function/670/2 "2016-03-21T13:45:08Z")

</div>

You can try using [`xaxis.tickformat`](https://plot.ly/javascript/reference/#layout-xaxis-tickformat).

---

<div class="post-metadata">

**Author:** ![dusan.sareny](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dusan.sareny](https://community.plotly.com/u/dusan.sareny)\
**Post date:** [April 6, 2016, 2:17pm UTC](https://community.plotly.com/t/tick-label-format-function/670/3 "2016-04-06T14:17:19Z")

</div>

I am trying to display data using plotly.js with german number formatting for example: “1.234,0”

layout = { yaxis: { tickformat: ‘.,’ } }

But it does not work for me.

I have found working example:

[https://plot.ly/2503/~chris/](https://plot.ly/2503/~chris/)

How do I achieve this ?

---

<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:** [April 6, 2016, 2:18pm UTC](https://community.plotly.com/t/tick-label-format-function/670/4 "2016-04-06T14:18:57Z")

</div>

@dusan.sareny non-english digit separtors can be set using [`layout.separators`](https://plot.ly/javascript/reference/#layout-separators).

---

<div class="post-metadata">

**Author:** ![bgx](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@bgx](https://community.plotly.com/u/bgx)\
**Post date:** [April 25, 2016, 4:59pm UTC](https://community.plotly.com/t/tick-label-format-function/670/5 "2016-04-25T16:59:19Z")

</div>

I can use custom separators for bar charts and line charts, but if I set layout.separators for pie charts this does not seem to take effect.

Does anybody have a working example?
