# Custom Numeric Field Formatter

**URL:** https://discuss.elastic.co/t/custom-numeric-field-formatter/107730
**Category:** Kibana
**Created:** [November 15, 2017, 11:36am UTC](https://discuss.elastic.co/t/custom-numeric-field-formatter/107730 "2017-11-15T11:36:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![kumpelblase](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumpelblase/32/35709_2.png) [@kumpelblase](https://discuss.elastic.co/u/kumpelblase)
#### Post date: [November 15, 2017, 11:36am UTC](https://discuss.elastic.co/t/custom-numeric-field-formatter/107730/1 "2017-11-15T11:36:23Z")

</div>

Hi there, is it possible to create a custom field format in Kibana 5.6 or 6. I tried my luck with the instructions here: [https://www.elastic.co/blog/kibana-custom-field-formatters](https://www.elastic.co/blog/kibana-custom-field-formatters). But unfortunately the blog post isn't up-to-date anymore. I want a formatter which takes a number and returns a corresponding string. It would be no problem for me to write my own formatter in JS, as the existing formatters are, located in `~/kibana/src/ui/public/stringify/types/`.

---

<div class="post-metadata">

### Author: ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)
#### Post date: [November 15, 2017, 10:12pm UTC](https://discuss.elastic.co/t/custom-numeric-field-formatter/107730/2 "2017-11-15T22:12:34Z")

</div>

The location of the field formatters was changed in 6.0. You can find all the types [here](https://github.com/elastic/kibana/tree/5cddc100778f0dfd5c2e1f1342ab40a1cc7f52b9/src/core_plugins/kibana/common/field_formats/types) and the registration happens [here](https://github.com/elastic/kibana/blob/c9c135ea14bc9b024c41d950225a7cc37c9e9106/src/core_plugins/kibana/public/field_formats/register.js).

The preferred way to add a custom field formatter is via a plugin, but there's currently a bug preventing plugins from registering them. We're working on a fix, but until then it should still be possible to modify the Kibana source if you really need to.

---

<div class="post-metadata">

### Author: ![kumpelblase](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumpelblase/32/35709_2.png) [@kumpelblase](https://discuss.elastic.co/u/kumpelblase)
#### Post date: [November 16, 2017, 7:26am UTC](https://discuss.elastic.co/t/custom-numeric-field-formatter/107730/3 "2017-11-16T07:26:39Z")

</div>

Thanks, it's easy for me to understand how the individual scripts work and I think it's possible for me to crerate my own. However I can't figure out how the registration happens. A bit of explanation would be great.

---

<div class="post-metadata">

### Author: ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)
#### Post date: [November 16, 2017, 4:09pm UTC](https://discuss.elastic.co/t/custom-numeric-field-formatter/107730/4 "2017-11-16T16:09:57Z")

</div>

I'm sorry, I totally used the wrong link for where registration happens. Had too many tabs open!

This is the correct link:

> <https://github.com/elastic/kibana/blob/c9c135ea14bc9b024c41d950225a7cc37c9e9106/src/core_plugins/kibana/public/field_formats/register.js>

That one should be fairly self explanatory, but let me know if you have any other questions!

---

<div class="post-metadata">

### Author: ![kumpelblase](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumpelblase/32/35709_2.png) [@kumpelblase](https://discuss.elastic.co/u/kumpelblase)
#### Post date: [November 17, 2017, 7:04am UTC](https://discuss.elastic.co/t/custom-numeric-field-formatter/107730/5 "2017-11-17T07:04:05Z")

</div>

Yeah thanks, this file is much more understandable.

---

<div class="post-metadata">

### Author: ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)
#### Post date: [November 17, 2017, 5:23pm UTC](https://discuss.elastic.co/t/custom-numeric-field-formatter/107730/6 "2017-11-17T17:23:44Z")

</div>

Pull request to track for fixing the plugin issue, if you decide you're interested in writing a field formatter plugin later [https://github.com/elastic/kibana/pull/14984](https://github.com/elastic/kibana/pull/14984)

---

<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: [December 15, 2017, 5:24pm UTC](https://discuss.elastic.co/t/custom-numeric-field-formatter/107730/7 "2017-12-15T17:24:04Z")

</div>

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