# Pie chart with labels on slices

**URL:** https://community.plotly.com/t/pie-chart-with-labels-on-slices/4799
**Category:** 📊 Plotly Python
**Created:** [July 6, 2017, 12:11pm UTC](https://community.plotly.com/t/pie-chart-with-labels-on-slices/4799 "2017-07-06T12:11:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aretor](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@aretor](https://community.plotly.com/u/aretor)
#### Post date: [July 6, 2017, 12:11pm UTC](https://community.plotly.com/t/pie-chart-with-labels-on-slices/4799/1 "2017-07-06T12:11:55Z")

</div>

Hello, I want to generate a pie chart with the labels near the slices, instead of having a legend. The result should look like this:

> **[Pie chart](https://en.wikipedia.org/wiki/Pie_chart#/media/File:English_dialects1997.svg)**
>
> An Pie chart (or an Emma chart) is a circular statistical graphic which is divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents. While it is named for its resemblance to a pie which has been sliced, there are variations on the way it can be presented. The earliest known pie chart is generally credited to William Playfair's Statistical Breviary of 1801. Pie c...

  
Is there some option to modify the legend in this way?

---

<div class="post-metadata">

### Author: ![bcd](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@bcd](https://community.plotly.com/u/bcd)
#### Post date: [July 6, 2017, 2:15pm UTC](https://community.plotly.com/t/pie-chart-with-labels-on-slices/4799/2 "2017-07-06T14:15:58Z")

</div>

Hi @aretor,

you can use `textposition = 'outside'` [https://plot.ly/python/reference/#pie-textposition](https://plot.ly/python/reference/#pie-textposition)

---

<div class="post-metadata">

### Author: ![aretor](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@aretor](https://community.plotly.com/u/aretor)
#### Post date: [July 6, 2017, 3:10pm UTC](https://community.plotly.com/t/pie-chart-with-labels-on-slices/4799/3 "2017-07-06T15:10:58Z")

</div>

It works, thanks. I want to add that in order to change the name of the labels the `text` property should be used.

---

<div class="post-metadata">

### Author: ![jcthalys](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jcthalys/32/1599_2.png) [@jcthalys](https://community.plotly.com/u/jcthalys)
#### Post date: [August 16, 2017, 1:57pm UTC](https://community.plotly.com/t/pie-chart-with-labels-on-slices/4799/4 "2017-08-16T13:57:33Z")

</div>

Please, Are there any way to take out this text and let only in the tooltip and the legend?
