Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

In my pie chart, it's almost there.

Can I wrap some words?

like putting "Profit versus Objectives" t0 three lines,

but still in the right sector.

PieChart[{1/6 - 0.02, 1/6, 1/6, 1/6 - 0.03, 1/6 + 0.03, 1/6 + 0.02}, 
ChartLabels -> {"Profit versus Objectives", "Profitability Level", 
"Payback Period", "Relative Sales", "Relatives Profits", 
"Sales versus Objectives"}, ChartStyle -> {White}, 
PlotLabel -> "Fianacial Performance", 
BaseStyle -> {FontWeight -> "Bold", FontSize -> 11, 
FontFamily -> "Helvetica"}]

Many thanks!

share|improve this question
2  
Use ChartStyle -> White and LabelStyle -> (FontSize -> 24) or LabelStyle ->24? –  kguler May 14 at 21:24
    
Thanks, just figured it out. Is it possible to wrap the words a bit? –  Chen Stats Yu May 14 at 21:48
1  
Try using \n inside the quotes. Does this wrap as you wish? –  bill s May 14 at 21:58
1  
"Profit\nversus\nObjectives" in place of "Profit versus Objectives" seems to do it. –  m_goldberg May 14 at 22:00
    
You can also use ChartLabels->Pane[#, 70] & /@ { ...labels...} or ChartLabels->Row[{#}, 70] & /@ { ...labels...} –  kguler May 14 at 22:28

2 Answers 2

Wrapping labels in Pane often helps in charts:

labels = Pane[#, ImageSize -> 80] & /@ {"Profit versus Objectives", 
    "Profitability Level", "Payback Period", "Relative Sales", 
    "Relatives Profits", "Sales versus Objectives"};

PieChart[{1/6 - 0.02, 1/6, 1/6, 1/6 - 0.03, 1/6 + 0.03, 1/6 + 0.02}, 
 ChartLabels -> labels, ChartStyle -> {White}, 
 PlotLabel -> "Fianacial Performance", 
 BaseStyle -> {FontWeight -> "Bold", FontSize -> 11, 
   FontFamily -> "Helvetica"}]

enter image description here

The benefit of using something like Pane is that you can make all labels the same image size and do not have to worry about manually placing line breaks.

share|improve this answer

Using newline ("\n") as the delimiter in the labels rather than space (" ") seems to produce a good-looking pie chart.

PieChart[ConstantArray[1/6, 6], 
  ChartLabels -> {
    "Profit\nversus\nObjectives", "Profitability\nLevel", "Payback\nPeriod", 
    "Relative\nSales", "Relatives\nProfits", "Sales\nversus\nObjectives"}, 
  ChartStyle -> {White}, 
  PlotLabel -> "Financial Performance", 
  BaseStyle -> {FontWeight -> "Bold", FontSize -> 11, FontFamily -> "Helvetica"}]

pie.png

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.