klyn.gui.windows.charts.KlynPlotWidget.pie
method
public pie(values as IList<Double>, labels as IList<String> = null, explode as IList<Double> = null, autopct as String = "", shadow as Boolean = false, startAngle as Double = 0.0, counterClockwise as Boolean = true, colors as IList<String> = null) as Void
Description

Displays a circular pie from copied, non-negative weights in list order. Replaces an existing pie; call clear() before switching between pies and Cartesian series. Axes, axis limits and grid lines do not apply to pies. Weights are normalized safely even when their unscaled sum would overflow.

Parameters
ParameterDescription
valuesNon-empty finite weights, at least one strictly positive.
labelsOptional external labels, with the same length as values.
explodeOptional finite, non-negative sector offsets in radius units.
autopctEmpty to hide percentages, otherwise one %f or %.nf conversion with 0..12 decimal places, literal text and escaped %%. Percentage labels round halfway values upwards.
shadowDraw darker sector silhouettes displaced by 2% of the radius.
startAngleInitial angle in degrees, counterclockwise from the right.
counterClockwiseWhether sectors advance counterclockwise.
colorsOptional non-empty cycle of color strings, copied on insertion.
Throws
  • ValueException for invalid data, lengths, colors, offsets, format or angle, a 3D projection or existing Cartesian series. Example: chart.pie([19.23, 80.77], labels=["Python", "Other"], explode=[0.15, 0.0], autopct="%.2f %%", shadow=true, startAngle=90.0, counterClockwise=false)