# Creating custom legends for Kibana visualizations

**URL:** <https://discuss.elastic.co/t/creating-custom-legends-for-kibana-visualizations/189409>\
**Category:** Kibana\
**Created:** [July 8, 2019, 7:01pm UTC](https://discuss.elastic.co/t/creating-custom-legends-for-kibana-visualizations/189409 "2019-07-08T19:01:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amclaughlin](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@amclaughlin](https://discuss.elastic.co/u/amclaughlin)\
**Post date:** [July 8, 2019, 7:01pm UTC](https://discuss.elastic.co/t/creating-custom-legends-for-kibana-visualizations/189409/1 "2019-07-08T19:01:12Z")

</div>

Good afternoon everyone!

We are just getting started with our rollout of the ELK stack, and I have found, on several occasions, that it would be very beneficial for us to be able to customize the legend of a given visualization to display a custom field, rather than the simple value that the filtered field contains.

Is there a clean way to have a visualization reference a table, for instance, where it will display "Batch Logon" instead of "4"?

Thank you!

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [July 8, 2019, 10:53pm UTC](https://discuss.elastic.co/t/creating-custom-legends-for-kibana-visualizations/189409/2 "2019-07-08T22:53:17Z")

</div>

Hmm - there's not a lot of options for references currently if I understand correctly. [https://github.com/elastic/kibana/issues/12560](https://github.com/elastic/kibana/issues/12560) has some existing discussion.

I'm not sure I fully understand the context of your visualization though, can you share a little more info on what it looks like? Is the value of 4 a direct mapping to 'Batch Logon"? This could be mapped with a scripted field.

---

<div class="post-metadata">

**Author:** ![amclaughlin](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@amclaughlin](https://discuss.elastic.co/u/amclaughlin)\
**Post date:** [July 9, 2019, 2:05pm UTC](https://discuss.elastic.co/t/creating-custom-legends-for-kibana-visualizations/189409/3 "2019-07-09T14:05:12Z")

</div>

We have a visual on a dashboard with a set of values that can be one of 9 values. It will always be one of these 9 values, and each of the nine values is always a 1 to 1 relationship with a set value, i.e. a 4 on the chart always corresponds to a Batch logon, a 9 is always a logon using a set of new credentials, etc.

I'd like to have the legend at the right be more easily grokkable for users who don't understand the relationship immediately.

 ![dash%20snap](https://us1.discourse-cdn.com/elastic/original/3X/8/0/80450d86ef3e42d0f4e9591886c60618ed5eb0b1.png)

---

<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:** [August 6, 2019, 2:05pm UTC](https://discuss.elastic.co/t/creating-custom-legends-for-kibana-visualizations/189409/4 "2019-08-06T14:05:13Z")

</div>

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