Questions tagged [pie-chart]

A pie chart is a circular representation of data divided into sections by the drawing of radii.

A pie chart is a circular representation of data divided into sections by the drawing of radii.

  • Each section represents a percentage of some total.
  • The sum of the values of all sections is 100% of the total.
  • The sizes of the sections are directly proportional to the percentage of the total.
  • For example, if a given section represented 10% of the total value, the central angle of the section would be 36 degrees, or 10% of the total 360 degrees in the chart.

Questions regarding pie charts as used in programming should use this tag.

However, some aren't considering pie charts as the best option to visualize data. Often data which is visualized with pie-charts can be visualized with bar-charts as well.

In scientific software for statistical computing and graphics, function pie generates a pie chart.

Useful links


Related tags

3007 questions
24
votes
4 answers

Jquery Flot pie charts show data value instead of percentage

I can't figure out how to get flot.pie to change the data shown in the labels from a percentage of the "raw data" to the actual data. In my example i've created a pie chart with the numbers of read/unread messages. Number of read messages: …
Ruud van de Beeten
  • 1,185
  • 2
  • 9
  • 17
23
votes
1 answer

R + ggplot2 => add labels on facet pie chart

I want to add data labels on faceted pie char. Maybe someone can can help me. My data: year <- c(1,2,1,2,1,2) prod <- c(1,1,2,2,3,3) quantity <- c(33,50,33,25,34,25) df <- data.frame(year, prod, quantity) rm(year, prod,…
AndriusZ
  • 822
  • 1
  • 10
  • 18
21
votes
1 answer

Animating D3 donut chart on load

I have a donut chart with five different arcs inside of it. The data will not be updated but I want to have a transition of the whole graph being drawn as a circle when the page loads, starting at the selected angle (in my case 1.1*PI). Here is the…
KobeBryant
  • 1,341
  • 3
  • 10
  • 13
21
votes
4 answers

ggplot, facet, piechart: placing text in the middle of pie chart slices

I'm trying to produce a facetted pie-chart with ggplot and facing problems with placing text in the middle of each slice: dat = read.table(text = "Channel Volume Cnt AGENT high 8344 AGENT medium …
topchef
  • 19,091
  • 9
  • 63
  • 102
20
votes
3 answers

Plotting Pandas DataFrames in to Pie Charts using matplotlib

Is it possible to print a DataFrame as a pie chart using matplotlib? The Pandas documentation on chart visualization has instructions for plotting lot of chart types including bar, histogram, scatter plot etc. But pie chart is missing?
Nilani Algiriyage
  • 32,876
  • 32
  • 87
  • 121
20
votes
2 answers

How to add a legend to matplotlib pie chart?

Using this example http://matplotlib.org/examples/pie_and_polar_charts/pie_demo_features.html how could I add a legend to this pie chart? My problem is that I have One big slice 88.4%, the second largest slice is 10.6%, and the other slices are 0.7…
murpholinox
  • 639
  • 1
  • 4
  • 14
20
votes
5 answers

Is there an option to GNU ld to omit -dynamic-linker (PT_INTERP) completely?

I'm experimenting with the concept of pure-static-linked PIE executables on Linux, but running into the problem that the GNU binutils linker insists on adding a PT_INTERP header to the output binary when -pie is used, even when also given -static.…
R.. GitHub STOP HELPING ICE
  • 208,859
  • 35
  • 376
  • 711
19
votes
2 answers

Pie chart using Charts library with swift

I am integrating pie chart in my app using Charts library and getting issue with chart data my code is import UIKit import Charts class ViewController: UIViewController { @IBOutlet weak var pieChartView: PieChartView! override func…
Raj Joshi
  • 2,669
  • 2
  • 30
  • 37
18
votes
6 answers

beautiful Pie Charts with R

Let's say I have this simple data: mydata <- data.frame(group=c("A", "B", "0", "AB"), FR=c(20, 32, 32, 16)) If I want to create a pie chart from this dataframe I can do: with(mydata,pie(FR, labels=paste0(as.character(group), " ", FR, "%"),…
skan
  • 7,423
  • 14
  • 59
  • 96
18
votes
1 answer

How to replace auto-labelled relative values by absolute values in a pie plot

I'm creating a pie-chart according to the matplotlib-demo: https://matplotlib.org/1.2.1/examples/pylab_examples/pie_demo.html The percentage of each frac seems to be auto-labelled. How can I replace these auto-labelled relative values (%) plotted…
zehpunktbarron
  • 1,193
  • 3
  • 15
  • 26
17
votes
5 answers

MPAndroidChart legend customization

I am using MPAndroidChart library. I want customize legends in MPAndroidChart. In MPAndroidChart library i tried to set the position of legends. by given code legend.setPosition(LegendPosition.BELOW_CHART_CENTER) but unable to do it. I have to set…
Zia
  • 2,365
  • 2
  • 17
  • 14
17
votes
4 answers

Hierarchical / Multilevel pie chart

Is there any way to create a chart like this in R? Here is an extract of the data shown in the chart: df <- structure(list(Animal = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label =…
majom
  • 7,863
  • 7
  • 55
  • 88
17
votes
5 answers

How to add drop shadow to d3.js pie or donut chart

I am using d3.js to make a simple donut chart. I'm failing to achieve a drop-shadow or box-shadow effect to add some depth to the chart. I've tried adding the css: path { -moz-box-shadow: 3px 3px 5px 6px #ccc; -webkit-box-shadow: 3px 3px 5px…
matt
  • 777
  • 2
  • 12
  • 25
15
votes
3 answers

overlapping labels in flot pie chart

I use jquery flot for my pie charts and I have a problem with overlapping labels when the pie chart pieces are very small. Is there a good solution for that? My pie chart: series: { pie: { show: true, …
alexarsh
  • 5,123
  • 12
  • 42
  • 51
15
votes
5 answers

chartjs datalabels change font and color of text displaying inside pie chart

I am using chartjs and datalabels I have achieved everything I needed from chartjs and its plugin. Here is my final out Here is my code ( function ( $ ) { "use strict"; /////////////Pie chart START…
Muhammad Asif Raza
  • 647
  • 2
  • 5
  • 24