# European number formats in Kibana

**URL:** https://discuss.elastic.co/t/european-number-formats-in-kibana/85453
**Category:** Kibana
**Created:** [May 11, 2017, 4:54pm UTC](https://discuss.elastic.co/t/european-number-formats-in-kibana/85453 "2017-05-11T16:54:10Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![nesretep](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nesretep/32/24743_2.png) [@nesretep](https://discuss.elastic.co/u/nesretep)
#### Post date: [May 11, 2017, 4:54pm UTC](https://discuss.elastic.co/t/european-number-formats-in-kibana/85453/1 "2017-05-11T16:54:10Z")

</div>

Hi There  
How can we set the number to be displayed properly according to our national standards?  
We use dot as thousand separator and comma as decimal pointer (10.510,75)

(Editing in settings "format:number:defaultPattern" obviously cannot produce the correct format)

/Lars

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [May 11, 2017, 8:53pm UTC](https://discuss.elastic.co/t/european-number-formats-in-kibana/85453/2 "2017-05-11T20:53:12Z")

</div>

Unfortunately, this isn't currently possible. Here's the enhancement request to follow: [https://github.com/elastic/kibana/issues/9228](https://github.com/elastic/kibana/issues/9228)

---

<div class="post-metadata">

### Author: ![nesretep](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nesretep/32/24743_2.png) [@nesretep](https://discuss.elastic.co/u/nesretep)
#### Post date: [May 11, 2017, 9:14pm UTC](https://discuss.elastic.co/t/european-number-formats-in-kibana/85453/3 "2017-05-11T21:14:09Z")

</div>

Hi Lukas  
Is there any way to hardcode a change inside Kibana?

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [May 11, 2017, 11:03pm UTC](https://discuss.elastic.co/t/european-number-formats-in-kibana/85453/4 "2017-05-11T23:03:44Z")

</div>

You could write a custom plugin of type `hack` that defines and sets a locale. See [http://numeraljs.com/#locales](http://numeraljs.com/#locales).

---

<div class="post-metadata">

### Author: ![nesretep](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nesretep/32/24743_2.png) [@nesretep](https://discuss.elastic.co/u/nesretep)
#### Post date: [May 12, 2017, 7:54am UTC](https://discuss.elastic.co/t/european-number-formats-in-kibana/85453/5 "2017-05-12T07:54:01Z")

</div>

Great I will try this. Where in the Kibana code would the hack have to be injected?

---

<div class="post-metadata">

### Author: ![paolofrancia](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@paolofrancia](https://discuss.elastic.co/u/paolofrancia)
#### Post date: [May 13, 2017, 4:56pm UTC](https://discuss.elastic.co/t/european-number-formats-in-kibana/85453/6 "2017-05-13T16:56:20Z")

</div>

This is a raw and hardcode solution on Kibana 5.4 that worked for me:

- open the file src/ui/public/stringify/types/\_numeral.js

- find in the file the conversion function:

-Change it to:

```
Numeral.prototype._convert = function (val) {
if (val === -Infinity) return '-∞';
if (val === +Infinity) return '+∞';
if (typeof val !== 'number') {
  val = parseFloat(val);
}

if (isNaN(val)) return '';

return numeral.set(val).format(this.param('pattern')).replace(",","t").replace(".",",").replace("t",".");
};

```

-to apply these changes delete whole content of optimize/bundles directory then restart the Kibana (bundles will be regenerated by kibana at startup)

Again this is a hack solution I hope the globalization feature will be available soon in Kibana...

---

<div class="post-metadata">

### Author: ![nesretep](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nesretep/32/24743_2.png) [@nesretep](https://discuss.elastic.co/u/nesretep)
#### Post date: [May 16, 2017, 2:44pm UTC](https://discuss.elastic.co/t/european-number-formats-in-kibana/85453/7 "2017-05-16T14:44:59Z")

</div>

Hi Paolo  
Thanks for the hack. It only replaces the first comma in case of more commas, so we just reworked it a little to this which replaces all occurences.

return numeral.set(val).format(this.param('pattern')).split('.').map((e) =\> e.replace(new RegExp(',', 'g'), '.')).join(',');

ATB  
Lars

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 13, 2017, 2:45pm UTC](https://discuss.elastic.co/t/european-number-formats-in-kibana/85453/8 "2017-06-13T14:45:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
