{"version":3,"sources":["webpack:///../../../../../src/.internal/plugins/sliceGrouper/SliceGrouper.ts","webpack:///./plugins/sliceGrouper.js"],"names":["SliceGrouper_SliceGrouper","_super","SliceGrouper","_this","call","this","smallSlices","List","bigSlices","groupName","groupProperties","syncLegend","_threshold","_clickDisposers","_clickBehavior","_ignoreDataUpdate","tslib_es6","prototype","init","processSeries","series","target","chart","baseSprite","dataProvider","data","length","_disposers","push","events","on","ev","groupSlice","undefined","clear","groupSliceItem","groupValue","dataItems","each","item","value","values","percent","dataContext","sliceGrouperOther","threshold","hiddenInLegend","hide","hidden","slice","dataFields","validateRawData","groupData","category","addData","slices","dataItem","initSlices","utils_Object","key","val","clickBehavior","has","toggleGroupOn","once","toggleGroupOff","show","feedLegend","zoomOutButton","disableType","enableType","Object","defineProperty","_zoomOutButton","tooltipContainer","createChild","ZoomOutButton","shouldClone","align","valign","zIndex","Number","MAX_SAFE_INTEGER","marginTop","marginRight","dispose","disposeClickEvents","a","shift","Plugin","Registry","registeredClasses","window","am4plugins_sliceGrouper","sliceGrouper_namespaceObject"],"mappings":";;;;;;;;;;;;;;;;;;;wPA2EAA,EAAA,SAAAC,GAuEC,SAAAC,IAAA,IAAAC,EAECF,EAAAG,KAAAC,OAAOA,YA1DDF,EAAAG,YAAkD,IAAIC,EAAA,EAKtDJ,EAAAK,UAAgD,IAAID,EAAA,EAOpDJ,EAAAM,UAAoB,QAQpBN,EAAAO,mBAQAP,EAAAQ,YAAsB,EAKnBR,EAAAS,WAAqB,EAWrBT,EAAAU,mBAKAV,EAAAW,eAA4C,OAE5CX,EAAAY,mBAA6B,IAiTxC,OAnXkCC,EAAA,EAAAd,EAAAD,GA4E1BC,EAAAe,UAAAC,KAAP,WACCjB,EAAAgB,UAAMC,KAAId,KAAAC,MACVA,KAAKc,iBAOEjB,EAAAe,UAAAE,cAAR,eAAAhB,EAAAE,KAEOe,EAASf,KAAKgB,OACdC,EAAsBF,EAAOG,WAC7BC,EAAeJ,EAAOK,MAAQL,E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["/**\r\n * Plugin for automatically grouping small chart slices into single group.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Plugin } from \"../../core/utils/Plugin\";\r\nimport { PercentSeries } from \"../../charts/series/PercentSeries\";\r\nimport { FunnelSlice, IFunnelSliceProperties } from \"../../charts/elements/FunnelSlice\";\r\nimport { PercentChart } from \"../../charts/types/PercentChart\";\r\nimport { IDisposer } from \"../../core/utils/Disposer\";\r\nimport { List } from \"../../core/utils/List\";\r\nimport { Slice } from \"../../core/elements/Slice\";\r\nimport { Sprite } from \"../../core/Sprite\";\r\nimport { Optional } from \"../../core/utils/Type\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { ZoomOutButton } from \"../../core/elements/ZoomOutButton\";\r\nimport * as $object from \"../../core/utils/Object\";\r\n\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * A plugin which automatically groups [[PercenSeries]] slices that are smaller\r\n * than certain percent into one \"Other\" slice.\r\n *\r\n * By pushing an instance of [[SliceGrouper]] into `plugin` list of\r\n * any [[PercentSeries]], it automatically applies the functionality.\r\n *\r\n * Example:\r\n *\r\n * ```TypeScript\r\n * let series = chart.series.push(new am4charts.PieSeries());\r\n * series.dataFields.valueY = \"value\";\r\n * series.dataFields.dateX = \"date\";\r\n *\r\n * let grouper = series.plugins.push(new am4plugins_sliceGrouper.SliceGrouper());\r\n * ```\r\n * ```JavaScript\r\n * var series = chart.series.push(new am4charts.PieSeries());\r\n * series.dataFields.valueY = \"value\";\r\n * series.dataFields.dateX = \"date\";\r\n *\r\n * var grouper = series.plugins.push(new am4plugins_sliceGrouper.SliceGrouper());\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"series\": [{\r\n * // ...\r\n * }, {\r\n * \"type\": \"PieSeries\",\r\n * \"dataFields\": {\r\n * \"valueY\": \"value\",\r\n * \"dateX\": \"date\"\r\n * },\r\n * \"plugins\": [{\r\n * \"type\": \"SliceGrouper\"\r\n * }]\r\n * }]\r\n * }\r\n * ```\r\n *\r\n * @since 4.3.11\r\n */\r\nexport class SliceGrouper extends Plugin {\r\n\r\n\t/**\r\n\t * A series object that will need its slices grouped.\r\n\t */\r\n\tpublic target: Optional;\r\n\r\n\t/**\r\n\t * A reference to \"Other\" slice.\r\n\t */\r\n\tpublic groupSlice: Sprite | Slice | FunnelSlice;\r\n\r\n\t/**\r\n\t * A list of small slices that do not satisfy `threshold`.\r\n\t */\r\n\tpublic smallSlices: List = new List();\r\n\r\n\t/**\r\n\t * A list of big slices that do not satisfy `threshold`.\r\n\t */\r\n\tpublic bigSlices: List = new List();\r\n\r\n\t/**\r\n\t * A name to use for the \"Other\" slice.\r\n\t *\r\n\t * @default \"Other\"\r\n\t */\r\n\tpublic groupName: string = \"Other\";\r\n\r\n\t/**\r\n\t * Custom properties to apply to the \"Other\" slice.\r\n\t *\r\n\t * @since 4.5.3\r\n\t * @type {IFunnelSliceProperties}\r\n\t */\r\n\tpublic groupProperties: IFunnelSliceProperties = {};\r\n\r\n\t/**\r\n\t * If set to `true` the legend will be synced to show currently visible\r\n\t * slices only.\r\n\t *\r\n\t * @defaylt false\r\n\t */\r\n\tpublic syncLegend: boolean = false;\r\n\r\n\t/**\r\n\t * Threshold percent.\r\n\t */\r\n\tprotected _threshold: number = 5;\r\n\r\n\t/**\r\n\t * Zoom out button. Shown when \"Other\" slice is broken down to zoom back\r\n\t * out to \"Other\".\r\n\t */\r\n\tprotected _zoomOutButton: ZoomOutButton;\r\n\r\n\t/**\r\n\t * Disposer for click events.\r\n\t */\r\n\tprotected _clickDisposers: Array = [];\r\n\r\n\t/**\r\n\t * What happens when \"Other\" slice is cicked.\r\n\t */\r\n\tprotected _clickBehavior: \"none\" | \"break\" | \"zoom\" = \"none\";\r\n\r\n\tprotected _ignoreDataUpdate: boolean = false;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\t// Nothing to do here\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic init() {\r\n\t\tsuper.init();\r\n\t\tthis.processSeries();\r\n\t}\r\n\r\n\t/**\r\n\t * Decorates series with required events and adapters used to hijack its\r\n\t * data.\r\n\t */\r\n\tprivate processSeries(): void {\r\n\r\n\t\tconst series = this.target;\r\n\t\tconst chart = series.baseSprite;\r\n\t\tconst dataProvider = series.data && series.data.length ? series : chart;\r\n\r\n\t\t// Invalidate calculated data whenever data updates\r\n\t\tthis._disposers.push(dataProvider.events.on(\"datavalidated\", (ev) => {\r\n\r\n\t\t\tif (this._ignoreDataUpdate) {\r\n\t\t\t\tthis._ignoreDataUpdate = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis.groupSlice = undefined;\r\n\t\t\tthis.smallSlices.clear();\r\n\t\t\tthis.bigSlices.clear();\r\n\r\n\t\t\t// Collect and prepare small slices\r\n\t\t\tlet groupValue = 0;\r\n\t\t\tlet groupSliceItem;\r\n\t\t\tseries.dataItems.each((item) => {\r\n\t\t\t\tlet value = item.values.value.percent;\r\n\t\t\t\tif ((item.dataContext).sliceGrouperOther) {\r\n\t\t\t\t\tgroupSliceItem = item.dataContext;\r\n\t\t\t\t}\r\n\t\t\t\telse if (value <= this.threshold) {\r\n\t\t\t\t\tgroupValue += item.value;\r\n\t\t\t\t\titem.hiddenInLegend = true;\r\n\t\t\t\t\titem.hide();\r\n\t\t\t\t\titem.hidden = true;\r\n\t\t\t\t\tthis.smallSlices.push(item.slice);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.bigSlices.push(item.slice);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// Create \"Other\" slice\r\n\t\t\tif (groupValue > 0) {\r\n\t\t\t\tif (groupSliceItem) {\r\n\t\t\t\t\t(groupSliceItem)[series.dataFields.value] = groupValue;\r\n\t\t\t\t\tthis._ignoreDataUpdate = true;\r\n\t\t\t\t\tdataProvider.validateRawData();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlet groupData: any = {\r\n\t\t\t\t\t\tsliceGrouperOther: true\r\n\t\t\t\t\t};\r\n\t\t\t\t\tgroupData[series.dataFields.category] = this.groupName;\r\n\t\t\t\t\tgroupData[series.dataFields.value] = groupValue;\r\n\t\t\t\t\tthis._ignoreDataUpdate = true;\r\n\t\t\t\t\tdataProvider.addData(groupData);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._disposers.push(series.events.on(\"validated\", (ev) => {\r\n\t\t\tseries.slices.each((slice) => {\r\n\t\t\t\tif ((slice.dataItem.dataContext).sliceGrouperOther) {\r\n\t\t\t\t\tif (!this.groupSlice) {\r\n\t\t\t\t\t\tthis.groupSlice = slice;\r\n\t\t\t\t\t\tthis.initSlices();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}));\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Initializes group slice.\r\n\t */\r\n\tprivate initSlices(): void {\r\n\r\n\t\tif (!this.groupSlice) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Apply custom peroperties\r\n\t\t$object.each(this.groupProperties, (key, val) => {\r\n\t\t\t(this.groupSlice)[key] = val;\r\n\t\t});\r\n\r\n\t\t// Set up click\r\n\t\tif (this.clickBehavior != \"none\") {\r\n\r\n\t\t\tif (!this.groupSlice.events.has(\"hit\")) {\r\n\t\t\t\tthis._clickDisposers.push(this.groupSlice.events.on(\"hit\", (ev) => {\r\n\t\t\t\t\tthis.toggleGroupOn();\r\n\t\t\t\t}));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Toggles group on.\r\n\t */\r\n\tprivate toggleGroupOn(): void {\r\n\r\n\t\tif (this.clickBehavior == \"none\") {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Hide \"Other\" slice\r\n\t\tthis.groupSlice.dataItem.hide();\r\n\t\tif (this.syncLegend) {\r\n\t\t\t(this.groupSlice.dataItem).hiddenInLegend = true;\r\n\t\t}\r\n\r\n\t\tthis._clickDisposers.push(this.groupSlice.events.once(\"shown\", (ev) => {\r\n\t\t\tthis.toggleGroupOff();\r\n\t\t}));\r\n\r\n\t\t// Unhide hidden slices\r\n\t\tthis.smallSlices.each((slice) => {\r\n\t\t\tslice.dataItem.hidden = false;\r\n\t\t\tslice.dataItem.show();\r\n\t\t\tif (this.syncLegend) {\r\n\t\t\t\t(slice.dataItem).hiddenInLegend = false;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t// Maybe hide big slices\r\n\t\tif (this.clickBehavior == \"zoom\") {\r\n\t\t\tthis.bigSlices.each((slice) => {\r\n\t\t\t\tslice.dataItem.hide();\r\n\t\t\t\tif (this.syncLegend) {\r\n\t\t\t\t\t(slice.dataItem).hiddenInLegend = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this.syncLegend) {\r\n\t\t\t(this.target.baseSprite).feedLegend();\r\n\t\t}\r\n\r\n\t\t// Show zoomout button\r\n\t\tthis.zoomOutButton.show();\r\n\t}\r\n\r\n\t/**\r\n\t * Toggles group off.\r\n\t */\r\n\tprivate toggleGroupOff(): void {\r\n\r\n\t\tif (this.clickBehavior == \"none\") {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Toggle \"Other\" slice back on\r\n\t\tthis.groupSlice.events.disableType(\"shown\")\r\n\t\tthis.groupSlice.dataItem.show();\r\n\t\tthis.groupSlice.events.enableType(\"shown\");\r\n\t\tif (this.syncLegend) {\r\n\t\t\t(this.groupSlice.dataItem).hiddenInLegend = false;\r\n\t\t}\r\n\r\n\r\n\t\t// Maybe unhide big slices\r\n\t\tif (this.clickBehavior == \"zoom\") {\r\n\t\t\tthis.bigSlices.each((slice) => {\r\n\t\t\t\tslice.dataItem.hidden = false;\r\n\t\t\t\tslice.dataItem.show();\r\n\t\t\t\tif (this.syncLegend) {\r\n\t\t\t\t\t(slice.dataItem).hiddenInLegend = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// Hide small slices\r\n\t\tthis.smallSlices.each((slice) => {\r\n\t\t\tslice.dataItem.hide();\r\n\t\t\tif (this.syncLegend) {\r\n\t\t\t\t(slice.dataItem).hiddenInLegend = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (this.syncLegend) {\r\n\t\t\t(this.target.baseSprite).feedLegend();\r\n\t\t}\r\n\r\n\t\t// Hide zoomout button\r\n\t\tthis.zoomOutButton.hide();\r\n\t}\r\n\r\n\t/**\r\n\t * Percent threshold which slices to group. If a slice is less than\r\n\t * `threshold` percent, it will be moved into \"Other\" group.\r\n\t *\r\n\t * @default 5\r\n\t * @param value Threshold\r\n\t */\r\n\tpublic set threshold(value: number) {\r\n\t\tif (this._threshold != value) {\r\n\t\t\tthis._threshold = value;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Threshold\r\n\t */\r\n\tpublic get threshold(): number {\r\n\t\treturn this._threshold;\r\n\t}\r\n\r\n\t/**\r\n\t * An instance of [[ZoomOutButton]] that is shown when \"Other\" slice is\r\n\t * broken down, to get back to grouped state.\r\n\t * \r\n\t * @param value Button\r\n\t */\r\n\tpublic set zoomOutButton(value: ZoomOutButton) {\r\n\t\tthis._zoomOutButton = value;\r\n\t}\r\n\r\n\t/**\r\n\t * @return Button\r\n\t */\r\n\tpublic get zoomOutButton(): ZoomOutButton {\r\n\t\tif (!this._zoomOutButton) {\r\n\t\t\tconst chart = this.target.baseSprite;\r\n\t\t\tlet zoomOutButton = chart.tooltipContainer.createChild(ZoomOutButton);\r\n\t\t\tzoomOutButton.shouldClone = false;\r\n\t\t\tzoomOutButton.align = \"right\";\r\n\t\t\tzoomOutButton.valign = \"top\";\r\n\t\t\tzoomOutButton.zIndex = Number.MAX_SAFE_INTEGER;\r\n\t\t\tzoomOutButton.marginTop = 5;\r\n\t\t\tzoomOutButton.marginRight = 5;\r\n\r\n\t\t\tzoomOutButton.hide(0);\r\n\t\t\tthis.zoomOutButton = zoomOutButton;\r\n\t\t\tthis._disposers.push(this._zoomOutButton);\r\n\r\n\t\t\tzoomOutButton.events.on(\"hit\", () => {\r\n\t\t\t\tthis.toggleGroupOff();\r\n\t\t\t}, this);\r\n\t\t}\r\n\t\treturn this._zoomOutButton;\r\n\t}\r\n\r\n\t/**\r\n\t * What happens when \"Other\" slice is clicked/tapped:\r\n\t *\r\n\t * * \"none\": nothing (default)\r\n\t * * \"break\": the slice is broken down into actual slices it consists of\r\n\t * * \"zoom\": actual small slices are shown and the rest of the slices are hidden\r\n\t * \r\n\t * @param value Click behavior\r\n\t */\r\n\tpublic set clickBehavior(value: \"none\" | \"break\" | \"zoom\") {\r\n\t\tif (this._clickBehavior != value) {\r\n\t\t\tthis._clickBehavior = value;\r\n\t\t\tthis.initSlices();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @returns Click behavior\r\n\t */\r\n\tpublic get clickBehavior(): \"none\" | \"break\" | \"zoom\" {\r\n\t\treturn this._clickBehavior;\r\n\t}\r\n\r\n\t/**\r\n\t * Disposes the element\r\n\t */\r\n\tpublic dispose(): void {\r\n\t\tthis.disposeClickEvents();\r\n\t\tthis.groupSlice = undefined;\r\n\t\tthis.smallSlices.clear();\r\n\t\tthis.bigSlices.clear();\r\n\t\tsuper.dispose();\r\n\t}\r\n\r\n\tprivate disposeClickEvents(): void {\r\n\t\tconst a = this._clickDisposers;\r\n\t\tthis._clickDisposers = null;\r\n\t\twhile (a.length !== 0) {\r\n\t\t\tconst disposer = a.shift();\r\n\t\t\tdisposer.dispose();\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SliceGrouper\"] = SliceGrouper;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/sliceGrouper/SliceGrouper.ts","import * as m from \"../../es2015/plugins/sliceGrouper\";\nwindow.am4plugins_sliceGrouper = m;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./plugins/sliceGrouper.js\n// module id = null\n// module chunks = "],"sourceRoot":""}