# Localize Tickformat: 'k' to 'tsd' and 'M' to 'Mio'

**URL:** <https://community.plotly.com/t/localize-tickformat-k-to-tsd-and-m-to-mio/36263>\
**Category:** plotly.js\
**Created:** [March 16, 2020, 11:17am UTC](https://community.plotly.com/t/localize-tickformat-k-to-tsd-and-m-to-mio/36263 "2020-03-16T11:17:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![seckel](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@seckel](https://community.plotly.com/u/seckel)\
**Post date:** [March 16, 2020, 11:17am UTC](https://community.plotly.com/t/localize-tickformat-k-to-tsd-and-m-to-mio/36263/1 "2020-03-16T11:17:52Z")

</div>

Hello, I need some help with tickformat-configuration.

For example, in the y-axis, the TICKS of big values are formatted like this:

750k  
500k  
250k

or

3M  
2M  
1M

I want to localize that, in **german** it should be

750tsd  
500tsd  
250tsd

or

3Mio  
2Mio  
1Mio

* * *

Any ideas how to do that? Google wasn’t helpfull for me.

Thanks  
Salvatore

---

<div class="post-metadata">

**Author:** ![empet](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@empet](https://community.plotly.com/u/empet)\
**Post date:** [March 16, 2020, 4:55pm UTC](https://community.plotly.com/t/localize-tickformat-k-to-tsd-and-m-to-mio/36263/2 "2020-03-16T16:55:59Z")

</div>

Hi @seckel

Take a look at this discussion [https://community.plotly.com/t/how-to-change-unit-in-vertical-text/34731](https://community.plotly.com/t/how-to-change-unit-in-vertical-text/34731), to learn how to use yaxis `tickvals` and `ticktext ` to display country specific big numbers. FOr their use with plotly.js see here [https://plot.ly/javascript/tick-formatting/](https://plot.ly/javascript/tick-formatting/).

---

<div class="post-metadata">

**Author:** ![seckel](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@seckel](https://community.plotly.com/u/seckel)\
**Post date:** [March 17, 2020, 12:59pm UTC](https://community.plotly.com/t/localize-tickformat-k-to-tsd-and-m-to-mio/36263/3 "2020-03-17T12:59:56Z")

</div>

@empet Thank you. Now I have a working solution.

I needed to do some math, so that it works with small values [0-999]  
and with bigger values [1000 - 100.000.000] (“tsd”, “Mio”)

If values bigger than one billion are used, I just use the default “ticks”, because there is no corresponding abbreviation for “Billion” in german 😮

* * *

Now, the only thing what displeases me, is that I have a fixed-amount of ticks for all **screen-sizes**.

* * *

Before this solution, I also tried to use the Plotly-JS Localisation-Files:  
([https://github.com/plotly/plotly.js/blob/master/dist/README.md#to-include-localization](https://github.com/plotly/plotly.js/blob/master/dist/README.md#to-include-localization))  
but that did not help me.

I would **suggest** that Plotly-JS should be able to “translate” the “k” (kilo) and “M” (million) with these translationfiles! Then I wouldn’t need to write “tickvals” and “ticktext” when I just want to translate a suffix…?!

Best Regards  
Salvatore

---

<div class="post-metadata">

**Author:** ![empet](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@empet](https://community.plotly.com/u/empet)\
**Post date:** [March 17, 2020, 1:18pm UTC](https://community.plotly.com/t/localize-tickformat-k-to-tsd-and-m-to-mio/36263/4 "2020-03-17T13:18:08Z")

</div>

@seckel

You may want to propose such an enhancement here [https://github.com/plotly/plotly.js/issues](https://github.com/plotly/plotly.js/issues).

---

<div class="post-metadata">

**Author:** ![seckel](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@seckel](https://community.plotly.com/u/seckel)\
**Post date:** [March 17, 2020, 1:19pm UTC](https://community.plotly.com/t/localize-tickformat-k-to-tsd-and-m-to-mio/36263/5 "2020-03-17T13:19:34Z")

</div>

I will have a look at it 🍻
