# How to change the pie chart legend?

**URL:** <https://community.dynatrace.com/t/how-to-change-the-pie-chart-legend/48423>\
**Category:** Dashboarding\
**Tags:** dashboards-classic, charts\
**Created:** [October 20, 2024, 11:26pm UTC](https://community.dynatrace.com/t/how-to-change-the-pie-chart-legend/48423 "2024-10-20T23:26:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hillman](https://avatars.discourse-cdn.com/v4/letter/h/439d5e/32.png) [@Hillman](https://community.dynatrace.com/u/Hillman)\
**Post date:** [October 20, 2024, 11:26pm UTC](https://community.dynatrace.com/t/how-to-change-the-pie-chart-legend/48423/1 "2024-10-20T23:26:43Z")

</div>

I am currently creating a dashboard with a pie chart. The legend displayed is some internal number code that represent different teams (the number to the right). It causes difficulties for the viewer when they need to translate the mapping whenever they view the chart.

 ![Hillman_0-1729466596538.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/0/50a41b03956cf3ce79af3439d6b693478d2c12a4.png)

Is there any way that we can change the legend name into some friendlier name?

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [October 21, 2024, 12:09am UTC](https://community.dynatrace.com/t/how-to-change-the-pie-chart-legend/48423/2 "2024-10-21T00:09:08Z")

</div>

Hey&nbsp;[@Hillman](https://community.dynatrace.com/user/63818)

Not sure if there is a better way but you could use partitions to add a name as shown below.

```markup
builtin:host.availability:splitBy("dt.entity.host")
:partition("Partition"
 ,dimension("Test1",eq("dt.entity.host","HOST-056FB9BA2F69C67C"))
 ,dimension("Test2",eq("dt.entity.host","HOST-14DC825E0C327E32"))
 ,dimension("Test3",eq("dt.entity.host","HOST-11A07A6C55A0C23C")))

```

 ![Fin_Ubels_0-1729469275791.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/d/7d9bfab643e134088df986fee23937d2d1b5252b.png)

---

<div class="post-metadata">

**Author:** ![Hillman](https://avatars.discourse-cdn.com/v4/letter/h/439d5e/32.png) [@Hillman](https://community.dynatrace.com/u/Hillman)\
**Post date:** [October 21, 2024, 4:50am UTC](https://community.dynatrace.com/t/how-to-change-the-pie-chart-legend/48423/3 "2024-10-21T04:50:36Z")

</div>

[@Fin\_Ubels](https://community.dynatrace.com/user/47376)&nbsp;Thank you for your suggestion! I am now able to add labels to the legend&nbsp;😄

 ![Hillman_0-1729486225232.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/d/1dea6deed226842a2d09c89e5cae9f6576725a9b.png)
