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AAKqG,EAAI,GAC5BuJ,EAAe5P,IAAI,IAAKuG,EAAI,GAE9B,CAEO,gBAAAxF,GAEN,GADArG,MAAMqG,mBACFnG,KAAK+H,QAAQ,WAAY,CAC5B,MAAMsN,EAAUrV,KAAK0F,IAAI,WACzB1F,KAAK8U,WAAW1P,IAAI,UAAWiQ,GAC/BrV,KAAKgV,eAAe5P,IAAI,UAAWiQ,E,CAGpCrV,KAAK+U,cACN,EAhEA,qC,gDAAkC,2BAClC,sC,gDAA0CxB,EAActP,WAAWC,OAAO,CAAC2Q,EAAuB1Q,cCjB5F,MAAMmR,UAAoBlS,EACtB,SAAAE,GACTxD,MAAMwD,YAENtD,KAAK2D,gBAAgBrD,OAAO,CAAEgB,YAAW,EAAMiU,OAAQvV,KAAKC,MAAMsR,kBACnE,EAEA,qC,gDAAkC,gBAClC,sC,gDAA0CnO,EAAaa,WAAWC,OAAO,CAACoR,EAAYnR,a,uECvBhF,MAAMqR,E","sources":["webpack://@amcharts/amcharts5/./src/.internal/charts/percent/PercentDefaultTheme.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/percent/PercentChart.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/percent/PercentSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/pie/PieChart.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/pie/PieSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/funnel/FunnelSlice.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/funnel/FunnelSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/funnel/PyramidSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/funnel/PictorialStackedSeries.ts","webpack://@amcharts/amcharts5/./src/.internal/charts/funnel/SlicedChart.ts","webpack://@amcharts/amcharts5/./tmp/webpack/percent.js"],"sourcesContent":["import { Theme } from \"../../core/Theme\";\r\nimport { percent, p50, p100 } from \"../../core/util/Percent\";\r\nimport { ColorSet } from \"../../core/util/ColorSet\";\r\nimport { setColor } from \"../../themes/DefaultTheme\";\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport class PercentDefaultTheme extends Theme {\r\n\tprotected setupDefaultRules() {\r\n\t\tsuper.setupDefaultRules();\r\n\r\n\t\tconst ic = this._root.interfaceColors;\r\n\t\tconst r = this.rule.bind(this);\r\n\r\n\t\t/**\r\n\t\t * ========================================================================\r\n\t\t * charts/percent\r\n\t\t * ========================================================================\r\n\t\t */\r\n\r\n\t\tr(\"PercentSeries\").setAll({\r\n\t\t\tlegendLabelText: \"{category}\",\r\n\t\t\tlegendValueText: \"{valuePercentTotal.formatNumber('0.00p')}\",\r\n\t\t\tcolors: ColorSet.new(this._root, {}),\r\n\t\t\twidth: p100,\r\n\t\t\theight: p100\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * ========================================================================\r\n\t\t * charts/pie\r\n\t\t * ========================================================================\r\n\t\t */\r\n\r\n\t\tr(\"PieChart\").setAll({\r\n\t\t\tradius: percent(80),\r\n\t\t\tstartAngle: -90,\r\n\t\t\tendAngle: 270\r\n\t\t})\r\n\r\n\t\tr(\"PieSeries\").setAll({\r\n\t\t\talignLabels: true,\r\n\t\t\tstartAngle: -90,\r\n\t\t\tendAngle: 270\r\n\t\t});\r\n\r\n\t\tr(\"PieSeries\").states.create(\"hidden\", { endAngle: -90, opacity: 0 });\r\n\r\n\t\tr(\"Slice\", [\"pie\"]).setAll({\r\n\t\t\tposition: \"absolute\",\r\n\t\t\tisMeasured: false,\r\n\t\t\tx: 0,\r\n\t\t\ty: 0,\r\n\t\t\ttoggleKey: \"active\",\r\n\t\t\ttooltipText: \"{category}: {valuePercentTotal.formatNumber('0.00p')}\",\r\n\t\t\tstrokeWidth: 1,\r\n\t\t\tstrokeOpacity: 1,\r\n\t\t\trole: \"figure\",\r\n\t\t\tlineJoin:\"round\"\r\n\t\t});\r\n\r\n\t\tr(\"Slice\", [\"pie\"]).states.create(\"active\", { shiftRadius: 20, scale: 1 });\r\n\t\tr(\"Slice\", [\"pie\"]).states.create(\"hoverActive\", { scale: 1.04 });\r\n\t\tr(\"Slice\", [\"pie\"]).states.create(\"hover\", { scale: 1.04 });\r\n\r\n\t\tr(\"RadialLabel\", [\"pie\"]).setAll({\r\n\t\t\ttextType: \"aligned\",\r\n\t\t\tradius: 10,\r\n\t\t\ttext: \"{category}: {valuePercentTotal.formatNumber('0.00p')}\",\r\n\t\t\tpaddingTop: 5,\r\n\t\t\tpaddingBottom: 5,\r\n\t\t\tpopulateText: true\r\n\t\t});\r\n\r\n\t\tr(\"Tick\", [\"pie\"]).setAll({\r\n\t\t\tlocation: 1\r\n\t\t});\r\n\r\n\r\n\t\t/**\r\n\t\t * ========================================================================\r\n\t\t * charts/funnel\r\n\t\t * ========================================================================\r\n\t\t */\r\n\r\n\t\tr(\"SlicedChart\").setAll({\r\n\t\t\tpaddingLeft: 10,\r\n\t\t\tpaddingRight: 10,\r\n\t\t\tpaddingTop: 10,\r\n\t\t\tpaddingBottom: 10\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/funnel: Funnel\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"FunnelSeries\").setAll({\r\n\t\t\tstartLocation: 0,\r\n\t\t\tendLocation: 1,\r\n\t\t\torientation: \"vertical\",\r\n\t\t\talignLabels: true,\r\n\t\t\tsequencedInterpolation: true\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\").setAll({\r\n\t\t\tinteractive: true,\r\n\t\t\texpandDistance: 0,\r\n\t\t\t//tooltipText: \"{category}: {valuePercentTotal.formatNumber('0.00p')}\"\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\").states.create(\"hover\", { expandDistance: 0.15 })\r\n\r\n\t\tr(\"Label\", [\"funnel\"]).setAll({\r\n\t\t\tpopulateText: true,\r\n\t\t\ttext: \"{category}: {valuePercentTotal.formatNumber('0.00p')}\",\r\n\t\t\tcenterY: p50\r\n\t\t});\r\n\r\n\t\tr(\"Label\", [\"funnel\", \"horizontal\"]).setAll({\r\n\t\t\tcenterX: 0,\r\n\t\t\tcenterY: p50,\r\n\t\t\trotation: -90\r\n\t\t});\r\n\r\n\t\t// Class: Label\r\n\t\tr(\"Label\", [\"funnel\", \"vertical\"]).setAll({\r\n\t\t\tcenterY: p50,\r\n\t\t\tcenterX: 0\r\n\t\t});\r\n\r\n\t\tr(\"Tick\", [\"funnel\"]).setAll({\r\n\t\t\tlocation: 1\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\", [\"funnel\", \"link\"]).setAll({\r\n\t\t\tfillOpacity: 0.5,\r\n\t\t\tstrokeOpacity: 0,\r\n\t\t\texpandDistance: -0.1\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\", [\"funnel\", \"link\", \"vertical\"]).setAll({\r\n\t\t\theight: 10,\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\", [\"funnel\", \"link\", \"horizontal\"]).setAll({\r\n\t\t\twidth: 10\r\n\t\t});\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/funnel: Pyramid\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\tr(\"PyramidSeries\").setAll({\r\n\t\t\tvalueIs: \"area\"\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\", [\"pyramid\", \"link\"]).setAll({\r\n\t\t\tfillOpacity: 0.5\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\", [\"pyramid\", \"link\", \"vertical\"]).setAll({\r\n\t\t\theight: 0\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\", [\"pyramid\", \"link\", \"horizontal\"]).setAll({\r\n\t\t\twidth: 0\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\", [\"pyramid\"]).setAll({\r\n\t\t\tinteractive: true,\r\n\t\t\texpandDistance: 0\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\", [\"pyramid\"]).states.create(\"hover\", { expandDistance: 0.15 });\r\n\r\n\t\tr(\"Label\", [\"pyramid\"]).setAll({\r\n\t\t\tpopulateText: true,\r\n\t\t\ttext: \"{category}: {valuePercentTotal.formatNumber('0.00p')}\",\r\n\t\t\tcenterY: p50\r\n\t\t});\r\n\r\n\t\tr(\"Label\", [\"pyramid\", \"horizontal\"]).setAll({\r\n\t\t\tcenterX: 0,\r\n\t\t\tcenterY: p50,\r\n\t\t\trotation: -90\r\n\t\t});\r\n\r\n\t\tr(\"Label\", [\"pyramid\", \"vertical\"]).setAll({\r\n\t\t\tcenterY: p50,\r\n\t\t\tcenterX: 0\r\n\t\t});\r\n\r\n\t\tr(\"Tick\", [\"pyramid\"]).setAll({\r\n\t\t\tlocation: 1\r\n\t\t});\r\n\r\n\r\n\t\t/**\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t * charts/funnel: Pictorial\r\n\t\t * ------------------------------------------------------------------------\r\n\t\t */\r\n\r\n\t\t// Class: FunnelSlice\r\n\t\tr(\"FunnelSlice\", [\"pictorial\"]).setAll({\r\n\t\t\tinteractive: true,\r\n\t\t\ttooltipText: \"{category}: {valuePercentTotal.formatNumber('0.00p')}\"\r\n\t\t});\r\n\r\n\t\tr(\"Label\", [\"pictorial\"]).setAll({\r\n\t\t\tpopulateText: true,\r\n\t\t\ttext: \"{category}: {valuePercentTotal.formatNumber('0.00p')}\",\r\n\t\t\tcenterY: p50\r\n\t\t});\r\n\r\n\t\tr(\"Label\", [\"pictorial\", \"horizontal\"]).setAll({\r\n\t\t\tcenterX: 0,\r\n\t\t\tcenterY: p50,\r\n\t\t\trotation: -90\r\n\t\t});\r\n\r\n\t\tr(\"Label\", [\"pictorial\", \"vertical\"]).setAll({\r\n\t\t\tcenterY: p50,\r\n\t\t\tcenterX: 0\r\n\t\t});\r\n\r\n\t\tr(\"FunnelSlice\", [\"pictorial\", \"link\"]).setAll({\r\n\t\t\tfillOpacity: 0.5,\r\n\t\t\twidth: 0,\r\n\t\t\theight: 0\r\n\t\t});\r\n\r\n\t\tr(\"Tick\", [\"pictorial\"]).setAll({\r\n\t\t\tlocation: 0.5\r\n\t\t});\r\n\r\n\t\t{\r\n\t\t\tconst rule = r(\"Graphics\", [\"pictorial\", \"background\"]);\r\n\r\n\t\t\trule.setAll({\r\n\t\t\t\tfillOpacity: 0.2\r\n\t\t\t});\r\n\r\n\t\t\tsetColor(rule, \"fill\", ic, \"alternativeBackground\");\r\n\t\t}\r\n\r\n\t}\r\n}\r\n","import type { PercentSeries } from \"./PercentSeries\";\nimport { SerialChart, ISerialChartPrivate, ISerialChartSettings } from \"../../core/render/SerialChart\";\nimport { PercentDefaultTheme } from \"./PercentDefaultTheme\";\n\nexport interface IPercentChartSettings extends ISerialChartSettings {\n}\n\nexport interface IPercentChartPrivate extends ISerialChartPrivate {\n}\n\n/**\n * Base class for [[PieChart]].\n *\n * Also used for percent-based series, like [[FunnelSeries]], [[PyramidSeries]], etc.\n *\n * @important\n */\nexport abstract class PercentChart extends SerialChart {\n\tpublic static className: string = \"PercentChart\";\n\tpublic static classNames: Array = SerialChart.classNames.concat([PercentChart.className]);\n\n\tdeclare public _settings: IPercentChartSettings;\n\tdeclare public _privateSettings: IPercentChartPrivate;\n\tdeclare public _seriesType: PercentSeries;\n\n\tprotected _afterNew() {\n\t\tthis._defaultThemes.push(PercentDefaultTheme.new(this._root));\n\n\t\tsuper._afterNew();\n\n\t\tthis.chartContainer.children.push(this.seriesContainer);\n\t\tthis.seriesContainer.children.push(this.bulletsContainer);\n\t}\n\n\tprotected _processSeries(series: this[\"_seriesType\"]) {\n\t\tsuper._processSeries(series);\n\t\tthis.seriesContainer.children.moveValue(this.bulletsContainer, this.seriesContainer.children.length - 1);\t\n\t}\t\n}\n","import type { DataItem } from \"../../core/render/Component\";\nimport type { Graphics } from \"../../core/render/Graphics\";\nimport type { Label } from \"../../core/render/Label\";\nimport type { Tick } from \"../../core/render/Tick\";\nimport type { ListTemplate } from \"../../core/util/List\";\nimport type { ColorSet } from \"../../core/util/ColorSet\";\nimport type { ILegendDataItem } from \"../../core/render/Legend\";\nimport type { Color } from \"../../core/util/Color\";\nimport type { PercentChart } from \"./PercentChart\";\nimport type { PatternSet } from \"../../core/util/PatternSet\";\nimport type { Pattern } from \"../../core/render/patterns/Pattern\";\n\nimport { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate } from \"../../core/render/Series\";\nimport { Container } from \"../../core/render/Container\";\nimport { visualSettings } from \"../../core/render/Graphics\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\n\nexport interface IPercentSeriesDataItem extends ISeriesDataItem {\n\n\t/**\n\t * Percent of the series value total.\n\t */\n\tvaluePercentTotal: number;\n\n\t/**\n\t * Category.\n\t */\n\tcategory: string;\n\n\t/**\n\t * Slice visual element.\n\t */\n\tslice: Graphics;\n\n\t/**\n\t * Slice label.\n\t */\n\tlabel: Label;\n\n\t/**\n\t * Slice tick.\n\t */\n\ttick: Tick;\n\n\t/**\n\t * A related legend data item.\n\t */\n\tlegendDataItem: DataItem;\n\n\t/**\n\t * Fill color used for the slice and related elements, e.g. legend marker.\n\t */\n\tfill: Color;\n\n\t/**\n\t * Pattern used for the slice and related elements, e.g. legend marker.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more info\n\t * @since 5.10.0\n\t */\n\tfillPattern: Pattern;\n\n}\n\n//type IPercentSeriesDataItemSettings = { [K in keyof IPercentSeriesDataItem]?: string; };\n\nexport interface IPercentSeriesSettings extends ISeriesSettings {\n\n\t/**\n\t * A [[ColorSet]] to use when asigning colors for slices.\n\t */\n\tcolors?: ColorSet;\n\n\t/**\n\t * A [[PatternSet]] to use when asigning patterns for slices.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/#Pattern_sets} for more info\n\t * @since 5.10.0\n\t */\n\tpatterns?: PatternSet;\n\n\t/**\n\t * A field in data that holds category names.\n\t */\n\tcategoryField?: string;\n\n\t/**\n\t * Should slice labels be aligned in columns/rows?\n\t */\n\talignLabels?: boolean;\n\n\t/**\n\t * A field that holds color for slice fill.\n\t */\n\tfillField?: string;\n\n}\n\nexport interface IPercentSeriesPrivate extends ISeriesPrivate {\n\n\t/**\n\t * Calculate average value in series.\n\t */\n\tvalueAverage?: number;\n\n\t/**\n\t * Count of items in series.\n\t */\n\tvalueCount?: number;\n\n\t/**\n\t * Sum of values in series.\n\t */\n\tvalueSum?: number;\n\n\t/**\n\t * Sum of all absolute values in series.\n\t */\n\tvalueAbsoluteSum?: number;\n\n\t/**\n\t * Lowest value in series.\n\t */\n\tvalueLow?: number;\n\n\t/**\n\t * Highest value in series.\n\t */\n\tvalueHigh?: number;\n\n}\n\n/**\n * A base class for any percent chart series.\n */\nexport abstract class PercentSeries extends Series {\n\tpublic static className: string = \"PercentSeries\";\n\tpublic static classNames: Array = Series.classNames.concat([PercentSeries.className]);\n\n\tdeclare public _settings: IPercentSeriesSettings;\n\tdeclare public _privateSettings: IPercentSeriesPrivate;\n\tdeclare public _dataItemSettings: IPercentSeriesDataItem;\n\n\tdeclare public _sliceType: Graphics;\n\tdeclare public _labelType: Label;\n\tdeclare public _tickType: Tick;\n\n\tpublic readonly slicesContainer = this.children.push(Container.new(this._root, { position: \"absolute\", isMeasured: false }));\n\tpublic readonly labelsContainer = this.children.push(Container.new(this._root, { position: \"absolute\", isMeasured: false }));\n\tpublic readonly ticksContainer = this.children.push(Container.new(this._root, { position: \"absolute\", isMeasured: false }));\n\n\tprotected _lLabels: Array<{ label: Label, y: number }> = [];\n\tprotected _rLabels: Array<{ label: Label, y: number }> = [];\n\tprotected _hLabels: Array<{ label: Label, y: number }> = [];\n\n\t/**\n\t * A [[ListTemplate]] of all slices in series.\n\t *\n\t * `slices.template` can also be used to configure slices.\n\t */\n\tpublic readonly slices: ListTemplate = this.addDisposer(this._makeSlices());\n\n\tprotected abstract _makeSlices(): ListTemplate;\n\n\tpublic abstract chart: PercentChart | undefined;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeSlice(dataItem: DataItem): this[\"_sliceType\"] {\n\t\tconst slice = this.slicesContainer.children.push(this.slices.make());\n\n\t\tslice.on(\"fill\", () => {\n\t\t\tthis.updateLegendMarker(dataItem);\n\t\t})\n\n\t\tslice.on(\"fillPattern\", () => {\n\t\t\tthis.updateLegendMarker(dataItem);\n\t\t})\n\n\t\tslice.on(\"stroke\", () => {\n\t\t\tthis.updateLegendMarker(dataItem);\n\t\t})\n\n\t\tslice._setDataItem(dataItem);\n\t\tdataItem.set(\"slice\", slice);\n\t\tthis.slices.push(slice);\n\n\t\treturn slice;\n\t}\n\n\t/**\n\t * A [[ListTemplate]] of all slice labels in series.\n\t *\n\t * `labels.template` can also be used to configure slice labels.\n\t */\n\tpublic readonly labels: ListTemplate = this.addDisposer(this._makeLabels());\n\n\tprotected abstract _makeLabels(): ListTemplate;\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeLabel(dataItem: DataItem): this[\"_labelType\"] {\n\t\tconst label = this.labelsContainer.children.push(this.labels.make());\n\t\tlabel._setDataItem(dataItem);\n\t\tdataItem.set(\"label\", label);\n\t\tthis.labels.push(label);\n\t\treturn label;\n\t}\n\n\t/**\n\t * A [[ListTemplate]] of all slice ticks in series.\n\t *\n\t * `ticks.template` can also be used to configure slice ticks.\n\t */\n\tpublic readonly ticks: ListTemplate = this.addDisposer(this._makeTicks());\n\n\tprotected abstract _makeTicks(): ListTemplate;\n\n\n\tprotected _shouldMakeBullet(dataItem: DataItem): boolean {\n\t\tif (dataItem.get(\"value\") != null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeTick(dataItem: DataItem): this[\"_tickType\"] {\n\t\tconst tick = this.ticksContainer.children.push(this.ticks.make());\n\t\ttick._setDataItem(dataItem);\n\t\tdataItem.set(\"tick\", tick);\n\t\tthis.ticks.push(tick);\n\t\treturn tick;\n\t}\n\n\tprotected _afterNew() {\n\t\tthis.fields.push(\"category\", \"fill\");\n\t\tsuper._afterNew();\n\t}\n\n\tprotected _onDataClear() {\n\t\tconst colors = this.get(\"colors\");\n\t\tif (colors) {\n\t\t\tcolors.reset();\n\t\t}\n\t\tconst patterns = this.get(\"patterns\");\n\t\tif (patterns) {\n\t\t\tpatterns.reset();\n\t\t}\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tthis._lLabels = [];\n\t\tthis._rLabels = [];\n\t\tthis._hLabels = [];\n\n\t\tif (this._valuesDirty) {\n\t\t\tlet sum = 0;\n\t\t\tlet absSum = 0;\n\t\t\tlet valueHigh = 0;\n\t\t\tlet valueLow = Infinity;\n\t\t\tlet count = 0;\n\t\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\t\tlet valueWorking = dataItem.get(\"valueWorking\", 0);\n\t\t\t\tsum += valueWorking;\n\t\t\t\tabsSum += Math.abs(valueWorking);\n\t\t\t});\n\n\t\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\t\tlet value = dataItem.get(\"valueWorking\", 0);\n\n\t\t\t\tif (value > valueHigh) {\n\t\t\t\t\tvalueHigh = value;\n\t\t\t\t}\n\n\t\t\t\tif (value < valueLow) {\n\t\t\t\t\tvalueLow = value;\n\t\t\t\t}\n\n\t\t\t\tcount++;\n\n\t\t\t\tlet percentTotal = value / absSum;\n\n\t\t\t\tif (absSum == 0) {\n\t\t\t\t\tpercentTotal = 0;\n\t\t\t\t}\n\n\t\t\t\tdataItem.setRaw(\"valuePercentTotal\", percentTotal * 100);\n\t\t\t});\n\n\t\t\tthis.setPrivateRaw(\"valueLow\", valueLow);\n\t\t\tthis.setPrivateRaw(\"valueHigh\", valueHigh);\n\t\t\tthis.setPrivateRaw(\"valueSum\", sum);\n\t\t\tthis.setPrivateRaw(\"valueAverage\", sum / count);\n\t\t\tthis.setPrivateRaw(\"valueAbsoluteSum\", absSum);\n\t\t}\n\t}\n\n\t/**\n\t * Shows hidden series.\n\t *\n\t * @param duration Animation duration in milliseconds\n\t * @return Animation promise\n\t */\n\tpublic async show(duration?: number): Promise {\n\t\tlet promises: Array> = [];\n\t\tpromises.push(super.show(duration))\n\n\t\tpromises.push(this._sequencedShowHide(true, duration));\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Hide whole series.\n\t *\n\t * @param duration Animation duration in milliseconds\n\t * @return Animation promise\n\t */\n\tpublic async hide(duration?: number): Promise {\n\t\tlet promises: Array> = [];\n\t\tpromises.push(super.hide(duration))\n\n\t\tpromises.push(this._sequencedShowHide(false, duration));\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\t\tif (this._valuesDirty) {\n\t\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\t\tdataItem.get(\"label\").text.markDirtyText();\n\t\t\t});\n\t\t}\n\n\t\tif (this.isDirty(\"legendLabelText\") || this.isDirty(\"legendValueText\")) {\n\t\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\t\tthis.updateLegendValue(dataItem);\n\t\t\t});\n\t\t}\n\n\t\tthis._arrange();\n\t}\n\n\tprotected _arrange() {\n\t\tthis._arrangeDown(this._lLabels);\n\t\tthis._arrangeUp(this._lLabels);\n\n\t\tthis._arrangeDown(this._rLabels);\n\t\tthis._arrangeUp(this._rLabels);\n\n\t\tthis._arrangeLeft(this._hLabels);\n\t\tthis._arrangeRight(this._hLabels);\n\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tthis._updateTick(dataItem);\n\t\t})\n\t}\n\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\t\tthis._arrange();\n\t}\n\n\tprotected processDataItem(dataItem: DataItem) {\n\t\tsuper.processDataItem(dataItem);\n\n\t\tif (dataItem.get(\"fill\") == null) {\n\t\t\tlet colors = this.get(\"colors\");\n\t\t\tif (colors) {\n\t\t\t\tdataItem.setRaw(\"fill\", colors.next());\n\t\t\t}\n\t\t}\n\n\t\tif (dataItem.get(\"fillPattern\") == null) {\n\t\t\tlet patterns = this.get(\"patterns\");\n\t\t\tif (patterns) {\n\t\t\t\tdataItem.setRaw(\"fillPattern\", patterns.next());\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Shows series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async showDataItem(dataItem: DataItem, duration?: number): Promise {\n\t\tconst promises = [super.showDataItem(dataItem, duration)];\n\t\tif (!$type.isNumber(duration)) {\n\t\t\tduration = this.get(\"stateAnimationDuration\", 0);\n\t\t}\n\n\t\tconst easing = this.get(\"stateAnimationEasing\");\n\n\t\tlet value = dataItem.get(\"value\");\n\n\t\tconst animation = dataItem.animate({ key: \"valueWorking\", to: value, duration: duration, easing: easing });\n\t\tif (animation) {\n\t\t\tpromises.push(animation.waitForStop());\n\t\t}\n\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\tpromises.push(tick.show(duration));\n\t\t}\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\tpromises.push(label.show(duration));\n\t\t}\n\n\t\tconst slice = dataItem.get(\"slice\");\n\t\tif (slice) {\n\t\t\tpromises.push(slice.show(duration));\n\t\t}\n\n\t\tif (slice.get(\"active\")) {\n\t\t\tslice.states.applyAnimate(\"active\");\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Hides series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async hideDataItem(dataItem: DataItem, duration?: number): Promise {\n\t\tconst promises = [super.hideDataItem(dataItem, duration)];\n\t\tconst hiddenState = this.states.create(\"hidden\", {})\n\n\t\tif (!$type.isNumber(duration)) {\n\t\t\tduration = hiddenState.get(\"stateAnimationDuration\", this.get(\"stateAnimationDuration\", 0));\n\t\t}\n\n\t\tconst easing = hiddenState.get(\"stateAnimationEasing\", this.get(\"stateAnimationEasing\"));\n\n\t\tconst animation = dataItem.animate({ key: \"valueWorking\", to: 0, duration: duration, easing: easing });\n\t\tif (animation) {\n\t\t\tpromises.push(animation.waitForStop());\n\t\t}\n\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\tpromises.push(tick.hide(duration));\n\t\t}\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\tpromises.push(label.hide(duration));\n\t\t}\n\n\t\tconst slice = dataItem.get(\"slice\");\n\t\tslice.hideTooltip();\n\n\t\tif (slice) {\n\t\t\tpromises.push(slice.hide(duration));\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tlet label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\tthis.labels.removeValue(label);\n\t\t\tlabel.dispose();\n\t\t}\n\t\tlet tick = dataItem.get(\"tick\");\n\t\tif (tick) {\n\t\t\tthis.ticks.removeValue(tick);\n\t\t\ttick.dispose();\n\t\t}\n\t\tlet slice = dataItem.get(\"slice\");\n\t\tif (slice) {\n\t\t\tthis.slices.removeValue(slice);\n\t\t\tslice.dispose();\n\t\t}\n\t}\n\n\t/**\n\t * Triggers hover on a series data item.\n\t *\n\t * @since 5.0.7\n\t * @param dataItem Target data item\n\t */\n\tpublic hoverDataItem(dataItem: DataItem) {\n\t\tconst slice = dataItem.get(\"slice\");\n\t\tif (slice && !slice.isHidden()) {\n\t\t\tslice.hover();\n\t\t}\n\t}\n\n\t/**\n\t * Triggers un-hover on a series data item.\n\t *\n\t * @since 5.0.7\n\t * @param dataItem Target data item\n\t */\n\tpublic unhoverDataItem(dataItem: DataItem) {\n\t\tconst slice = dataItem.get(\"slice\");\n\t\tif (slice) {\n\t\t\tslice.unhover();\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateLegendMarker(dataItem: DataItem) {\n\t\tif (dataItem) {\n\t\t\tconst slice = dataItem.get(\"slice\");\n\n\t\t\tif (slice) {\n\t\t\t\tconst legendDataItem = dataItem.get(\"legendDataItem\");\n\t\t\t\tif (legendDataItem) {\n\t\t\t\t\tconst markerRectangle = legendDataItem.get(\"markerRectangle\");\n\t\t\t\t\t$array.each(visualSettings, (setting: any) => {\n\t\t\t\t\t\tif (slice.get(setting) != null) {\n\t\t\t\t\t\t\tmarkerRectangle.set(setting, slice.get(setting));\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _arrangeDown(labels?: Array<{ label: Label, y: number }>) {\n\t\tif (labels) {\n\n\t\t\tlet next = this._getNextDown();\n\n\t\t\tlabels.sort((a, b) => {\n\t\t\t\tif (a.y > b.y) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (a.y < b.y) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t$array.each(labels, (l) => {\n\t\t\t\tconst bounds = l.label.adjustedLocalBounds();\n\t\t\t\tlet labelTop = bounds.top;\n\t\t\t\tif (l.y + labelTop < next) {\n\t\t\t\t\tl.y = next - labelTop;\n\t\t\t\t}\n\t\t\t\tl.label.set(\"y\", l.y);\n\n\t\t\t\tnext = l.y + bounds.bottom;\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _getNextUp() {\n\t\treturn this.labelsContainer.maxHeight();\n\t}\n\n\tprotected _getNextDown() {\n\t\treturn 0;\n\t}\n\n\tprotected _arrangeUp(labels?: Array<{ label: Label, y: number }>) {\n\t\tif (labels) {\n\t\t\tlet next = this._getNextUp();\n\n\t\t\tlabels.sort((a, b) => {\n\t\t\t\tif (a.y < b.y) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (a.y > b.y) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t$array.each(labels, (l) => {\n\t\t\t\tconst bounds = l.label.adjustedLocalBounds();\n\t\t\t\tlet labelBottom = bounds.bottom;\n\t\t\t\tif (l.y + labelBottom > next) {\n\t\t\t\t\tl.y = next - labelBottom;\n\t\t\t\t}\n\t\t\t\tl.label.set(\"y\", l.y);\n\t\t\t\tnext = l.y + bounds.top;\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _arrangeRight(labels?: Array<{ label: Label, y: number }>) {\n\t\tif (labels) {\n\n\t\t\tlet next = 0;\n\n\t\t\tlabels.sort((a, b) => {\n\t\t\t\tif (a.y > b.y) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (a.y < b.y) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t$array.each(labels, (l) => {\n\t\t\t\tconst bounds = l.label.adjustedLocalBounds();\n\t\t\t\tlet labelLeft = bounds.left;\n\t\t\t\tif (l.y + labelLeft < next) {\n\t\t\t\t\tl.y = next - labelLeft;\n\t\t\t\t}\n\t\t\t\tl.label.set(\"x\", l.y);\n\n\t\t\t\tnext = l.y + bounds.right;\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _arrangeLeft(labels?: Array<{ label: Label, y: number }>) {\n\t\tif (labels) {\n\t\t\tlet next = this.labelsContainer.maxWidth();\n\n\t\t\tlabels.sort((a, b) => {\n\t\t\t\tif (a.y < b.y) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (a.y > b.y) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t$array.each(labels, (l) => {\n\t\t\t\tconst bounds = l.label.adjustedLocalBounds();\n\t\t\t\tlet labelRight = bounds.right;\n\t\t\t\tif (l.y + labelRight > next) {\n\t\t\t\t\tl.y = next - labelRight;\n\t\t\t\t}\n\t\t\t\tl.label.set(\"x\", l.y);\n\t\t\t\tnext = l.y + bounds.left;\n\t\t\t})\n\t\t}\n\t}\n\n\tpublic _updateSize() {\n\t\tsuper._updateSize();\n\t\tthis.markDirty();\n\t}\n\n\tprotected _updateTick(_dataItem: DataItem) {\n\n\t}\n\n\tprotected _dispose() {\n\t\tsuper._dispose();\n\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\tchart.series.removeValue(this);\n\t\t}\n\t}\n\n\n}\n","import type { PieSeries } from \"./PieSeries\";\n\nimport { Percent } from \"../../core/util/Percent\";\nimport { PercentChart, IPercentChartPrivate, IPercentChartSettings } from \"../percent/PercentChart\";\nimport { p50 } from \"../../core/util/Percent\";\n\nimport * as $utils from \"../../core/util/Utils\";\nimport * as $math from \"../../core/util/Math\";\n\n\nexport interface IPieChartSettings extends IPercentChartSettings {\n\n\t/**\n\t * Outer radius of the pie chart.\n\t *\n\t * Can be set in fixed pixel value, or relative to chart container size in\n\t * percent.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/pie-chart/#Pie_radius} for more info\n\t * @default 80%\n\t */\n\tradius?: number | Percent;\n\n\t/**\n\t * Inner radius of the pie chart. Setting to any non-zero value will result\n\t * in a donut chart.\n\t *\n\t * Can be set in fixed pixel value, or relative to chart container size in\n\t * percent.\n\t *\n\t * Setting to negative number will mean pixels from outer radius.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/pie-chart/#Pie_radius} for more info\n\t */\n\tinnerRadius?: number | Percent;\n\n\t/**\n\t * A start angle of the chart in degrees.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/pie-chart/#Start_end_angles} for more info\n\t * @default -90\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * An end angle of the chart in degrees.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/pie-chart/#Start_end_angles} for more info\n\t * @default 270\n\t */\n\tendAngle?: number;\n\n}\n\nexport interface IPieChartPrivate extends IPercentChartPrivate {\n\n\t/**\n\t * @ignore\n\t */\n\tirModifyer?: number;\n\n}\n\n/**\n * Creates a pie chart.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/pie-chart/} for more info\n * @important\n */\nexport class PieChart extends PercentChart {\n\n\tpublic static className: string = \"PieChart\";\n\tpublic static classNames: Array = PercentChart.classNames.concat([PieChart.className]);\n\n\tdeclare public _settings: IPieChartSettings;\n\tdeclare public _privateSettings: IPieChartPrivate;\n\tdeclare public _seriesType: PieSeries;\n\n\tpublic _maxRadius: number = 1;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis.seriesContainer.setAll({ x: p50, y: p50 });\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tconst chartContainer = this.chartContainer;\n\t\tconst w = chartContainer.innerWidth();\n\t\tconst h = chartContainer.innerHeight();\n\n\t\tconst startAngle = this.get(\"startAngle\", 0);\n\t\tconst endAngle = this.get(\"endAngle\", 0);\n\t\tconst innerRadius = this.get(\"innerRadius\");\n\n\t\tlet bounds = $math.getArcBounds(0, 0, startAngle, endAngle, 1);\n\n\t\tconst wr = w / (bounds.right - bounds.left);\n\t\tconst hr = h / (bounds.bottom - bounds.top);\n\n\t\tlet innerBounds = { left: 0, right: 0, top: 0, bottom: 0 };\n\n\t\tif (innerRadius instanceof Percent) {\n\t\t\tlet value = innerRadius.value;\n\t\t\tlet mr = Math.min(wr, hr);\n\t\t\tvalue = Math.max(mr * value, mr - Math.min(h, w)) / mr;\n\t\t\tinnerBounds = $math.getArcBounds(0, 0, startAngle, endAngle, value);\n\t\t\tthis.setPrivateRaw(\"irModifyer\", value / innerRadius.value);\n\t\t}\n\n\t\tbounds = $math.mergeBounds([bounds, innerBounds]);\n\n\t\tconst prevRadius = this._maxRadius;\n\t\tthis._maxRadius = Math.min(wr, hr);\n\n\t\tconst radius = $utils.relativeToValue(this.get(\"radius\", 0), this._maxRadius);\n\t\tthis.seriesContainer.setAll({\n\t\t\tdy: -radius * (bounds.bottom + bounds.top) / 2, dx: -radius * (bounds.right + bounds.left) / 2\n\t\t})\n\n\t\tif (this.isDirty(\"startAngle\") || this.isDirty(\"endAngle\") || prevRadius != this._maxRadius) {\n\t\t\tthis.series.each((series) => {\n\t\t\t\tseries._markDirtyKey(\"startAngle\");\n\t\t\t})\n\t\t}\n\n\t\tif(this.isDirty(\"innerRadius\") || this.isDirty(\"radius\")){\n\t\t\tthis.series.each((series) => {\n\t\t\t\tseries._markDirtyKey(\"innerRadius\");\n\t\t\t})\t\t\t\n\t\t}\n\t}\n\n\t/**\n\t * Returns outer radius in pixels.\n\t *\n\t * If optional series parameter is passed in, it will return outer radius\n\t * of that particular series.\n\t *\n\t * @param series Series\n\t * @return Radius in pixels\n\t */\n\tpublic radius(series?: PieSeries): number {\n\n\t\tlet radius = $utils.relativeToValue(this.get(\"radius\", 0), this._maxRadius);\n\t\tlet innerRadius = $utils.relativeToValue(this.get(\"innerRadius\", 0), radius);\n\n\t\tif (series) {\n\t\t\tlet index = this.series.indexOf(series);\n\t\t\tlet length = this.series.length;\n\n\t\t\tlet seriesRadius = series.get(\"radius\");\n\t\t\tif (seriesRadius != null) {\n\t\t\t\treturn innerRadius + $utils.relativeToValue(seriesRadius, radius - innerRadius);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn innerRadius + (radius - innerRadius) / length * (index + 1);\n\t\t\t}\n\t\t}\n\t\treturn radius;\n\t}\n\n\t/**\n\t * Returns inner radius in pixels.\n\t *\n\t * If optional series parameter is passed in, it will return inner radius\n\t * of that particular series.\n\t *\n\t * @param series Series\n\t * @return Radius in pixels\n\t */\n\tpublic innerRadius(series?: PieSeries): number {\n\t\tconst radius = this.radius();\n\t\tlet innerRadius = $utils.relativeToValue(this.get(\"innerRadius\", 0), radius);\n\n\t\tif (innerRadius < 0) {\n\t\t\tinnerRadius = radius + innerRadius;\n\t\t}\n\n\t\tif (series) {\n\t\t\tlet index = this.series.indexOf(series);\n\t\t\tlet length = this.series.length;\n\n\t\t\tlet seriesInnerRadius = series.get(\"innerRadius\");\n\t\t\tif (seriesInnerRadius != null) {\n\t\t\t\treturn innerRadius + $utils.relativeToValue(seriesInnerRadius, radius - innerRadius);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn innerRadius + (radius - innerRadius) / length * index;\n\t\t\t}\n\t\t}\n\t\treturn innerRadius;\n\t}\n\n\tpublic _updateSize() {\n\t\tsuper._updateSize();\n\t\tthis.markDirtyKey(\"radius\");\n\t}\t\t\n}\n","import type { DataItem } from \"../../core/render/Component\";\nimport type { PieChart } from \"./PieChart\";\n\nimport { PercentSeries, IPercentSeriesSettings, IPercentSeriesDataItem, IPercentSeriesPrivate } from \"../percent/PercentSeries\";\nimport { Template } from \"../../core/util/Template\";\nimport type { IPoint } from \"../../core/util/IPoint\";\nimport { Slice } from \"../../core/render/Slice\";\nimport { Tick } from \"../../core/render/Tick\";\nimport { RadialLabel } from \"../../core/render/RadialLabel\";\nimport { ListTemplate } from \"../../core/util/List\";\nimport { p100, Percent } from \"../../core/util/Percent\";\nimport type { Bullet } from \"../../core/render/Bullet\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $math from \"../../core/util/Math\";\nimport * as $utils from \"../../core/util/Utils\";\n\nexport interface IPieSeriesDataItem extends IPercentSeriesDataItem {\n\tslice: Slice;\n\tlabel: RadialLabel;\n}\n\nexport interface IPieSeriesSettings extends IPercentSeriesSettings {\n\n\t/**\n\t * Radius of the series in pixels or percent.\n\t */\n\tradius?: Percent | number;\n\n\t/**\n\t * Radius of the series in pixels or percent.\n\t *\n\t * Setting to negative number will mean pixels from outer radius.\n\t */\n\tinnerRadius?: Percent | number;\n\n\t/**\n\t * Start angle of the series in degrees.\n\t *\n\t * @default -90\n\t */\n\tstartAngle?: number;\n\n\t/**\n\t * End angle of the series in degrees.\n\t *\n\t * @default 270\n\t */\n\tendAngle?: number;\n\n}\n\nexport interface IPieSeriesPrivate extends IPercentSeriesPrivate {\n\n\t/**\n\t * Actual radius of the series in pixels.\n\t */\n\tradius?: number;\n\n}\n\n/**\n * Creates a series for a [[PieChart]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/pie-chart/} for more info\n * @important\n */\nexport class PieSeries extends PercentSeries {\n\n\tdeclare public chart: PieChart | undefined;\n\n\tpublic static className: string = \"PieSeries\";\n\tpublic static classNames: Array = PercentSeries.classNames.concat([PieSeries.className]);\n\n\tdeclare public _settings: IPieSeriesSettings;\n\tdeclare public _privateSettings: IPieSeriesPrivate;\n\tdeclare public _dataItemSettings: IPieSeriesDataItem;\n\n\tdeclare public _sliceType: Slice;\n\tdeclare public _labelType: RadialLabel;\n\n\tprotected _makeSlices(): ListTemplate {\n\t\treturn new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Slice._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(this.slices.template.get(\"themeTags\", []), [\"pie\", \"series\"])\n\t\t\t}, [this.slices.template]),\n\t\t);\n\t}\n\n\tprotected _makeLabels(): ListTemplate {\n\t\treturn new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => RadialLabel._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(this.labels.template.get(\"themeTags\", []), [\"pie\", \"series\"])\n\t\t\t}, [this.labels.template]),\n\t\t);\n\t}\n\n\tprotected _makeTicks(): ListTemplate {\n\t\treturn new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Tick._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(this.ticks.template.get(\"themeTags\", []), [\"pie\", \"series\"])\n\t\t\t}, [this.ticks.template]),\n\t\t);\n\t}\n\n\tprotected processDataItem(dataItem: DataItem) {\n\t\tsuper.processDataItem(dataItem);\n\n\t\tconst slice = this.makeSlice(dataItem);\n\n\t\tslice.on(\"scale\", () => {\n\t\t\tthis._updateTick(dataItem);\n\t\t})\n\t\tslice.on(\"shiftRadius\", () => {\n\t\t\tthis._updateTick(dataItem);\n\t\t})\n\t\tslice.events.on(\"positionchanged\", () => {\n\t\t\tthis._updateTick(dataItem);\n\t\t})\n\n\t\tconst label = this.makeLabel(dataItem);\n\n\t\tlabel.events.on(\"positionchanged\", () => {\n\t\t\tthis._updateTick(dataItem);\n\t\t})\n\n\t\tthis.makeTick(dataItem);\n\n\t\tslice.events.on(\"positionchanged\", () => {\n\t\t\tlabel.markDirty();\n\t\t})\n\t}\n\n\tprotected _getNextUp() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\treturn chart._maxRadius;\n\t\t}\n\t\treturn this.labelsContainer.maxHeight() / 2;\n\t}\n\n\tprotected _getNextDown() {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\treturn -chart._maxRadius;\n\t\t}\n\t\treturn -this.labelsContainer.maxHeight() / 2;\n\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\n\t\t\tif (this.isDirty(\"alignLabels\")) {\n\t\t\t\tlet labelsTemplate = this.labels.template;\n\n\t\t\t\tif (this.get(\"alignLabels\")) {\n\t\t\t\t\tlabelsTemplate.set(\"textType\", \"aligned\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlet textType = labelsTemplate.get(\"textType\");\n\t\t\t\t\tif (textType == null || textType == \"aligned\") {\n\t\t\t\t\t\tlabelsTemplate.set(\"textType\", \"adjusted\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif (this._valuesDirty || this.isDirty(\"radius\") || this.isDirty(\"innerRadius\") || this.isDirty(\"startAngle\") || this.isDirty(\"endAngle\") || this.isDirty(\"alignLabels\")) {\n\t\t\t\tthis.markDirtyBounds();\n\t\t\t\tconst startAngle = this.get(\"startAngle\", chart.get(\"startAngle\", -90));\n\t\t\t\tconst endAngle = this.get(\"endAngle\", chart.get(\"endAngle\", 270));\n\t\t\t\tconst arc = endAngle - startAngle;\n\t\t\t\tlet currentAngle = startAngle;\n\n\t\t\t\tconst radius = chart.radius(this);\n\t\t\t\tthis.setPrivateRaw(\"radius\", radius);\n\t\t\t\tlet innerRadius = chart.innerRadius(this) * chart.getPrivate(\"irModifyer\", 1);\n\n\t\t\t\tif (innerRadius < 0) {\n\t\t\t\t\tinnerRadius = radius + innerRadius;\n\t\t\t\t}\n\n\t\t\t\t//if (radius > 0) {\n\t\t\t\t$array.each(this._dataItems, (dataItem) => {\n\n\t\t\t\t\tthis.updateLegendValue(dataItem);\n\n\t\t\t\t\tlet currentArc = arc * dataItem.get(\"valuePercentTotal\") / 100;\n\t\t\t\t\tconst slice = dataItem.get(\"slice\");\n\t\t\t\t\tif (slice) {\n\t\t\t\t\t\tslice.set(\"radius\", radius);\n\t\t\t\t\t\tslice.set(\"innerRadius\", innerRadius);\n\t\t\t\t\t\tslice.set(\"startAngle\", currentAngle);\n\n\t\t\t\t\t\tslice.set(\"arc\", currentArc);\n\n\t\t\t\t\t\tconst color = dataItem.get(\"fill\");\n\t\t\t\t\t\tslice._setDefault(\"fill\", color);\n\t\t\t\t\t\tslice._setDefault(\"stroke\", color);\n\n\t\t\t\t\t\tconst fillPattern = dataItem.get(\"fillPattern\");\n\t\t\t\t\t\tslice._setDefault(\"fillPattern\", fillPattern);\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tlet middleAngle = $math.normalizeAngle(currentAngle + currentArc / 2);\n\n\t\t\t\t\tconst label = dataItem.get(\"label\");\n\t\t\t\t\tif (label) {\n\t\t\t\t\t\tlabel.setPrivate(\"radius\", radius);\n\t\t\t\t\t\tlabel.setPrivate(\"innerRadius\", innerRadius);\n\t\t\t\t\t\tlabel.set(\"labelAngle\", middleAngle);\n\n\t\t\t\t\t\tif (label.get(\"textType\") == \"aligned\") {\n\t\t\t\t\t\t\tlet labelRadius = radius + label.get(\"radius\", 0);\n\t\t\t\t\t\t\tlet y = radius * $math.sin(middleAngle);\n\n\t\t\t\t\t\t\tif (middleAngle > 90 && middleAngle <= 270) {\n\t\t\t\t\t\t\t\tif (!label.isHidden() && !label.isHiding()) {\n\t\t\t\t\t\t\t\t\tthis._lLabels.push({ label: label, y: y });\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlabelRadius *= -1;\n\t\t\t\t\t\t\t\tlabelRadius -= this.labelsContainer.get(\"paddingLeft\", 0);\n\t\t\t\t\t\t\t\tlabel.set(\"centerX\", p100);\n\t\t\t\t\t\t\t\tlabel.setPrivateRaw(\"left\", true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (!label.isHidden() && !label.isHiding()) {\n\t\t\t\t\t\t\t\t\tthis._rLabels.push({ label: label, y: y });\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlabelRadius += this.labelsContainer.get(\"paddingRight\", 0);\n\t\t\t\t\t\t\t\tlabel.set(\"centerX\", 0);\n\t\t\t\t\t\t\t\tlabel.setPrivateRaw(\"left\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlabel.set(\"x\", labelRadius);\n\t\t\t\t\t\t\tlabel.set(\"y\", radius * $math.sin(middleAngle));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrentAngle += currentArc;\n\t\t\t\t\tthis._updateTick(dataItem);\n\t\t\t\t})\n\t\t\t\t//}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _updateTick(dataItem: DataItem) {\n\t\tconst tick = dataItem.get(\"tick\");\n\t\tconst label = dataItem.get(\"label\");\n\t\tconst slice = dataItem.get(\"slice\");\n\t\tconst location = tick.get(\"location\", 1);\n\t\tif (tick && label && slice) {\n\t\t\tconst radius = (slice.get(\"shiftRadius\", 0) + slice.get(\"radius\", 0)) * slice.get(\"scale\", 1) * location;\n\t\t\tconst labelAngle = label.get(\"labelAngle\", 0);\n\t\t\tconst cos = $math.cos(labelAngle);\n\t\t\tconst sin = $math.sin(labelAngle);\n\n\t\t\tconst labelsContainer = this.labelsContainer;\n\t\t\tconst pl = labelsContainer.get(\"paddingLeft\", 0);\n\t\t\tconst pr = labelsContainer.get(\"paddingRight\", 0);\n\n\t\t\tlet x = 0;\n\t\t\tlet y = 0;\n\n\t\t\tx = label.x();\n\t\t\ty = label.y();\n\t\t\tlet points:Array = [];\n\n\t\t\tif(x != 0 || y != 0){\n\t\t\t\tif (label.get(\"textType\") == \"circular\") {\n\t\t\t\t\tconst labelRadius = label.radius() - label.get(\"paddingBottom\", 0);\n\t\t\t\t\tconst labelAngle = label.get(\"labelAngle\", 0);\n\t\t\t\t\tx = labelRadius * $math.cos(labelAngle);\n\t\t\t\t\ty = labelRadius * $math.sin(labelAngle);\n\t\t\t\t}\n\n\t\t\t\tlet dx = -pr;\n\t\t\t\tif (label.getPrivate(\"left\")) {\n\t\t\t\t\tdx = pl;\n\t\t\t\t}\n\t\t\t\tpoints = [{ x: slice.x() + radius * cos, y: slice.y() + radius * sin }, { x: x + dx, y: y }, { x: x, y: y }];\t\t\t\t\n\t\t\t}\n\n\t\t\ttick.set(\"points\", points);\n\t\t}\n\t}\n\n\tpublic _positionBullet(bullet: Bullet) {\n\n\t\tconst sprite = bullet.get(\"sprite\");\n\t\tif (sprite) {\n\t\t\tconst dataItem = sprite.dataItem as DataItem;\n\t\t\tconst slice = dataItem.get(\"slice\");\n\n\t\t\tif (slice) {\n\t\t\t\tconst innerRadius = slice.get(\"innerRadius\", 0);\n\t\t\t\tconst radius = slice.get(\"radius\", 0);\n\t\t\t\tconst startAngle = slice.get(\"startAngle\", 0);\n\t\t\t\tconst arc = slice.get(\"arc\", 0);\n\t\t\t\tconst locationX = bullet.get(\"locationX\", 0.5);\n\t\t\t\tconst locationY = bullet.get(\"locationY\", 0.5);\n\n\t\t\t\tconst angle = startAngle + arc * locationX;\n\t\t\t\tconst r = innerRadius + (radius - innerRadius) * locationY;\n\n\t\t\t\tsprite.setAll({ x: $math.cos(angle) * r, y: $math.sin(angle) * r });\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"../../core/render/Graphics\";\nimport type { IPoint } from \"../../core/util/IPoint\";\n\nexport interface IFunnelSliceSettings extends IGraphicsSettings {\n\n\t/**\n\t * Top width in pixels.\n\t */\n\ttopWidth?: number;\n\n\t/**\n\t * Bottom width in pixels.\n\t */\n\tbottomWidth?: number;\n\n\t/**\n\t * Orientation.\n\t */\n\torientation?: \"vertical\" | \"horizontal\";\n\n\t/**\n\t * A distance in pixels the slice should \"puff up\".\n\t *\n\t * Any non-zero value will make sides of the slide curved.\n\t */\n\texpandDistance?: number;\n\n}\n\nexport interface IFunnelSlicePrivate extends IGraphicsPrivate {\n}\n\n/**\n * Draws a slice for [[FunnelSeries]].\n */\nexport class FunnelSlice extends Graphics {\n\tdeclare public _settings: IFunnelSliceSettings;\n\tdeclare public _privateSettings: IFunnelSlicePrivate;\n\n\tpublic static className: string = \"FunnelSlice\";\n\tpublic static classNames: Array = Graphics.classNames.concat([FunnelSlice.className]);\n\tprotected _projectionDirty: boolean = false;\n\n\tprotected _tlx: number = 0;\n\tprotected _tly: number = 0;\n\n\tprotected _trx: number = 0;\n\tprotected _try: number = 0;\n\n\tprotected _blx: number = 0;\n\tprotected _bly: number = 0;\n\n\tprotected _brx: number = 0;\n\tprotected _bry: number = 0;\n\n\tprotected _cprx: number = 0;\n\tprotected _cplx: number = 0;\n\tprotected _cpry: number = 0;\n\tprotected _cply: number = 0;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis.set(\"draw\", (display) => {\n\t\t\tdisplay.moveTo(this._tlx, this._tly);\n\t\t\tdisplay.lineTo(this._trx, this._try);\n\t\t\tdisplay.quadraticCurveTo(this._cprx, this._cpry, this._brx, this._bry);\n\t\t\tdisplay.lineTo(this._blx, this._bly);\n\t\t\tdisplay.quadraticCurveTo(this._cplx, this._cply, this._tlx, this._tly);\n\t\t})\n\t}\n\n\tpublic getPoint(locationX: number, locationY: number): IPoint {\n\t\tlet w = this.width();\n\t\tlet h = this.height();\n\n\t\tconst tw = this.get(\"topWidth\", 0);\n\t\tconst bw = this.get(\"bottomWidth\", 0);\n\n\t\tif (this.get(\"orientation\") == \"vertical\") {\n\t\t\tlet tlx = -tw / 2;\n\t\t\tlet trx = tw / 2;\n\n\t\t\tlet brx = bw / 2;\n\t\t\tlet blx = - bw / 2;\n\n\t\t\tlet mlx = tlx + (blx - tlx) * locationY;\n\t\t\tlet mrx = trx + (brx - trx) * locationY;\n\n\t\t\treturn { x: mlx + (mrx - mlx) * locationX, y: h * locationY };\n\t\t}\n\t\telse {\n\t\t\tlet tlx = -tw / 2;\n\t\t\tlet trx = tw / 2;\n\n\t\t\tlet brx = bw / 2;\n\t\t\tlet blx = - bw / 2;\n\n\t\t\tlet mlx = tlx + (blx - tlx) * locationX;\n\t\t\tlet mrx = trx + (brx - trx) * locationX;\n\n\t\t\treturn { x: w * locationX, y: mlx + (mrx - mlx) * locationY};\n\t\t}\n\n\t}\n\n\tpublic _changed() {\n\n\t\tif (this.isDirty(\"topWidth\") || this.isDirty(\"bottomWidth\") || this.isDirty(\"expandDistance\") || this.isDirty(\"orientation\") || this.isDirty(\"width\") || this.isDirty(\"height\")) {\n\t\t\tconst w = this.width();\n\t\t\tconst h = this.height();\n\t\t\tconst tw = this.get(\"topWidth\", 0);\n\t\t\tconst bw = this.get(\"bottomWidth\", 0);\n\t\t\tthis._clear = true;\n\n\t\t\tlet ed = this.get(\"expandDistance\", 0);\n\n\t\t\tif (this.get(\"orientation\") == \"vertical\") {\n\t\t\t\tthis._tlx = -tw / 2;\n\t\t\t\tthis._tly = 0;\n\n\t\t\t\tthis._trx = tw / 2;\n\t\t\t\tthis._try = 0;\n\n\t\t\t\tthis._brx = bw / 2;\n\t\t\t\tthis._bry = h;\n\n\t\t\t\tthis._blx = -bw / 2;\n\t\t\t\tthis._bly = h;\n\n\t\t\t\tthis._cprx = this._trx + (this._brx - this._trx) / 2 + ed * h,\n\t\t\t\tthis._cpry = this._try + 0.5 * h;\n\n\t\t\t\tthis._cplx = this._tlx + (this._blx - this._tlx) / 2 - ed * h;\n\t\t\t\tthis._cply = this._tly + 0.5 * h;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._tly = -tw / 2;\n\t\t\t\tthis._tlx = 0;\n\n\t\t\t\tthis._try = tw / 2;\n\t\t\t\tthis._trx = 0;\n\n\t\t\t\tthis._bry = bw / 2;\n\t\t\t\tthis._brx = w;\n\n\t\t\t\tthis._bly = -bw / 2;\n\t\t\t\tthis._blx = w;\n\n\t\t\t\tthis._cpry = this._try + (this._bry - this._try) / 2 + ed * w,\n\t\t\t\tthis._cprx = this._trx + 0.5 * w;\n\n\t\t\t\tthis._cply = this._tly + (this._bly - this._tly) / 2 - ed * w;\n\t\t\t\tthis._cplx = this._tlx + 0.5 * w;\n\t\t\t}\n\t\t}\n\t\tsuper._changed();\n\t}\n}\n","import type { DataItem } from \"../../core/render/Component\";\nimport type { SlicedChart } from \"./SlicedChart\";\n\nimport { PercentSeries, IPercentSeriesSettings, IPercentSeriesDataItem, IPercentSeriesPrivate } from \"../percent/PercentSeries\";\nimport { Template } from \"../../core/util/Template\";\nimport { ListTemplate } from \"../../core/util/List\";\nimport { FunnelSlice } from \"./FunnelSlice\";\nimport { Tick } from \"../../core/render/Tick\";\nimport { Label } from \"../../core/render/Label\";\nimport { percent, p50, p100 } from \"../../core/util/Percent\";\nimport type { Bullet } from \"../../core/render/Bullet\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $utils from \"../../core/util/Utils\";\n\n\nexport interface IFunnelSeriesDataItem extends IPercentSeriesDataItem {\n\n\t/**\n\t * A related slice element.\n\t */\n\tslice: FunnelSlice;\n\n\t/**\n\t * A related slice link element\n\t */\n\tlink: FunnelSlice;\n\n\t/**\n\t * Data item's index.\n\t */\n\tindex: number;\n\n}\n\nexport interface IFunnelSeriesSettings extends IPercentSeriesSettings {\n\n\t/**\n\t * Width of the bottom edge of the slice relative to the top edge of the next\n\t * slice.\n\t *\n\t * `1` - means the full width of the slice, resulting in a rectangle.\n\t * `0` - means using width of the next slice, resulting in a trapezoid.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/funnel-series/#Slice_bottom_width} for more info\n\t * @default 1\n\t */\n\tbottomRatio?: number;\n\n\t/**\n\t * Orientation of the series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/#Series_orientation} for more info\n\t * @default \"vertical\"\n\t */\n\torientation: \"horizontal\" | \"vertical\";\n\n\t/**\n\t * If set to `true`, series will not create slices for data items with zero\n\t * value.\n\t */\n\tignoreZeroValues?: boolean;\n\n\t/**\n\t * Should labels be aligned into columns/rows?\n\t *\n\t * @default false\n\t */\n\talignLabels?: boolean;\n\n\t/**\n\t * Relative location within area available to series where it should start.\n\t *\n\t * `0` - beginning, `1` - end, or any intermediate value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/funnel-series/#Start_end_locations} for more info\n\t * @default 0\n\t */\n\tstartLocation?: number;\n\n\t/**\n\t * Relative location within area available to series where it should start.\n\t *\n\t * `0` - beginning, `1` - end, or any intermediate value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/funnel-series/#Start_end_locations} for more info\n\t * @default 0\n\t */\n\tendLocation?: number;\n\n}\n\nexport interface IFunnelSeriesPrivate extends IPercentSeriesPrivate {\n}\n\n/**\n * Creates a funnel series for use in a [[SlicedChart]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/funnel-series/} for more info\n * @important\n */\nexport class FunnelSeries extends PercentSeries {\n\n\t/**\n\t * A chart series is attached to.\n\t */\n\tdeclare public chart: SlicedChart | undefined;\n\n\tprotected _tag = \"funnel\";\n\n\tdeclare public _sliceType: FunnelSlice;\n\tdeclare public _labelType: Label;\n\tdeclare public _tickType: Tick;\n\n\tprotected _makeSlices(): ListTemplate {\n\t\treturn new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => FunnelSlice._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(this.slices.template.get(\"themeTags\", []), [this._tag, \"series\", \"slice\", this.get(\"orientation\")])\n\t\t\t}, [this.slices.template])\n\t\t);\n\t}\n\n\tprotected _makeLabels(): ListTemplate {\n\t\treturn new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Label._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(this.labels.template.get(\"themeTags\", []), [this._tag, \"series\", \"label\", this.get(\"orientation\")])\n\t\t\t}, [this.labels.template])\n\t\t);\n\t}\n\n\tprotected _makeTicks(): ListTemplate {\n\t\treturn new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => Tick._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(this.ticks.template.get(\"themeTags\", []), [this._tag, \"series\", \"tick\", this.get(\"orientation\")])\n\t\t\t}, [this.ticks.template])\n\t\t);\n\t}\n\n\t/**\n\t * A [[ListTemplate]] of all slice links in series.\n\t *\n\t * `links.template` can also be used to configure slice links.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/funnel-series/#Slice_links} for more info\n\t */\n\tpublic readonly links: ListTemplate = this.addDisposer(this._makeLinks());\n\n\tprotected _makeLinks(): ListTemplate {\n\t\treturn new ListTemplate(\n\t\t\tTemplate.new({}),\n\t\t\t() => FunnelSlice._new(this._root, {\n\t\t\t\tthemeTags: $utils.mergeTags(this.links.template.get(\"themeTags\", []), [this._tag, \"series\", \"link\", this.get(\"orientation\")])\n\t\t\t}, [this.links.template]),\n\t\t);\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeLink(dataItem: DataItem): this[\"_sliceType\"] {\n\t\tconst link = this.slicesContainer.children.push(this.links.make());\n\t\tlink._setDataItem(dataItem);\n\t\tdataItem.set(\"link\", link);\n\t\tthis.links.push(link);\n\t\treturn link;\n\t}\n\n\tpublic static className: string = \"FunnelSeries\";\n\tpublic static classNames: Array = PercentSeries.classNames.concat([FunnelSeries.className]);\n\n\tdeclare public _settings: IFunnelSeriesSettings;\n\tdeclare public _privateSettings: IFunnelSeriesPrivate;\n\tdeclare public _dataItemSettings: IFunnelSeriesDataItem;\n\n\tprotected _total: number = 0;\n\tprotected _count: number = 0;\n\tprotected _nextCoord: number = 0;\n\n\tprotected _opposite: boolean = false;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tconst slicesContainer = this.slicesContainer;\n\t\tslicesContainer.setAll({ isMeasured: true, position: \"relative\", width: percent(100), height: percent(100) });\n\t\tslicesContainer.onPrivate(\"width\", () => {\n\t\t\tthis.markDirtySize();\n\t\t})\n\n\t\tslicesContainer.onPrivate(\"height\", () => {\n\t\t\tthis.markDirtySize();\n\t\t})\n\n\t\tif (this.get(\"orientation\") == \"vertical\") {\n\t\t\tthis.set(\"layout\", this._root.horizontalLayout);\n\t\t}\n\t\telse {\n\t\t\tthis.set(\"layout\", this._root.verticalLayout);\n\t\t}\n\t}\n\n\tprotected processDataItem(dataItem: DataItem) {\n\t\tsuper.processDataItem(dataItem);\n\n\t\tconst slice = this.makeSlice(dataItem);\n\n\t\tslice._setDataItem(dataItem);\n\n\t\tdataItem.set(\"slice\", slice);\n\n\t\tthis.makeLink(dataItem);\n\t\tconst label = this.makeLabel(dataItem);\n\n\t\tlabel.on(\"x\", () => {\n\t\t\tthis._updateTick(dataItem);\n\t\t})\n\n\t\tlabel.on(\"y\", () => {\n\t\t\tthis._updateTick(dataItem);\n\t\t})\n\n\t\tthis.makeTick(dataItem);\n\n\t\tslice.events.on(\"positionchanged\", () => {\n\t\t\tlabel.markDirty();\n\t\t})\n\n\t\tslice.events.on(\"boundschanged\", () => {\n\t\t\tconst dataItem = slice.dataItem;\n\t\t\tif (dataItem) {\n\t\t\t\tthis._updateTick(dataItem as any);\n\t\t\t}\n\t\t})\n\t}\n\n\n\tpublic _updateChildren() {\n\t\tthis._opposite = false;\n\t\tif (this.children.indexOf(this.labelsContainer) == 0) {\n\t\t\tthis._opposite = true;\n\t\t}\n\n\t\tlet total = 0;\n\t\tlet count = 0;\n\n\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\tconst value = dataItem.get(\"value\");\n\t\t\tif ($type.isNumber(value)) {\n\t\t\t\tcount++;\n\t\t\t\tif (value > 0) {\n\t\t\t\t\ttotal += Math.abs(dataItem.get(\"valueWorking\", value) / value);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (this.get(\"ignoreZeroValues\", false)) {\n\t\t\t\t\t\tcount--;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (dataItem.isHidden()) {\n\t\t\t\t\t\t\tcount--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttotal += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis._total = 1 / count * total;\n\t\tthis._count = count;\n\n\t\tif (this.isDirty(\"alignLabels\")) {\n\t\t\tthis._fixLayout();\n\t\t}\n\n\t\tif (this._total > 0 && (this._valuesDirty || this._sizeDirty)) {\n\n\t\t\tconst slicesContainer = this.slicesContainer;\n\n\t\t\tlet h: number;\n\t\t\tif (this.get(\"orientation\") == \"vertical\") {\n\t\t\t\th = slicesContainer.innerHeight();\n\t\t\t}\n\t\t\telse {\n\t\t\t\th = slicesContainer.innerWidth();\n\t\t\t}\n\n\t\t\tthis._nextCoord = this.get(\"startLocation\", 0) * h;\n\n\t\t\tthis.markDirtyBounds();\n\n\t\t\tlet i = 0;\n\t\t\t$array.each(this._dataItems, (dataItem) => {\n\t\t\t\tthis.updateLegendValue(dataItem);\n\n\t\t\t\tdataItem.set(\"index\", i);\n\t\t\t\ti++;\n\n\t\t\t\tconst slice = dataItem.get(\"slice\");\n\t\t\t\tconst tick = dataItem.get(\"tick\");\n\t\t\t\tconst label = dataItem.get(\"label\");\n\t\t\t\tconst link = dataItem.get(\"link\");\n\t\t\t\tconst color = dataItem.get(\"fill\");\n\t\t\t\tconst fillPattern = dataItem.get(\"fillPattern\");\n\n\t\t\t\tslice._setDefault(\"fill\", color);\n\t\t\t\tslice._setDefault(\"stroke\", color);\n\t\t\t\tslice._setDefault(\"fillPattern\", fillPattern);\n\t\t\t\tlink._setDefault(\"fill\", color);\n\t\t\t\tlink._setDefault(\"stroke\", color);\n\n\t\t\t\tconst value = dataItem.get(\"value\");\n\t\t\t\tif ($type.isNumber(value)) {\n\t\t\t\t\tif (value == 0 && this.get(\"ignoreZeroValues\")) {\n\t\t\t\t\t\tslice.setPrivate(\"visible\", false);\n\t\t\t\t\t\ttick.setPrivate(\"visible\", false);\n\t\t\t\t\t\tlabel.setPrivate(\"visible\", false);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tslice.setPrivate(\"visible\", true);\n\t\t\t\t\t\ttick.setPrivate(\"visible\", true);\n\t\t\t\t\t\tlabel.setPrivate(\"visible\", true);\n\n\t\t\t\t\t\tthis.decorateSlice(dataItem);\n\n\t\t\t\t\t\tif (this.isLast(dataItem)) {\n\t\t\t\t\t\t\tlink.setPrivate(\"visible\", false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!dataItem.isHidden()) {\n\t\t\t\t\t\t\tlink.setPrivate(\"visible\", true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tsuper._updateChildren();\n\t}\n\n\tprotected _fixLayout() {\n\n\t\tconst orientation = this.get(\"orientation\");\n\t\tconst labelsContainer = this.labelsContainer;\n\t\tconst labelsTemplate = this.labels.template;\n\n\t\tif (this.get(\"alignLabels\")) {\n\t\t\tlabelsContainer.set(\"position\", \"relative\");\n\t\t\tlabelsContainer.setAll({ isMeasured: true });\n\t\t\tif (orientation == \"vertical\") {\n\t\t\t\tthis.set(\"layout\", this._root.horizontalLayout);\n\t\t\t\tlabelsTemplate.setAll({ centerX: p100, x: p100 });\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.set(\"layout\", this._root.verticalLayout);\n\t\t\t\tlabelsTemplate.setAll({ centerX: 0, x: 0 });\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tlabelsContainer.setAll({ isMeasured: false, position: \"absolute\" });\n\t\t\tif (orientation == \"vertical\") {\n\t\t\t\tlabelsContainer.setAll({ x: p50 });\n\t\t\t\tlabelsTemplate.setAll({ centerX: p50, x: 0 });\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlabelsContainer.setAll({ y: p50 });\n\t\t\t\tlabelsTemplate.setAll({ centerX: p50, y: 0 });\n\t\t\t}\n\t\t}\n\t\tthis.markDirtySize();\n\t}\n\n\tprotected getNextValue(dataItem: DataItem): number {\n\t\tlet index = dataItem.get(\"index\");\n\t\tlet nextValue = dataItem.get(\"valueWorking\", 0);\n\t\tif (index < this.dataItems.length - 1) {\n\t\t\tlet nextItem = this.dataItems[index + 1];\n\t\t\tnextValue = nextItem.get(\"valueWorking\", 0);\n\n\t\t\tif (nextItem.isHidden() || (nextItem.get(\"value\") == 0 && this.get(\"ignoreZeroValues\"))) {\n\t\t\t\treturn this.getNextValue(nextItem);\n\t\t\t}\n\t\t}\n\t\treturn nextValue;\n\t}\n\n\tprotected isLast(dataItem: DataItem): boolean {\n\t\tlet index = dataItem.get(\"index\");\n\t\tif (index == this.dataItems.length - 1) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\tfor (let i = index + 1; i < this.dataItems.length; i++) {\n\t\t\t\tif (!this.dataItems[i].isHidden()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprotected decorateSlice(dataItem: DataItem) {\n\t\tconst orientation = this.get(\"orientation\");\n\n\t\tconst slice = dataItem.get(\"slice\");\n\t\tconst label = dataItem.get(\"label\");\n\t\tconst link = dataItem.get(\"link\");\n\n\t\tconst slicesContainer = this.slicesContainer;\n\n\t\tlet maxWidth = slicesContainer.innerWidth();\n\t\tlet maxHeight = slicesContainer.innerHeight();\n\n\t\tlet maxSize = maxWidth;\n\t\tif (orientation == \"horizontal\") {\n\t\t\tmaxSize = maxHeight;\n\t\t}\n\n\t\tconst nextValue = this.getNextValue(dataItem);\n\t\tconst value = dataItem.get(\"value\", 0);\n\t\tconst workingValue = Math.abs(dataItem.get(\"valueWorking\", value));\n\t\tconst bottomRatio = this.get(\"bottomRatio\", 0);\n\t\tconst valueHigh = this.getPrivate(\"valueHigh\", 0);\n\n\n\t\tlet d = 1;\n\t\tif (value != 0) {\n\t\t\td = workingValue / Math.abs(value);\n\t\t}\n\t\telse {\n\t\t\tif (dataItem.isHidden()) {\n\t\t\t\td = 0.000001;\n\t\t\t}\n\t\t}\n\n\t\tif (this._nextCoord == Infinity) {\n\t\t\tthis._nextCoord = 0;\n\t\t}\n\n\t\tlet topWidth = workingValue / valueHigh * maxSize;\n\t\tlet bottomWidth = (workingValue - (workingValue - nextValue) * bottomRatio) / valueHigh * maxSize;\n\n\t\tslice.setAll({ topWidth, bottomWidth, orientation });\n\t\tlink.setAll({ topWidth: bottomWidth, bottomWidth: (workingValue - (workingValue - nextValue)) / valueHigh * maxSize, orientation });\n\n\t\tconst startLocation = this.get(\"startLocation\", 0);\n\t\tconst endLocation = this.get(\"endLocation\", 1);\n\n\t\tif (orientation == \"vertical\") {\n\n\t\t\tlet linkHeight = link.height() * d;\n\n\t\t\tmaxHeight = maxHeight * (endLocation - startLocation) + linkHeight;\n\n\t\t\tslice.set(\"y\", this._nextCoord);\n\n\t\t\tlet height = Math.min(100000, Math.max(0, maxHeight / this._count * d / this._total - linkHeight));\n\n\t\t\tslice.setAll({ height, x: maxWidth / 2 });\n\t\t\tlet labelY = this._nextCoord + height / 2;\n\t\t\tlabel.set(\"y\", labelY);\n\n\t\t\tthis._nextCoord += height + linkHeight;\n\t\t\tlink.setAll({ y: this._nextCoord - linkHeight, x: maxWidth / 2 });\n\t\t}\n\t\telse {\n\t\t\tlet linkHeight = link.width() * d;\n\n\t\t\tmaxWidth = maxWidth * (endLocation - startLocation) + linkHeight;\n\n\t\t\tslice.set(\"x\", this._nextCoord);\n\n\t\t\tlet width = Math.min(100000, Math.max(0, maxWidth / this._count * d / this._total - linkHeight));\n\n\t\t\tslice.setAll({ width, y: maxHeight / 2 });\n\t\t\tconst labelX = this._nextCoord + width / 2;\n\t\t\tlabel.set(\"x\", labelX);\n\n\t\t\tthis._nextCoord += width + linkHeight;\n\t\t\tlink.setAll({ x: this._nextCoord - linkHeight, y: maxHeight / 2 });\n\t\t}\n\t}\n\n\t/**\n\t * Hides series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async hideDataItem(dataItem: DataItem, duration?: number): Promise {\n\t\tdataItem.get(\"link\").hide(duration);\n\t\treturn super.hideDataItem(dataItem, duration)\n\t}\n\n\t/**\n\t * Shows series's data item.\n\t *\n\t * @param dataItem Data item\n\t * @param duration Animation duration in milliseconds\n\t * @return Promise\n\t */\n\tpublic async showDataItem(dataItem: DataItem, duration?: number): Promise {\n\t\tdataItem.get(\"link\").show(duration);\n\t\treturn super.showDataItem(dataItem, duration)\n\t}\n\n\tprotected _updateTick(dataItem: DataItem) {\n\t\tif (this.get(\"alignLabels\")) {\n\t\t\tconst tick = dataItem.get(\"tick\");\n\t\t\tconst label = dataItem.get(\"label\");\n\t\t\tconst slice = dataItem.get(\"slice\");\n\n\t\t\tif (tick && slice && label) {\n\n\t\t\t\tconst labelsContainer = this.labelsContainer;\n\t\t\t\tconst slicesContainer = this.slicesContainer;\n\t\t\t\tlet tickLocation = tick.get(\"location\", 0.5);\n\n\t\t\t\tconst lcw = labelsContainer.width();\n\t\t\t\tconst lch = labelsContainer.height();\n\n\t\t\t\tconst pl = labelsContainer.get(\"paddingLeft\", 0);\n\t\t\t\tconst pr = labelsContainer.get(\"paddingRight\", 0);\n\t\t\t\tconst pt = labelsContainer.get(\"paddingTop\", 0);\n\t\t\t\tconst pb = labelsContainer.get(\"paddingBottom\", 0);\n\n\t\t\t\tlet p0 = { x: 0, y: 0 };\n\t\t\t\tlet p1 = { x: 0, y: 0 };\n\t\t\t\tlet p2 = { x: 0, y: 0 };\n\n\t\t\t\tif (this._opposite) {\n\t\t\t\t\ttickLocation = 1 - tickLocation;\n\t\t\t\t}\n\n\t\t\t\tif (this.get(\"orientation\") == \"vertical\") {\n\t\t\t\t\tp0 = slice.getPoint(tickLocation, 0.5);\n\t\t\t\t\tp0.x += slice.x() + slicesContainer.x();\n\t\t\t\t\tp0.y += slice.y() + slicesContainer.y();\n\n\t\t\t\t\tif (this._opposite) {\n\t\t\t\t\t\tp1.x = lcw;\n\t\t\t\t\t\tp1.y = label.y();\n\n\t\t\t\t\t\tp2.x = lcw - pl;\n\t\t\t\t\t\tp2.y = p1.y;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp1.x = slicesContainer.x() + slicesContainer.width();\n\t\t\t\t\t\tp1.y = label.y();\n\n\t\t\t\t\t\tp2.x = p1.x + lcw - label.width() - pr;\n\t\t\t\t\t\tp2.y = p1.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tp0 = slice.getPoint(0.5, tickLocation);\n\t\t\t\t\tp0.x += slice.x() + slicesContainer.x();\n\t\t\t\t\tp0.y += slice.y() + slicesContainer.y();\n\n\t\t\t\t\tif (this._opposite) {\n\t\t\t\t\t\tp1.y = lch;\n\t\t\t\t\t\tp1.x = label.x();\n\n\t\t\t\t\t\tp2.y = lch - pt;\n\t\t\t\t\t\tp2.x = p1.x;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp1.y = slicesContainer.y() + slicesContainer.height();\n\t\t\t\t\t\tp1.x = label.x();\n\n\t\t\t\t\t\tp2.y = p1.y + lch - label.height() - pb;\n\t\t\t\t\t\tp2.x = p1.x;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttick.set(\"points\", [p0, p1, p2]);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tlet link = dataItem.get(\"link\");\n\t\tif (link) {\n\t\t\tthis.links.removeValue(link);\n\t\t\tlink.dispose();\n\t\t}\n\t}\n\n\tpublic _positionBullet(bullet: Bullet) {\n\n\t\tconst sprite = bullet.get(\"sprite\");\n\t\tif (sprite) {\n\t\t\tconst dataItem = sprite.dataItem as DataItem;\n\t\t\tconst slice = dataItem.get(\"slice\");\n\n\t\t\tif (slice) {\n\t\t\t\tconst width = slice.width();\n\t\t\t\tconst height = slice.height();\n\t\t\t\tconst locationX = bullet.get(\"locationX\", 0.5);\n\t\t\t\tconst locationY = bullet.get(\"locationY\", 0.5);\n\n\t\t\t\tlet dx = 0;\n\t\t\t\tlet dy = 0;\n\t\t\t\tif (this.get(\"orientation\") == \"horizontal\") {\n\t\t\t\t\tdy = height / 2\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdx = width / 2\n\t\t\t\t}\n\n\t\t\t\tsprite.setAll({ x: slice.x() + width * locationX - dx, y: slice.y() - dy + height * locationY });\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { DataItem } from \"../../core/render/Component\";\nimport { FunnelSeries, IFunnelSeriesSettings, IFunnelSeriesDataItem, IFunnelSeriesPrivate } from \"./FunnelSeries\";\nimport { Percent, p100 } from \"../../core/util/Percent\";\nimport * as $utils from \"../../core/util/Utils\";\nimport * as $type from \"../../core/util/Type\";\n\nexport interface IPyramidSeriesDataItem extends IFunnelSeriesDataItem {\n\n}\n\nexport interface IPyramidSeriesSettings extends IFunnelSeriesSettings {\n\n\t/**\n\t * The width of the tip of the pyramid.\n\t *\n\t * Can either be a fixed pixel value or percent relative to the space\n\t * available to the series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/pyramid-series/#Tip_and_base} for more info\n\t * @default 0\n\t */\n\ttopWidth?: number | Percent;\n\n\t/**\n\t * The width of the base of the pyramid.\n\t *\n\t * Can either be a fixed pixel value or percent relative to the space\n\t * available to the series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/pyramid-series/#Tip_and_base} for more info\n\t * @default 0\n\t */\n\tbottomWidth?: number | Percent;\n\n\t/**\n\t * Determines calculation mechanism for the slice area based on value.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/pyramid-series/#Slice_size} for more info\n\t * @default \"area\"\n\t */\n\tvalueIs?: \"area\" | \"height\";\n\n}\n\nexport interface IPyramidSeriesPrivate extends IFunnelSeriesPrivate {\n}\n\n/**\n * Creates a pyramid series for use in a [[SlicedChart]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/pyramid-series/} for more info\n * @important\n */\nexport class PyramidSeries extends FunnelSeries {\n\tprotected _tag = \"pyramid\";\n\n\tpublic static className: string = \"PyramidSeries\";\n\tpublic static classNames: Array = FunnelSeries.classNames.concat([PyramidSeries.className]);\n\n\tdeclare public _settings: IPyramidSeriesSettings;\n\tdeclare public _privateSettings: IPyramidSeriesPrivate;\n\tdeclare public _dataItemSettings: IPyramidSeriesDataItem;\n\n\tprotected _nextSize: number | undefined;\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\t\tthis._nextSize = undefined;\n\t}\n\n\tprotected decorateSlice(dataItem: DataItem) {\n\t\tconst orientation = this.get(\"orientation\");\n\t\tconst slicesContainer = this.slicesContainer;\n\n\t\tconst slice = dataItem.get(\"slice\");\n\t\tconst label = dataItem.get(\"label\");\n\t\tconst link = dataItem.get(\"link\");\n\t\tconst valueIs = this.get(\"valueIs\", \"area\");\n\n\t\tconst sum = this.getPrivate(\"valueAbsoluteSum\", 0);\n\n\t\tif (sum == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst startLocation = this.get(\"startLocation\", 0);\n\t\tconst endLocation = this.get(\"endLocation\", 1);\n\n\t\tconst tw = this.get(\"topWidth\", 0);\n\t\tconst bw = this.get(\"bottomWidth\", p100);\n\n\t\tconst workingValue = Math.abs(dataItem.get(\"valueWorking\", 0));\n\t\tconst value = dataItem.get(\"value\", 0);\n\n\t\tlet sliceHeight: number;\n\t\tlet sliceBottomWidth: number;\n\n\t\tlet pyramidHeight = slicesContainer.innerHeight();\n\t\tlet pyramidWidth = slicesContainer.innerWidth();\n\t\tlet linkWidth = link.width();\n\t\tlet linkHeight = link.height();\n\n\t\tif (orientation == \"horizontal\") {\n\t\t\t[pyramidWidth, pyramidHeight] = [pyramidHeight, pyramidWidth];\n\t\t\t[linkWidth, linkHeight] = [linkHeight, linkWidth];\n\t\t}\n\n\t\tconst center = pyramidWidth / 2;\n\n\t\tlet d = 1;\n\t\tif (value != 0) {\n\t\t\td = workingValue / Math.abs(value);\n\t\t}\n\t\telse {\n\t\t\tif (dataItem.isHidden()) {\n\t\t\t\td = 0.000001;\n\t\t\t}\n\t\t}\n\n\t\tlinkHeight *= d;\n\n\t\tpyramidHeight = pyramidHeight * (endLocation - startLocation) - linkHeight * (this._count * this._total - 1);\n\n\t\tlet topWidth = $utils.relativeToValue(tw, pyramidWidth);\n\n\t\tif (!$type.isNumber(this._nextSize)) {\n\t\t\tthis._nextSize = topWidth;\n\t\t}\n\n\t\tlet bottomWidth = $utils.relativeToValue(bw, pyramidWidth);\n\t\tlet sliceTopWidth = this._nextSize;\n\n\t\tlet angle = Math.atan2(pyramidHeight, topWidth - bottomWidth);\n\t\tlet c = Math.tan(Math.PI / 2 - angle);\n\t\tif (c == 0) {\n\t\t\tc = 0.00000001;\n\t\t}\n\n\t\tif (valueIs == \"area\") {\n\t\t\tlet totalSquare = (topWidth + bottomWidth) / 2 * pyramidHeight;\n\t\t\tlet square = totalSquare * workingValue / sum;\n\n\t\t\tlet s = Math.abs(sliceTopWidth * sliceTopWidth - 2 * square * c);\n\n\t\t\tsliceHeight = (sliceTopWidth - Math.sqrt(s)) / c;\n\n\t\t\tif (sliceHeight > 0) {\n\t\t\t\tsliceBottomWidth = (2 * square - sliceHeight * sliceTopWidth) / sliceHeight;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsliceBottomWidth = sliceTopWidth;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsliceHeight = pyramidHeight * workingValue / sum;\n\t\t\tsliceBottomWidth = sliceTopWidth - sliceHeight * c;\n\t\t}\n\n\t\tlet labelCoord = this._nextCoord + sliceHeight / 2;\n\t\tlet sliceX = center;\n\t\tlet sliceY = this._nextCoord;\n\n\t\tlet linkX = center;\n\t\tlet linkY = sliceY + sliceHeight;\n\n\t\tif (orientation == \"vertical\") {\n\t\t\tlabel.set(\"y\", labelCoord);\n\t\t\tif (label.get(\"opacity\") > 0) {\n\t\t\t\tthis._rLabels.push({ label: label, y: labelCoord });\n\t\t\t}\n\t\t\tslice.set(\"height\", sliceHeight);\n\t\t}\n\t\telse {\n\t\t\tlabel.set(\"x\", labelCoord);\n\t\t\tif (label.get(\"opacity\") > 0) {\n\t\t\t\tthis._hLabels.push({ label: label, y: labelCoord });\n\t\t\t}\n\t\t\t[sliceX, sliceY] = [sliceY, sliceX];\n\t\t\t[linkX, linkY] = [linkY, linkX];\n\n\t\t\tslice.set(\"width\", sliceHeight);\n\t\t}\n\n\t\tslice.setAll({ orientation, bottomWidth: sliceBottomWidth, topWidth: sliceTopWidth, x: sliceX, y: sliceY });\n\t\tlink.setAll({ orientation, x: linkX, y: linkY, topWidth: sliceBottomWidth, bottomWidth: sliceBottomWidth });\n\n\t\tthis._nextSize = sliceBottomWidth;\n\t\tthis._nextCoord += sliceHeight + linkHeight;\n\t}\n}\n","import { PyramidSeries, IPyramidSeriesSettings, IPyramidSeriesDataItem, IPyramidSeriesPrivate } from \"./PyramidSeries\";\nimport { Graphics } from \"../../core/render/Graphics\";\nimport { p100, p50 } from \"../../core/util/Percent\"\n\n\nexport interface IPictorialStackedSeriesDataItem extends IPyramidSeriesDataItem {\n\n}\n\nexport interface IPictorialStackedSeriesSettings extends IPyramidSeriesSettings {\n\n\t/**\n\t * An SVG path that will define the shape of the pictorial series.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/pictorial-stacked-series/#Shape_of_the_series} for more info\n\t */\n\tsvgPath?: string;\n\n}\n\nexport interface IPictorialStackedSeriesPrivate extends IPyramidSeriesPrivate {\n}\n\n/**\n * Creates a pictorial series for use in a [[SlicedChart]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/pictorial-stacked-series/} for more info\n * @important\n */\nexport class PictorialStackedSeries extends PyramidSeries {\n\tprotected _tag = \"pictorial\";\n\n\tpublic static className: string = \"PictorialStackedSeries\";\n\tpublic static classNames: Array = PyramidSeries.classNames.concat([PictorialStackedSeries.className]);\n\n\tdeclare public _settings: IPictorialStackedSeriesSettings;\n\tdeclare public _privateSettings: IPictorialStackedSeriesPrivate;\n\tdeclare public _dataItemSettings: IPictorialStackedSeriesDataItem;\n\n\t/**\n\t * A [[Graphics]] element to used as a mask (shape) for the series.\n\t *\n\t * This element is read-only. To modify the mask/shape, use the `svgPath` setting.\n\t */\n\tpublic readonly seriesMask: Graphics = Graphics.new(this._root, { position: \"absolute\", x: p50, y: p50, centerX: p50, centerY: p50 });\n\n\tpublic readonly seriesGraphics: Graphics = this.slicesContainer.children.push(Graphics.new(this._root, { themeTags: [\"pictorial\", \"background\"], position: \"absolute\", x: p50, y: p50, centerX: p50, centerY: p50 }));\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis.set(\"topWidth\", p100);\n\t\tthis.set(\"bottomWidth\", p100);\n\t\tthis.set(\"valueIs\", \"height\");\n\t\tthis.slicesContainer.set(\"mask\", this.seriesMask);\n\t}\n\n\tprotected _updateScale() {\n\t\tlet slicesContainer = this.slicesContainer;\n\n\t\tlet w = slicesContainer.innerWidth();\n\t\tlet h = slicesContainer.innerHeight();\n\n\t\tlet seriesMask = this.seriesMask;\n\t\tlet seriesGraphics = this.seriesGraphics;\n\t\tlet scale = seriesMask.get(\"scale\", 1);\n\n\t\tconst bounds = seriesMask.localBounds();\n\n\t\tlet mw = bounds.right - bounds.left;\n\t\tlet mh = bounds.bottom - bounds.top;\n\t\tif (this.get(\"orientation\") == \"horizontal\") {\n\t\t\tscale = w / mw;\n\t\t}\n\t\telse {\n\t\t\tscale = h / mh;\n\t\t}\n\t\tif (scale != Infinity && scale != NaN) {\n\t\t\tseriesMask.set(\"scale\", scale);\n\t\t\tseriesMask.set(\"x\", w / 2);\n\t\t\tseriesMask.set(\"y\", h / 2);\n\n\t\t\tseriesGraphics.set(\"scale\", scale);\n\t\t\tseriesGraphics.set(\"x\", w / 2);\n\t\t\tseriesGraphics.set(\"y\", h / 2);\n\t\t}\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\t\tif (this.isDirty(\"svgPath\")) {\n\t\t\tconst svgPath = this.get(\"svgPath\");\n\t\t\tthis.seriesMask.set(\"svgPath\", svgPath);\n\t\t\tthis.seriesGraphics.set(\"svgPath\", svgPath);\n\t\t}\n\n\t\tthis._updateScale();\n\t}\n\n}\n","import { PercentChart, IPercentChartPrivate, IPercentChartSettings } from \"../percent/PercentChart\";\nimport type { PercentSeries } from \"../percent/PercentSeries\";\n\n\nexport interface ISlicedChartSettings extends IPercentChartSettings {\n}\n\nexport interface ISlicedChartPrivate extends IPercentChartPrivate {\n}\n\n/**\n * Creates a sliced chart for use with [[FunnelSeries]], [[PyramidSeries]], or [[PictorialStackedSeries]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/pie-chart/} for more info\n * @important\n */\nexport class SlicedChart extends PercentChart {\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\n\t\tthis.seriesContainer.setAll({ isMeasured:true, layout: this._root.horizontalLayout });\n\t}\n\n\tpublic static className: string = \"SlicedChart\";\n\tpublic static classNames: Array = PercentChart.classNames.concat([SlicedChart.className]);\n\n\tdeclare public _settings: ISlicedChartSettings;\n\tdeclare public _privateSettings: ISlicedChartPrivate;\n\tdeclare public _seriesType: PercentSeries;\n}\n","import * as m from \"./../../dist/es2015/percent.js\";\nexport const am5percent = m;"],"names":["PercentDefaultTheme","Theme","setupDefaultRules","super","ic","this","_root","interfaceColors","r","rule","bind","setAll","legendLabelText","legendValueText","colors","ColorSet","new","width","height","radius","startAngle","endAngle","alignLabels","states","create","opacity","position","isMeasured","x","y","toggleKey","tooltipText","strokeWidth","strokeOpacity","role","lineJoin","shiftRadius","scale","textType","text","paddingTop","paddingBottom","populateText","location","paddingLeft","paddingRight","startLocation","endLocation","orientation","sequencedInterpolation","interactive","expandDistance","centerY","centerX","rotation","fillOpacity","valueIs","PercentChart","SerialChart","_afterNew","_defaultThemes","push","chartContainer","children","seriesContainer","bulletsContainer","_processSeries","series","moveValue","length","classNames","concat","className","PercentSeries","Series","Container","addDisposer","_makeSlices","_makeLabels","_makeTicks","makeSlice","dataItem","slice","slicesContainer","slices","make","on","updateLegendMarker","_setDataItem","set","makeLabel","label","labelsContainer","labels","_shouldMakeBullet","get","makeTick","tick","ticksContainer","ticks","fields","_onDataClear","reset","patterns","_prepareChildren","_lLabels","_rLabels","_hLabels","_valuesDirty","sum","absSum","valueHigh","valueLow","Infinity","count","_dataItems","valueWorking","Math","abs","value","percentTotal","setRaw","setPrivateRaw","show","duration","promises","_sequencedShowHide","Promise","all","hide","_updateChildren","markDirtyText","isDirty","updateLegendValue","_arrange","_arrangeDown","_arrangeUp","_arrangeLeft","_arrangeRight","dataItems","_updateTick","_afterChanged","processDataItem","next","showDataItem","easing","animation","animate","key","to","waitForStop","applyAnimate","hideDataItem","hiddenState","hideTooltip","disposeDataItem","removeValue","dispose","hoverDataItem","isHidden","hover","unhoverDataItem","unhover","legendDataItem","markerRectangle","setting","_getNextDown","sort","a","b","l","bounds","adjustedLocalBounds","labelTop","top","bottom","_getNextUp","maxHeight","labelBottom","labelLeft","left","right","maxWidth","labelRight","_updateSize","markDirty","_dataItem","_dispose","chart","PieChart","w","innerWidth","h","innerHeight","innerRadius","wr","hr","innerBounds","Percent","mr","min","max","prevRadius","_maxRadius","dy","dx","each","_markDirtyKey","index","indexOf","seriesRadius","seriesInnerRadius","markDirtyKey","PieSeries","List","Template","Slice","_new","themeTags","template","RadialLabel","Tick","events","labelsTemplate","markDirtyBounds","arc","currentAngle","getPrivate","currentArc","color","_setDefault","fillPattern","middleAngle","setPrivate","labelRadius","isHiding","labelAngle","cos","sin","pl","pr","points","_positionBullet","bullet","sprite","angle","FunnelSlice","Graphics","display","moveTo","_tlx","_tly","lineTo","_trx","_try","quadraticCurveTo","_cprx","_cpry","_brx","_bry","_blx","_bly","_cplx","_cply","getPoint","locationX","locationY","tw","bw","tlx","trx","mlx","_changed","_clear","ed","FunnelSeries","_makeLinks","_tag","Label","links","makeLink","link","onPrivate","markDirtySize","horizontalLayout","verticalLayout","_opposite","total","_total","_count","_fixLayout","_sizeDirty","_nextCoord","i","decorateSlice","isLast","getNextValue","nextValue","nextItem","maxSize","workingValue","bottomRatio","d","topWidth","bottomWidth","linkHeight","labelY","labelX","tickLocation","lcw","lch","pt","pb","p0","p1","p2","PyramidSeries","_nextSize","undefined","sliceHeight","sliceBottomWidth","pyramidHeight","pyramidWidth","linkWidth","center","sliceTopWidth","atan2","c","tan","PI","square","s","sqrt","labelCoord","sliceX","sliceY","linkX","linkY","PictorialStackedSeries","seriesMask","_updateScale","seriesGraphics","localBounds","mw","mh","NaN","svgPath","SlicedChart","layout","am5percent"],"sourceRoot":""}