# Vega - rename layer/legend value names

**URL:** https://discuss.elastic.co/t/vega-rename-layer-legend-value-names/254350
**Category:** Kibana
**Tags:** vega
**Created:** [November 5, 2020, 5:08am UTC](https://discuss.elastic.co/t/vega-rename-layer-legend-value-names/254350 "2020-11-05T05:08:38Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)
#### Post date: [November 5, 2020, 2:49pm UTC](https://discuss.elastic.co/t/vega-rename-layer-legend-value-names/254350/2 "2020-11-05T14:49:59Z")

</div>

Hi @rbergen,

What if you use scripted fields to rename your fields ("\_source.checks\_total.policies\_checks\_result.passing" to just "passing" etc)

To do that, follow the example from here: [How to use scripted fields in vega/vega-lite visualizations?](https://discuss.elastic.co/t/how-to-use-scripted-fields-in-vega-vega-lite-visualizations/150677)

Hope it helps!

---

_[View the full topic](https://discuss.elastic.co/t/vega-rename-layer-legend-value-names/254350)._
