# Sunburst annotation

**URL:** <https://community.plotly.com/t/sunburst-annotation/71861>\
**Category:** 📊 Plotly Python\
**Created:** [January 23, 2023, 7:04pm UTC](https://community.plotly.com/t/sunburst-annotation/71861 "2023-01-23T19:04:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoMo](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@RoMo](https://community.plotly.com/u/RoMo)\
**Post date:** [January 23, 2023, 7:04pm UTC](https://community.plotly.com/t/sunburst-annotation/71861/1 "2023-01-23T19:04:56Z")

</div>

I want to make a sunburst diagram showing the number of occurence of categories (here 0, 1 for the categories and 2,3 … for the subcategories).  
One category can be underrepresented. With the default layout it makes the text unreadable. I would like to know if there is an option to move the text of the small subcategory/all subcategories outside of the diagram ?

I have found an existing question on the subject on stackoverflow without any answer: [python - show labels of a sunburst chart outside of the circle - Stack Overflow](https://stackoverflow.com/questions/67834157/show-labels-of-a-sunburst-chart-outside-of-the-circle)

Thanks in advance

 ![newplot](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/d/3/d38170692bdca1275ce09337eed6681f1938b6cb.png)

---

<div class="post-metadata">

**Author:** ![rictuar](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@rictuar](https://community.plotly.com/u/rictuar)\
**Post date:** [January 23, 2023, 8:02pm UTC](https://community.plotly.com/t/sunburst-annotation/71861/2 "2023-01-23T20:02:28Z")

</div>

no clue on the outside.

a hacky approach might be to iterate over all of your data, and if some element contains \<x% of the values, then change the draw label to ’ '. keep the hovertext as the original label so that people can still see the label if they want

---

<div class="post-metadata">

**Author:** ![RoMo](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@RoMo](https://community.plotly.com/u/RoMo)\
**Post date:** [January 23, 2023, 8:37pm UTC](https://community.plotly.com/t/sunburst-annotation/71861/3 "2023-01-23T20:37:19Z")

</div>

Thank you for your answer!  
Sadly I need this figure in a report so I can not rely on hovering…  
But I keep it in mind in case I make a manual labeling of the figures.
