SliceGrouper
Type classSince 4.3.11
A plugin which automatically groups PercenSeries slices that are smaller than certain percent into one "Other" slice.
By pushing an instance of SliceGrouper into plugin list of any PercentSeries, it automatically applies the functionality.
Example:
let series = chart.series.push(new am4charts.PieSeries());
series.dataFields.valueY = "value";
series.dataFields.dateX = "date";
let grouper = series.plugins.push(new am4plugins_sliceGrouper.SliceGrouper());
var series = chart.series.push(new am4charts.PieSeries());
series.dataFields.valueY = "value";
series.dataFields.dateX = "date";
var grouper = series.plugins.push(new am4plugins_sliceGrouper.SliceGrouper());
{
// ...
"series": [{
// ...
}, {
"type": "PieSeries",
"dataFields": {
"valueY": "value",
"dateX": "date"
},
"plugins": [{
"type": "SliceGrouper"
}]
}]
}
Sources
This information about SliceGrouper is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.
Inheritance
SliceGrouper extends Plugin.
SliceGrouper is not extended by any other symbol.
Properties
bigSlicesType
List<Sprite|Slice|FunnelSlice>Defaultnew List()A list of big slices that do not satisfy
threshold.clickBehaviorType
"none"|"break"|"zoom"What happens when "Other" slice is clicked/tapped:
"none": nothing (default)
"break": the slice is broken down into actual slices it consists of
"zoom": actual small slices are shown and the rest of the slices are hidden
groupNameType
stringDefault"Other"A name to use for the "Other" slice.
groupPropertiesType
IFunnelSlicePropertiesSince 4.5.3Custom properties to apply to the "Other" slice.
groupSliceType
SpriteA reference to "Other" slice.
limitType
numberDefaultundefinedSince 4.9.14Maximum number of ungrouped slices to show. Any slice beyond
limitwill go into the "Other" group.NOTE: if
limitis set,thresholdsetting will be ignored.smallSlicesType
List<Sprite|Slice|FunnelSlice>Defaultnew List()A list of small slices that do not satisfy
threshold.syncLegendType
booleanDefaultfalseIf set to
truethe legend will be synced to show currently visible slices only.targetType
Optional<PercentSeries>A series object that will need its slices grouped.
thresholdType
numberDefault5Percent threshold which slices to group. If a slice is less than
thresholdpercent, it will be moved into "Other" group.zoomOutButtonType
ZoomOutButtonAn instance of
ZoomOutButtonthat is shown when "Other" slice is broken down, to get back to grouped state.
Methods
constructor()Returns
SliceGrouperConstructor
dispose()Returns
voidDisposes the element
init()Returns
void
1 inherited item
isDisposed()Returns
booleanInherited fromPluginReturns if this element is already disposed.
Events
SliceGrouper does not have any events.