Creates a Pie Chart. A Pie Chart is a useful visualization technique to display quantitative information for different
categories that also have a meaning as a whole.
As with all other series, the Pie Series must be appended in the *series* Chart array configuration. See the Chart
documentation for more information. A typical configuration object for the pie series could be:
series: [{
type: 'pie',
field: 'data1',
showInLegend: true,
highlight: {
segment: {
margin: 20
}
},
label: {
field: 'name',
display: 'rotate',
contrast: true,
font: '18px "Lucida Grande"'
}
}]
In this configuration we set `pie` as the type for the series, set an object with specific style properties for highlighting options
(triggered when hovering elements). We also set true to `showInLegend` so all the pie slices can be represented by a legend item.
We set `data1` as the value of the field to determine the angle span for each pie slice. We also set a label configuration object
where we set the field name of the store field to be renderer as text for the label. The labels will also be displayed rotated.
We set `contrast` to `true` to flip the color of the label if it is to similar to the background color. Finally, we set the font family
and size through the `font` parameter.
duration for the pie slice highlight effect.
duration for the pie slice highlight effect.
store record field name to be used for the pie angles.
The values bound to this field name must be positive real numb...
store record field name to be used for the pie angles.
The values bound to this field name must be positive real numbers.
This parameter is required.
store record field name to be used for the pie slice lengths.
The values bound to this field name must be positive re...
store record field name to be used for the pie slice lengths.
The values bound to this field name must be positive real numbers.
This parameter is optional.
to set the pie chart as donut chart.
Default's false. Can be set to a particular percentage to set the radius
of the ...
to set the pie chart as donut chart.
Default's false. Can be set to a particular percentage to set the radius
of the donut chart.
to add the pie chart elements as legend items. Default's false.
to add the pie chart elements as legend items. Default's false.
An array of color values which will be used, in order, as the pie slice fill colors.
An array of color values which will be used, in order, as the pie slice fill colors.
An (optional) object with event callbacks. All event callbacks get the target *item* as first parameter. The callback...
An (optional) object with event callbacks. All event callbacks get the target *item* as first parameter. The callback functions are:
- itemmouseover
- itemmouseout
- itemmousedown
- itemmouseup
A function that can be overridden to set custom styling properties to each rendered element.
Passes in (sprite, recor...
A function that can be overridden to set custom styling properties to each rendered element.
Passes in (sprite, record, attributes, index, store) to the function.
An array with shadow attributes
An array with shadow attributes
Whether to show this series in the legend.
Whether to show this series in the legend.
An object containing styles for overriding series styles from Theming.
An object containing styles for overriding series styles from Theming.
The human-readable name of the series.
The human-readable name of the series.
The type of series. Set in subclasses.
The type of series. Set in subclasses.
Draws the series for the current chart.
Draws the series for the current chart.
For a given x/y point relative to the Surface, find a corresponding item from this
series, if any.
For a given x/y point relative to the Surface, find a corresponding item from this
series, if any.
Parameters
Returns
- Object An object with the item found or null instead.
Returns the color of the series (to be displayed as color for the series legend item).
Returns the color of the series (to be displayed as color for the series legend item).
Parameters
Returns
Hides all the elements in the series.
Hides all the elements in the series.
Highlight the specified item. If no item is provided the whole series will be highlighted.
Highlight the specified item. If no item is provided the whole series will be highlighted.
Parameters
Returns
Shows all the elements in the series.
Shows all the elements in the series.
un-highlights the specified item. If no item is provided it will un-highlight the entire series.
un-highlights the specified item. If no item is provided it will un-highlight the entire series.
Parameters
Returns