# Change color-label names

**URL:** <https://discuss.elastic.co/t/change-color-label-names/220181>\
**Category:** Kibana\
**Created:** [February 20, 2020, 11:58am UTC](https://discuss.elastic.co/t/change-color-label-names/220181 "2020-02-20T11:58:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnkary](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@johnkary](https://discuss.elastic.co/u/johnkary)\
**Post date:** [February 20, 2020, 11:58am UTC](https://discuss.elastic.co/t/change-color-label-names/220181/1 "2020-02-20T11:58:05Z")

</div>

Hi to all the great team!  
I have an index with 2 docs where i store active / inactive systems (one doc for 'active' and the other doc for 'inactive'). This index is refreshed every 10 minutes with new values of active / inactive systems.

How can i change the color - label names in top right of my pie chart as it is shown in the image below? I just want to display 'active' for the green and 'inactive' for the blue.

 ![pie chart](https://us1.discourse-cdn.com/elastic/original/3X/2/3/237a68b90c8926190fe0d547c416f4a5c2be829f.png)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [February 20, 2020, 12:58pm UTC](https://discuss.elastic.co/t/change-color-label-names/220181/2 "2020-02-20T12:58:58Z")

</div>

Hi @johnkary,

can you how the chart is configured (metrics and buckets) and how your data looks like?

---

<div class="post-metadata">

**Author:** ![johnkary](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@johnkary](https://discuss.elastic.co/u/johnkary)\
**Post date:** [February 20, 2020, 1:36pm UTC](https://discuss.elastic.co/t/change-color-label-names/220181/3 "2020-02-20T13:36:36Z")

</div>

Hi @flash1293 and thanks for the quick response!

Here is the details you asked for:

 ![pie chart_2](https://us1.discourse-cdn.com/elastic/original/3X/c/9/c9839487597e504d9ee2f8008c97da2f9f37ffbd.png)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [February 20, 2020, 1:42pm UTC](https://discuss.elastic.co/t/change-color-label-names/220181/4 "2020-02-20T13:42:13Z")

</div>

I see, thanks for the details.

If you control the ingested data, consider changing the shape of your documents to something like:  
`{ type: "active", count: 24 }`  
`{ type: "inactive", count: 2 }`

Then you can create your pie chart by using a terms agg on the `type` field for your slices and a sum agg on `count` for your values. the pie chart will pick up the `type` values as labels for the legend automatically.

---

<div class="post-metadata">

**Author:** ![johnkary](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@johnkary](https://discuss.elastic.co/u/johnkary)\
**Post date:** [February 20, 2020, 3:24pm UTC](https://discuss.elastic.co/t/change-color-label-names/220181/5 "2020-02-20T15:24:43Z")

</div>

Hi again!  
Thanks! I did what you said and is ok at some point (i mean the label on top right), but i lost the numbers on the circle. Is there any way to keep my numbers there?  
See below:

 ![pie chart_3](https://us1.discourse-cdn.com/elastic/original/3X/e/b/eb245c8806d8e268cdd9aa3841460d1da7693680.png)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [February 20, 2020, 5:32pm UTC](https://discuss.elastic.co/t/change-color-label-names/220181/6 "2020-02-20T17:32:41Z")

</div>

Unfortunately the pie chart will always show percentages, not total values.

If you know for sure there will always be 2 documents in your index, you could put the count in the type as well:  
`{ type: "active 24", count: 24 }`  
`{ type: "inactive 2", count: 2 }`

However, I suggest switching to a vertical bar chart, you can show the total values as part of the bar there like this:

 ![Screenshot 2020-02-20 at 18.31.42](https://us1.discourse-cdn.com/elastic/original/3X/0/2/02dca0bb9deef3d1db9b646244647479e2e720f3.png)

---

<div class="post-metadata">

**Author:** ![johnkary](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@johnkary](https://discuss.elastic.co/u/johnkary)\
**Post date:** [February 21, 2020, 12:29pm UTC](https://discuss.elastic.co/t/change-color-label-names/220181/7 "2020-02-21T12:29:21Z")

</div>

@flash1293 Ok, it doesn't matter! I choose the first option with the pie chart and it worked fine with the following:

```
{ type_systems: "active", count: 24 }
{ type_systems: "inactive", count: 2 } 

```

But, there is an issue here when i try to put this visualization in a dashboard... I get the error bellow. Any ideas?

![dashboard_error](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c4568bee7159f06fd60569c7b097a53023f4a056.png)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [February 21, 2020, 1:31pm UTC](https://discuss.elastic.co/t/change-color-label-names/220181/8 "2020-02-21T13:31:09Z")

</div>

Maybe you have to refresh your field list. Go to management \> index patterns \> and press the reload button in the top right. This should pull in new field names.

---

<div class="post-metadata">

**Author:** ![johnkary](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@johnkary](https://discuss.elastic.co/u/johnkary)\
**Post date:** [February 21, 2020, 1:54pm UTC](https://discuss.elastic.co/t/change-color-label-names/220181/9 "2020-02-21T13:54:18Z")

</div>

That's right! I forgot to do this simple move 🙂  
Now it's ok, it worked!

Really thank you again!  
Best wishes!

---

<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:** [March 20, 2020, 1:54pm UTC](https://discuss.elastic.co/t/change-color-label-names/220181/10 "2020-03-20T13:54:23Z")

</div>

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