rimarlag
(Ricardo MARTINEZ-LAGUNES)
October 23, 2026, 7:34pm
1
I want to create several piecharts from data, but I want to add labels of categories and percentages. I tried something like this:
PieChart[{10, 20, 70},
ChartLabels → {Placed[{“A”, “B”, “C”}, “RadialOuter”],
Placed[{“10%”, “20%”, “70%”}, “RadialOutside”]}]
but it didn’t work. I couldn’t use LabelingFunction either. Any ideas?
eric3
(Eric Rimbey)
October 23, 2026, 8:03pm
2
I don’t know if it was just an artifact of you pasting code into your question, but you should be using " instead of curly quotes.
I suggest using both LabelingFunction and ChartLabels:
PieChart[{10, 20, 70}, LabelingFunction -> "RadialOutside",
ChartLabels -> Placed[{"A", "B", "C"}, "RadialOuter"]]
EDIT:
Noticed that you wanted percentages, so try this:
PieChart[{10, 20, 70},
LabelingFunction -> (Placed[PercentForm[#/100.], "RadialOutside"] &),
ChartLabels -> Placed[{"A", "B", "C"}, "RadialOuter"]]
rimarlag
(Ricardo MARTINEZ-LAGUNES)
October 23, 2026, 8:10pm
3
Ricardo MARTINEZ-LAGUNES:
PieChart[{10, 20, 70},
ChartLabels → {Placed[{“A”, “B”, “C”}, “RadialOuter”],
Placed[{“10%”, “20%”, “70%”}, “RadialOutside”]}]
Thank you Eric. It works.