dojo/dojox — pull request #125 by Kagetsume (2014-07-17 16:44:52+00:00)
Title: Enhance Pie plot with several features and layout improvements.

This is related to trac: https://bugs.dojotoolkit.org/ticket/18076
A lot of this work was done by Eugene Lazutkin(uhop) with additional work, tests, and merging performed by myself.

This submission adds the following:

1.) Much improved handling of the smart (column) labels. It will dynamically resize the Pie radius to fit all the labels now. You no longer need to have to trial/error set the radius. Label layout is much improved.

2.) Much improved radius handling in general. It will now try to maximize the usage of the space inside the chart area (max radius) unless otherwise specified. This combined with the label improvements means you rarely need to set radius now to get a good-rendering pie. You still can and it works as it always has, but dynamic is better.

3.) Support for ring-style pie charts. You can now set an innerRadius property on the Pie plot and it will use that to generate a ring style chart. Positive values work as percentage of whole (dynamic sizing). Negative values work as exact pixels (fixed size). This may seem odd, but it avoid having to string process to extract % or the like and is more efficient. In general percentages would be the likely use case as it stands so was made the common positive meaning.

4.) Theme support for setting the pieInnerRadius.

5.) minWidth support. This is so that you can always keep some aspect of a slice visible, particularly if that slice is going to have hover effects, like a tooltip. The default is 0, which means the feature is off and the Pie works as it always has. But, with a positive value, it will now force any slice < that size to scale up to that size so you can always have a minimum dimension. Yes, in theory this does skew pie plots a bit if enabled but it is also useful for many slices or conditions where you want even the smallest slice to show up and be hoverable.