# Changing the legend names

**URL:** <https://discuss.elastic.co/t/changing-the-legend-names/24422>\
**Category:** Kibana\
**Created:** [June 26, 2015, 1:21pm UTC](https://discuss.elastic.co/t/changing-the-legend-names/24422 "2015-06-26T13:21:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucky](https://avatars.discourse-cdn.com/v4/letter/l/e9c0ed/32.png) [@Lucky](https://discuss.elastic.co/u/Lucky)\
**Post date:** [June 26, 2015, 1:21pm UTC](https://discuss.elastic.co/t/changing-the-legend-names/24422/1 "2015-06-26T13:21:30Z")

</div>

Hi,

Is there anyway to change the names of the legends in the visualization in kibana 3

Thank you.

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [June 28, 2015, 1:47pm UTC](https://discuss.elastic.co/t/changing-the-legend-names/24422/2 "2015-06-28T13:47:44Z")

</div>

Lucky provided more detail on the use case in this private message (not sure if others can access it):  
[https://discuss.elastic.co/t/changing-the-legend-names/24433?u=tbragin&source\_topic\_id=24422](https://discuss.elastic.co/t/changing-the-legend-names/24433?u=tbragin&source_topic_id=24422)

The question is - when doing a terms aggregation on an integer field, can you change the values from 1, 2, 3, etc.. to a human-readable label. My advice would be to do this mapping at index time using the [Logstash translate filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-translate.html) and do the terms aggregation on the string instead. Make sure to set the mapping for the string to "not analyzed".

---

<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:** [July 6, 2017, 2:17pm UTC](https://discuss.elastic.co/t/changing-the-legend-names/24422/3 "2017-07-06T14:17:23Z")

</div>


