# Issue with PieChart3D in Version10. Is it Mac specific?

Bug introduced in 10.0.0 or earlier and persisting through 10.0.0 or later

I was testing version 10 to see if the ImagePadding bug described here had been fixed and came across a significant issue. The chart (code from linked question) took "forever" to render. AbsoluteTiming wrapped around the code kept telling me the timing was ~0.3sec. However the cell bracket remained "active" for ages -- a little after a minute the cell bracket went "inactive" and the chart was rendered in output (I used a stopwatch since the built in timing functions were not capturing the real world delay):

After experimenting it seems that the problem was arising from ChartElementFunction -> ChartElementDataFunction["ProfileSector3D", "Profile" -> 4]

PieChart3D[{data[[All, 2]]},
ChartElementFunction ->
ChartElementDataFunction["ProfileSector3D", "Profile" -> 4],
ChartStyle -> 54, ImageSize -> 400, ImagePadding -> All,
LabelingFunction -> labeler[data[[All, 1]]],
PerformanceGoal -> "Speed", PlotRange -> All,
SectorOrigin -> {Pi, 0}, SectorSpacing -> 0.2]


Further testing showed this problem to occur only when both ChartElementFunction and SectorOrigin where present as options as you can see in the grab below:

However the examples in the docs for ChartElementFunction rendered ok -- but these have SectorOrigin -> {Automatic, 1}. So it seems that it is the first position in the SectorOrigin list that is the culprit (but only when combined with this ChartElementFunction ...I haven't tested other types of ChartElementFunction ...yet).

I am running V10.0.0.5098698 on OS X 10.9.4

It appears others are having no problems on both Mac and Windows. Further monitoring shows the CPU load rising quite dramatically as the front end begins to crap itself:

The above was after a restart. The CPU time elapsed (~ 1 minute) is indicative of how long it took for the output to be rendered. When I close V10 and run the same code in V9 output is "instantaneous."

Also even when the chart is rendered this is not the end of the problem. As soon as the cursor is over the rendered chart the front end freezes again -- CPU usage goes to 100%.

There is nothing in the underlying box code to indicate what the problem may be. Comparing V9 to V10 I notice that EdgeForm[GrayLevel[0.5]] in V9 output has been replaced by EdgeForm[{GrayLevel[0],Opacity[0.1]}] in V10 output, however this replacement occurs in both the working version in 10 (the first example below) and the freezing version. So that doesn't appear to be the issue.

Some test input:

This should work ok:

PieChart3D[{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14},
ChartElementFunction ->
ChartElementDataFunction["ProfileSector3D", "Profile" -> 4],
SectorOrigin -> {Automatic, 0}]


This next example should take a minute (literally) to render (WARNING. save your work. If you evaluate this >2 times the front end might soil its pants and crash):

PieChart3D[{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14},
ChartElementFunction ->
ChartElementDataFunction["ProfileSector3D", "Profile" -> 4],
SectorOrigin -> {Pi, 0}]


Update

Szabolcs sent me a notebook in which he'd rendered the pie chart. The notebook opened instanteously but as soon as I placed the mouse over the pie chart the front end crapped itself.

• I just tried it in Windows 8.1, it was instantaneous. No problems. – RunnyKine Jul 16 '14 at 3:50
• I have no problems with MMA 10 on OS X 10.8.5 - so maybe it's specific to Mavericks. Can't test on 10.9.4 because I didn't upgrade. – Jens Jul 16 '14 at 4:11
• @Jens interesting. My other Mac is 32 bit so cannot test on that. I have restarted the computer and retested but the problem persists. – Mike Honeychurch Jul 16 '14 at 4:13
• @CameronMurray maybe the problem only effects Australians :) – Mike Honeychurch Jul 16 '14 at 7:26
• Though I'm on Windows you get a +1 because I appreciate your frustration. Apparently M10 has a lot of localized bugs that are hard to reproduce. I can't believe I'm the only one suffering with this, for example. – Mr.Wizard Jul 16 '14 at 7:45