{"version":3,"sources":["webpack:///../../../../../src/.internal/plugins/sunburst/SunburstSeries.ts","webpack:///../../../../../src/.internal/plugins/sunburst/Sunburst.ts","webpack:///./plugins/sunburst.js"],"names":["SunburstSeries_SunburstSeriesDataItem","_super","SunburstSeriesDataItem","_this","call","this","className","applyTheme","Object","tslib_es6","defineProperty","prototype","_dataContext","hide","duration","delay","toValue","fields","sunburstDataItem","series","dataItems","each","dataItem","show","value","sbDataItem","childValue","Type","values","setValue","getActualWorkingValue","name","getWorkingValue","workingValue","PieSeries","SunburstSeries_SunburstSeries","SunburstSeries","dataFields","category","interfaceColors","InterfaceColorSet","stroke","getFor","strokeOpacity","alignLabels","ticks","template","disabled","slices","hiddenState","properties","visible","labelTemplate","labels","relativeRotation","radius","inside","fillOpacity","fill","padding","interactionsEnabled","sliceTemplate","activeState","states","getKey","shiftRadius","events","on","hidden","undefined","createDataItem","processDataItem","dataContext","seriesDataItem","handleDataItemValueChange","getValue","handleDataItemWorkingValueChange","parent","invalidateProcessedData","Registry","registeredClasses","Sunburst_SunburstDataItem","SunburstDataItem","hasChildren","children","length","Iterator","iterator","child","setProperty","level","color","component","colors","getIndex","step","index","_series","removeValue","dispose","_disposers","push","PieChart","Sunburst_Sunburst","Sunburst","ColorSet","_usesData","seriesTemplates","Dictionary","virtualParent","Percent","createSeries","validateData","clear","_homeDataItem","homeDataItem","clone","_levelCount","createSunburstSeries","initSeries","i","series_1","toString","moveValue","create","parentDataItem","config","dataUsers","data","adapter","add","target","remove","startAngle","slice","endAngle","arc","event","property","invalidate","updateRadius","chartRadius","_chartPixelRadius","chartPixelInnerRadius","_chartPixelInnerRadius","seriesRadius","a","Utils","innerRadius","pixelRadius","pixelInnerRadius","applyInternalDefaults","readerTitle","language","translate","getExporting","exporting","info","format","handleSeriesAdded2","window","am4plugins_sunburst","sunburst_namespaceObject"],"mappings":";;;;;;;;;;;;;;;;;;;mYA2BAA,EAAA,SAAAC,GAeC,SAAAC,IAAA,IAAAC,EACCF,EAAAG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I,KAAKgH,YAEhE/B,EAAA,KAAWA,EAAA,QAAcjF,KAAKc,OAAOoE,YAAa,SAAC2D,GAClD,IAAI/H,EAAS+H,EAAE,GAEX3F,EAASwF,EAAwBI,EAAA,sBAA6BhI,EAAOoC,OAAQsF,EAAcE,GAC3FK,EAAcL,EAAwBI,EAAA,sBAA6BhI,EAAOiI,YAAaP,EAAcE,GAEpGpH,EAAA,SAAe4B,KACnBA,EAASwF,EAAwBE,GAAgB9H,EAAOuE,MAAQ,IAE5D/D,EAAA,SAAeyH,KACnBA,EAAcL,EAAwBE,EAAe9H,EAAOuE,OAG7DvE,EAAOkI,YAAc9F,EACrBpC,EAAOmI,iBAAmBF,KAQlB5C,EAAA7F,UAAA4I,sBAAV,WAECtJ,EAAAU,UAAM4I,sBAAqBnJ,KAAAC,MAItBsB,EAAA,SAAetB,KAAKmJ,eACxBnJ,KAAKmJ,YAAcnJ,KAAKoJ,SAASC,UAAU,oBAUnClD,EAAA7F,UAAAgJ,aAAV,eAAAxJ,EAAAE,KACOuJ,EAAY3J,EAAAU,UAAMgJ,aAAYvJ,KAAAC,MASpC,OARAuJ,EAAU3B,QAAQC,IAAI,mBAAoB,SAAC2B,GAM1C,MALmB,OAAfA,EAAKC,QAAkC,QAAfD,EAAKC,QAC7BnI,EAAA,SAAexB,EAAKkC,WAAW+C,kBAC1ByE,EAAKxH,WAAWlC,EAAKkC,WAAW+C,UAGlCyE,IAEDD,GAGEpD,EAAA7F,UAAAoJ,mBAAV,aAIDvD,EArTA,CAA8BF,EAAA,GA6T9BvB,EAAA,EAASC,kBAA4B,SAAIuB,EACzCxB,EAAA,EAASC,kBAAoC,iBAAIC,EC7mBjD+E,OAAAC,oBAA6BC","file":"./plugins/sunburst.js","sourcesContent":["/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\nimport { PieSeries, PieSeriesDataItem, IPieSeriesDataFields, IPieSeriesProperties, IPieSeriesAdapters, IPieSeriesEvents } from \"../../charts/series/PieSeries\";\r\nimport { Sunburst, SunburstDataItem } from \"./Sunburst\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport { InterfaceColorSet } from \"../../core/utils/InterfaceColorSet\";\r\nimport { Animation } from \"../../core/utils/Animation\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[SunburstSeries]].\r\n *\r\n * @see {@link DataItem}\r\n * @since 4.1.6\r\n */\r\nexport class SunburstSeriesDataItem extends PieSeriesDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: SunburstSeries;\r\n\r\n\t/**\r\n\t * A reference to a component of a data item.\r\n\t */\r\n\tpublic component: SunburstSeries;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"SunburstSeriesDataItem\";\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * A corresponding data item from the Sunburst.\r\n\t *\r\n\t * @readonly\r\n\t * @return Data item\r\n\t */\r\n\tpublic get sunburstDataItem(): SunburstDataItem {\r\n\t\treturn this._dataContext;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Hide the data item (and corresponding visual elements).\r\n\t *\r\n\t * @param duration Duration (ms)\r\n\t * @param delay Delay hiding (ms)\r\n\t * @param toValue Target value for animation\r\n\t * @param fields Fields to animate while hiding\r\n\t */\r\n\tpublic hide(duration?: number, delay?: number, toValue?: number, fields?: string[]): $type.Optional {\r\n\t\tlet sunburstDataItem = this.sunburstDataItem;\r\n\t\tif (sunburstDataItem && sunburstDataItem.series) {\r\n\t\t\tsunburstDataItem.series.dataItems.each((dataItem) => {\r\n\t\t\t\tdataItem.hide(duration, delay, toValue, fields);\r\n\t\t\t})\r\n\t\t}\r\n\t\treturn super.hide(duration, delay, toValue, fields);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t * Show hidden data item (and corresponding visual elements).\r\n\t *\r\n\t * @param duration Duration (ms)\r\n\t * @param delay Delay hiding (ms)\r\n\t * @param fields Fields to animate while hiding\r\n\t */\r\n\tpublic show(duration?: number, delay?: number, fields?: string[]): $type.Optional {\r\n\t\tlet sunburstDataItem = this.sunburstDataItem;\r\n\r\n\t\tif (sunburstDataItem && sunburstDataItem.series) {\r\n\t\t\tsunburstDataItem.series.dataItems.each((dataItem) => {\r\n\t\t\t\tdataItem.show(duration, delay, fields);\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn super.show(duration, delay, fields);\r\n\t}\r\n\r\n\t/**\r\n\t * Numeric value.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set value(value: number) {\r\n\t\tthis.setValue(\"value\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Value\r\n\t */\r\n\tpublic get value(): number {\r\n\r\n\t\tlet value = 0;\r\n\t\tlet sbDataItem = this.sunburstDataItem;\r\n\t\tif (sbDataItem) {\r\n\t\t\tif (!sbDataItem.series) {\r\n\t\t\t\tvalue = this.values[\"value\"].value;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tsbDataItem.series.dataItems.each((dataItem) => {\r\n\t\t\t\t\tlet childValue = dataItem.value;\r\n\t\t\t\t\tif ($type.isNumber(childValue)) {\r\n\t\t\t\t\t\tvalue += childValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @todo description\r\n\t * @ignore\r\n\t * @return Value\r\n\t */\r\n\tpublic getActualWorkingValue(name: string): $type.Optional {\r\n\t\tlet value = 0;\r\n\t\tlet sbDataItem = this.sunburstDataItem;\r\n\r\n\t\tif (!sbDataItem.series) {\r\n\t\t\tvalue = this.values[name].workingValue;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsbDataItem.series.dataItems.each((dataItem) => {\r\n\t\t\t\tlet childValue = dataItem.getWorkingValue(name);\r\n\t\t\t\tif ($type.isNumber(childValue)) {\r\n\t\t\t\t\tvalue += childValue;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn value;\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[SunburstSeries]].\r\n *\r\n * @since 4.1.6\r\n */\r\nexport interface ISunburstSeriesDataFields extends IPieSeriesDataFields { }\r\n\r\n/**\r\n * Defines properties for [[SunburstSeries]].\r\n *\r\n * @since 4.1.6\r\n */\r\nexport interface ISunburstSeriesProperties extends IPieSeriesProperties { }\r\n\r\n/**\r\n * Defines events for [[SunburstSeries]].\r\n *\r\n * @since 4.1.6\r\n */\r\nexport interface ISunburstSeriesEvents extends IPieSeriesEvents { }\r\n\r\n/**\r\n * Defines adapters for [[SunburstSeries]].\r\n *\r\n * @see {@link Adapter}\r\n * @since 4.1.6\r\n */\r\nexport interface ISunburstSeriesAdapters extends IPieSeriesAdapters, ISunburstSeriesProperties { }\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 * Defines [[Series]] for a [[Sunburst]] chart.\r\n *\r\n * @see {@link ISunburstSeriesEvents} for a list of available Events\r\n * @see {@link ISunburstSeriesAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sunburst/} For more information\r\n * @todo Example\r\n * @since 4.1.6\r\n * @important\r\n */\r\nexport class SunburstSeries extends PieSeries {\r\n\r\n\t/**\r\n\t * Defines the type of data fields used for the series.\r\n\t */\r\n\tpublic _dataFields: ISunburstSeriesDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ISunburstSeriesProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ISunburstSeriesAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ISunburstSeriesEvents;\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: SunburstSeriesDataItem;\r\n\r\n\t/**\r\n\t * A chart series belongs to.\r\n\t */\r\n\tpublic _chart: Sunburst;\r\n\r\n\t/**\r\n\t * The level in hierarchy hierarchy series is at.\r\n\t *\r\n\t * @readonly\r\n\t */\r\n\tpublic level: number;\r\n\r\n\t/**\r\n\t * Parent data item of a series.\r\n\t */\r\n\tpublic parentDataItem: SunburstDataItem;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"SunburstSeries\";\r\n\r\n\t\tthis.dataFields.category = \"name\";\r\n\t\tthis.dataFields.value = \"value\";\r\n\r\n\t\tlet interfaceColors = new InterfaceColorSet();\r\n\t\tthis.stroke = interfaceColors.getFor(\"background\");\r\n\t\tthis.strokeOpacity = 1;\r\n\r\n\t\tthis.alignLabels = false;\r\n\t\tthis.ticks.template.disabled = true;\t\t\r\n\r\n\t\tthis.slices.template.hiddenState.properties.visible = true;\r\n\r\n\t\tlet labelTemplate = this.labels.template;\r\n\t\tlabelTemplate.relativeRotation = 90;\r\n\t\tlabelTemplate.radius = 10;\r\n\t\tlabelTemplate.inside = true;\r\n\t\tlabelTemplate.strokeOpacity = 0;\r\n\t\tlabelTemplate.fillOpacity = 1;\r\n\t\tlabelTemplate.fill = interfaceColors.getFor(\"background\");\r\n\t\tlabelTemplate.padding(0, 0, 0, 0);\r\n\t\tlabelTemplate.interactionsEnabled = false;\r\n\r\n\t\tlet sliceTemplate = this.slices.template;\r\n\t\tsliceTemplate.stroke = interfaceColors.getFor(\"background\");\r\n\t\tlet activeState = sliceTemplate.states.getKey(\"active\");\r\n\t\tif (activeState) {\r\n\t\t\tactiveState.properties.shiftRadius = 0;\r\n\t\t}\r\n\r\n\t\tthis.events.on(\"inited\", ()=>{\r\n\t\t\tthis.dataItems.each((dataItem)=>{\r\n\t\t\t\tif(dataItem.hidden){\r\n\t\t\t\t\tdataItem.hide(0);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}, undefined, false)\t\t\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new SunburstSeriesDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * Processes data item.\r\n\t *\r\n\t * @param dataItem Data item\r\n\t * @param dataContext Raw data\r\n\t * @param index Index of the data item\r\n\t */\r\n\tprotected processDataItem(dataItem: this[\"_dataItem\"], dataContext?: Object): void {\r\n\t\t(dataContext).seriesDataItem = dataItem; // save a reference here. dataContext is TreeMapDataItem and we need to know dataItem sometimes\r\n\t\tsuper.processDataItem(dataItem, dataContext);\r\n\t}\r\n\r\n\t/**\r\n\t * [handleDataItemValueChange description]\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t * @todo Description\r\n\t */\r\n\tpublic handleDataItemValueChange(dataItem?: this[\"_dataItem\"], name?: string): void {\r\n\t\tsuper.handleDataItemValueChange(dataItem, name);\r\n\t\tdataItem.sunburstDataItem.setValue(name, dataItem.getValue(name));\r\n\t}\r\n\r\n\t/**\r\n\t * [handleDataItemWorkingValueChange description]\r\n\t *\r\n\t * @ignore\r\n\t * @todo Description\r\n\t * @param {this[\"_dataItem\"]} dataItem [description]\r\n\t * @param {string} name [description]\r\n\t */\r\n\tpublic handleDataItemWorkingValueChange(dataItem?: this[\"_dataItem\"], name?: string): void {\r\n\t\tsuper.handleDataItemWorkingValueChange(dataItem, name);\r\n\t\t//dataItem.sunburstDataItem.setWorkingValue(name, dataItem.getWorkingValue(name), 0);\r\n\r\n\t\tlet sunburstDataItem = dataItem.sunburstDataItem.parent.parent;\r\n\t\twhile (sunburstDataItem != undefined) {\r\n\t\t\tsunburstDataItem.series.invalidateProcessedData();\r\n\t\t\tsunburstDataItem = sunburstDataItem.parent;\r\n\t\t}\r\n\t}\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[\"SunburstSeries\"] = SunburstSeries;\r\nregistry.registeredClasses[\"SunburstSeriesDataItem\"] = SunburstSeriesDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/sunburst/SunburstSeries.ts","/**\r\n * Sunburst chart module.\r\n */\r\n\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { PieChart, IPieChartProperties, IPieChartDataFields, IPieChartAdapters, IPieChartEvents, PieChartDataItem } from \"../../charts/types/PieChart\";\r\nimport { SunburstSeries, SunburstSeriesDataItem } from \"./SunburstSeries\";\r\nimport { registry } from \"../../core/Registry\";\r\nimport * as $iter from \"../../core/utils/Iterator\";\r\nimport * as $utils from \"../../core/utils/Utils\";\r\nimport * as $type from \"../../core/utils/Type\";\r\nimport { percent } from \"../../core/utils/Percent\";\r\nimport { Color } from \"../../core/utils/Color\";\r\nimport { ColorSet } from \"../../core/utils/ColorSet\";\r\nimport { OrderedListTemplate } from \"../../core/utils/SortedList\";\r\nimport { DictionaryTemplate, DictionaryDisposer } from \"../../core/utils/Dictionary\";\r\nimport { Export } from \"../../core/export/Export\";\r\n\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines a [[DataItem]] for [[Sunburst]].\r\n *\r\n * @since 4.1.6\r\n * @see {@link DataItem}\r\n */\r\nexport class SunburstDataItem extends PieChartDataItem {\r\n\r\n\t/**\r\n\t * Defines a type of [[Component]] this data item is used for.\r\n\t */\r\n\tpublic _component!: Sunburst;\r\n\r\n\t/**\r\n\t * A treemap level this data item is displayed at.\r\n\t */\r\n\tprotected _level: number;\r\n\r\n\t/**\r\n\t * Series of children data items.\r\n\t */\r\n\tprotected _series: SunburstSeries;\r\n\r\n\t/**\r\n\t * Related series data item.\r\n\t */\r\n\tpublic seriesDataItem: SunburstSeriesDataItem;\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.className = \"SunburstDataItem\";\r\n\r\n\t\tthis.values.value = {};\r\n\r\n\t\tthis.hasChildren.children = true;\r\n\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Numeric value of the item.\r\n\t *\r\n\t * @param value Value\r\n\t */\r\n\tpublic set value(value: number) {\r\n\t\tthis.setValue(\"value\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * Numeric value of the slice.\r\n\t *\r\n\t * @return Value\r\n\t */\r\n\tpublic get value(): number {\r\n\t\tlet value = 0;\r\n\t\tif (!this.children || this.children.length == 0) {\r\n\t\t\tvalue = this.values[\"value\"].workingValue;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$iter.each(this.children.iterator(), (child) => {\r\n\t\t\t\tlet childValue = child.value;\r\n\t\t\t\tif ($type.isNumber(childValue)) {\r\n\t\t\t\t\tvalue += childValue;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t\treturn value;\r\n\t}\r\n\r\n\t/**\r\n\t * Percent of the slice.\r\n\t *\r\n\t * @return {number} Percent\r\n\t */\r\n\tpublic get percent(): number {\r\n\t\tif (this.parent) {\r\n\t\t\treturn this.value / this.parent.value * 100;\r\n\t\t}\r\n\t\treturn 100;\r\n\t}\r\n\r\n\t/**\r\n\t * Item's name.\r\n\t *\r\n\t * @param name Name\r\n\t */\r\n\tpublic set name(name: string) {\r\n\t\tthis.setProperty(\"name\", name);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Name\r\n\t */\r\n\tpublic get name(): string {\r\n\t\treturn this.properties.name;\r\n\t}\r\n\r\n\t/**\r\n\t * A list of item's sub-children.\r\n\t *\r\n\t * @param children Item's children\r\n\t */\r\n\tpublic set children(children: OrderedListTemplate) {\r\n\t\tthis.setProperty(\"children\", children);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Item's children\r\n\t */\r\n\tpublic get children(): OrderedListTemplate {\r\n\t\treturn this.properties.children;\r\n\t}\r\n\r\n\t/**\r\n\t * Depth level in the Sunburst hierarchy.\r\n\t *\r\n\t * The top-level item will have level set at 0. Its children will have\r\n\t * level 1, and so on.\r\n\t *\r\n\t * @readonly\r\n\t * @return Level\r\n\t */\r\n\tpublic get level(): number {\r\n\t\tif (!this.parent) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn this.parent.level + 1;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Item's color.\r\n\t *\r\n\t * If not set, will use parent's color, or, if that is not set either,\r\n\t * automatically assigned color from chart's color set. (`chart.colors`)\r\n\t *\r\n\t * @param value Color\r\n\t */\r\n\tpublic set color(value: Color) {\r\n\t\tthis.setProperty(\"color\", value);\r\n\t}\r\n\r\n\t/**\r\n\t * @return Color\r\n\t */\r\n\tpublic get color(): Color {\r\n\t\tlet color = this.properties.color;\r\n\r\n\t\tif (color == undefined) {\r\n\t\t\tif (this.parent) {\r\n\t\t\t\tcolor = this.parent.color;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (color == undefined) {\r\n\t\t\tif (this.component) {\r\n\t\t\t\tcolor = this.component.colors.getIndex(this.component.colors.step * this.index);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn color;\r\n\t}\r\n\r\n\t/**\r\n\t * A series representing slice's children.\r\n\t *\r\n\t * @param series Child series\r\n\t */\r\n\tpublic set series(series: SunburstSeries) {\r\n\t\tif (series != this._series) {\r\n\t\t\tif (this._series) {\r\n\t\t\t\tthis.component.series.removeValue(this._series);\r\n\t\t\t\tthis._series.dispose();\r\n\t\t\t}\r\n\t\t\tthis._series = series;\r\n\t\t\tthis._disposers.push(series);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @return Child series\r\n\t */\r\n\tpublic get series(): SunburstSeries {\r\n\t\treturn this._series;\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * ============================================================================\r\n * REQUISITES\r\n * ============================================================================\r\n * @hidden\r\n */\r\n\r\n/**\r\n * Defines data fields for [[Sunburst]].\r\n *\r\n * @since 4.1.6\r\n */\r\nexport interface ISunburstDataFields extends IPieChartDataFields {\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's numeric value.\r\n\t */\r\n\tvalue?: string;\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's sub-items.\r\n\t */\r\n\tchildren?: string;\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's name.\r\n\t */\r\n\tname?: string;\r\n\r\n\t/**\r\n\t * A name of the field in data that holds item's color.\r\n\t *\r\n\t * If not set, a new color will be automatically assigned to each item as\r\n\t * defined by theme.\r\n\t */\r\n\tcolor?: string;\r\n\r\n\t/**\r\n\t * Name of the field in data that holds boolean flag if item should be hidden.\r\n\t */\r\n\thidden?: string;\r\n}\r\n\r\n/**\r\n * Defines properties for [[Sunburst]].\r\n *\r\n * @since 4.1.6\r\n */\r\nexport interface ISunburstProperties extends IPieChartProperties { }\r\n\r\n/**\r\n * Defines events for [[Sunburst]].\r\n *\r\n * @since 4.1.6\r\n */\r\nexport interface ISunburstEvents extends IPieChartEvents { }\r\n\r\n/**\r\n * Defines adapters for [[Sunburst]].\r\n *\r\n * @since 4.1.6\r\n * @see {@link Adapter}\r\n */\r\nexport interface ISunburstAdapters extends IPieChartAdapters, ISunburstProperties { }\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 main class for Sunburst chart type.\r\n *\r\n * @since 4.1.6\r\n * @see {@link ISunburstEvents} for a list of available Events\r\n * @see {@link ISunburstAdapters} for a list of available Adapters\r\n * @see {@link https://www.amcharts.com/docs/v4/chart-types/sunburst/} For more information\r\n * @todo Example\r\n * @important\r\n */\r\nexport class Sunburst extends PieChart {\r\n\r\n\t/**\r\n\t * Defines the type of data item.\r\n\t */\r\n\tpublic _dataItem: SunburstDataItem;\r\n\r\n\t/**\r\n\t * Defines available data fields.\r\n\t */\r\n\tpublic _dataFields: ISunburstDataFields;\r\n\r\n\t/**\r\n\t * Defines available properties.\r\n\t */\r\n\tpublic _properties!: ISunburstProperties;\r\n\r\n\t/**\r\n\t * Defines available adapters.\r\n\t */\r\n\tpublic _adapter!: ISunburstAdapters;\r\n\r\n\t/**\r\n\t * Defines available events.\r\n\t */\r\n\tpublic _events!: ISunburstEvents;\r\n\r\n\t/**\r\n\t * Defines a type of series that this chart uses.\r\n\t */\r\n\tpublic _seriesType: SunburstSeries;\r\n\r\n\t/**\r\n\t * A set of colors to be applied automatically to each new chart item, if\r\n\t * not explicitly set.\r\n\t */\r\n\tpublic colors: ColorSet;\r\n\r\n\t/**\r\n\t * Holds series object for each Sunburst level.\r\n\t *\r\n\t * \"0\" is the top-level series.\r\n\t * \"1\" is the second level.\r\n\t * Etc.\r\n\t */\r\n\tpublic seriesTemplates: DictionaryTemplate;\r\n\r\n\t/**\r\n\t * [_homeDataItem description]\r\n\t *\r\n\t * @todo Description\r\n\t */\r\n\tprotected _homeDataItem: SunburstDataItem;\r\n\r\n\t/**\r\n\t * Number of levels in current chart.\r\n\t */\r\n\tprotected _levelCount: number;\r\n\r\n\r\n\t/**\r\n\t * Constructor\r\n\t */\r\n\tconstructor() {\r\n\r\n\t\t// Init\r\n\t\tsuper();\r\n\t\tthis.className = \"Sunburst\";\r\n\r\n\t\tthis.colors = new ColorSet();\r\n\r\n\t\tthis._usesData = true;\r\n\r\n\t\tconst template = new SunburstSeries();\r\n\t\tthis.seriesTemplates = new DictionaryTemplate(template);\r\n\t\ttemplate.virtualParent = this;\r\n\t\tthis._disposers.push(new DictionaryDisposer(this.seriesTemplates));\r\n\t\tthis._disposers.push(template);\r\n\r\n\t\tthis.radius = percent(95);\r\n\r\n\t\t// Apply theme\r\n\t\tthis.applyTheme();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates and returns a new series of the suitable type.\r\n\t *\r\n\t * @return New series\r\n\t */\r\n\tprotected createSeries(): this[\"_seriesType\"] {\r\n\t\treturn new SunburstSeries();\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a new/empty DataItem of the type appropriate for this object.\r\n\t *\r\n\t * @see {@link DataItem}\r\n\t * @return Data Item\r\n\t */\r\n\tprotected createDataItem(): this[\"_dataItem\"] {\r\n\t\treturn new SunburstDataItem();\r\n\t}\r\n\r\n\t/**\r\n\t * (Re)validates chart's data.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic validateData(): void {\r\n\r\n\t\tthis.series.clear();\r\n\r\n\t\tsuper.validateData();\r\n\r\n\t\tif (this._homeDataItem) {\r\n\t\t\tthis._homeDataItem.dispose();\r\n\t\t}\r\n\r\n\t\tlet homeDataItem = this.dataItems.template.clone(); // cant' use createDataItem here!\r\n\r\n\t\tthis._homeDataItem = homeDataItem;\r\n\r\n\t\t$iter.each(this.dataItems.iterator(), (dataItem) => {\r\n\t\t\tdataItem.parent = homeDataItem;\r\n\t\t});\r\n\r\n\t\thomeDataItem.children = this.dataItems;\r\n\r\n\t\tthis._levelCount = 0;\r\n\r\n\t\tthis.createSunburstSeries(homeDataItem);\r\n\t}\r\n\r\n\t/**\r\n\t * Creates [[SunburstSeries]] instance for item's children.\r\n\t *\r\n\t * @param dataItem Data item\r\n\t */\r\n\tprotected createSunburstSeries(dataItem: this[\"_dataItem\"]) {\r\n\t\tif (dataItem.children) {\r\n\t\t\tthis.initSeries(dataItem);\r\n\r\n\t\t\tfor (let i = 0; i < dataItem.children.length; i++) {\r\n\t\t\t\tlet child = dataItem.children.getIndex(i);\r\n\t\t\t\tif (child.children) {\r\n\t\t\t\t\tthis.createSunburstSeries(child);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Initializes the Sunburst series.\r\n\t *\r\n\t * @param dataItem Chart data item\r\n\t */\r\n\tprotected initSeries(dataItem: SunburstDataItem) {\r\n\t\tif (!dataItem.series) {\r\n\t\t\tlet series: this[\"_seriesType\"];\r\n\r\n\t\t\tlet template = this.seriesTemplates.getKey(dataItem.level.toString());\r\n\t\t\tif (template) {\r\n\t\t\t\tseries = template.clone();\r\n\t\t\t\tthis.series.moveValue(series);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tseries = this.series.create();\r\n\t\t\t}\r\n\r\n\t\t\tseries.name = dataItem.name;\r\n\t\t\tseries.parentDataItem = dataItem;\r\n\t\t\tdataItem.series = series;\r\n\r\n\t\t\tlet level = dataItem.level;\r\n\t\t\tseries.level = level;\r\n\r\n\t\t\tif (this._levelCount < level + 1) {\r\n\t\t\t\tthis._levelCount = level + 1;\r\n\t\t\t}\r\n\r\n\t\t\tlet dataContext: any = dataItem.dataContext;\r\n\t\t\tif (dataContext) {\r\n\t\t\t\tseries.config = dataContext.config;\r\n\t\t\t}\r\n\r\n\t\t\tthis.dataUsers.removeValue(series); // series do not use data directly, that's why we remove it\r\n\t\t\tseries.data = dataItem.children.values;\r\n\t\t\tseries.fill = dataItem.color;\r\n\t\t\tseries.dataFields.hidden = this.dataFields.hidden;\r\n\r\n\t\t\tseries.slices.template.adapter.add(\"fill\", (fill, target) => {\r\n\t\t\t\tlet dataItem = target.dataItem;\r\n\t\t\t\tif (dataItem) {\r\n\t\t\t\t\tlet sunburstDataItem = dataItem.sunburstDataItem;\r\n\t\t\t\t\tif (sunburstDataItem) {\r\n\t\t\t\t\t\ttarget.fill = sunburstDataItem.color;\r\n\t\t\t\t\t\ttarget.adapter.remove(\"fill\"); //@todo: make it possible adapters applied once?\r\n\t\t\t\t\t\treturn sunburstDataItem.color;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tseries.adapter.add(\"startAngle\", (startAngle, target) => {\r\n\t\t\t\tlet parentDataItem = target.parentDataItem;\r\n\t\t\t\tif (parentDataItem) {\r\n\t\t\t\t\tlet seriesDataItem = parentDataItem.seriesDataItem;\r\n\t\t\t\t\tif (seriesDataItem) {\r\n\t\t\t\t\t\tstartAngle = seriesDataItem.slice.startAngle;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn startAngle;\r\n\t\t\t})\r\n\r\n\t\t\tseries.adapter.add(\"endAngle\", (endAngle, target) => {\r\n\t\t\t\tlet parentDataItem = target.parentDataItem;\r\n\t\t\t\tif (parentDataItem) {\r\n\t\t\t\t\tlet seriesDataItem = parentDataItem.seriesDataItem;\r\n\t\t\t\t\tif (seriesDataItem) {\r\n\t\t\t\t\t\tendAngle = seriesDataItem.slice.startAngle + seriesDataItem.slice.arc;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn endAngle;\r\n\t\t\t})\r\n\r\n\t\t\tseries.validateData();\r\n\r\n\t\t\tif (dataItem.seriesDataItem) {\r\n\t\t\t\tdataItem.seriesDataItem.slice.events.on(\"propertychanged\", (event) => {\r\n\t\t\t\t\tif (event.property == \"startAngle\" || event.property == \"arc\") {\r\n\t\t\t\t\t\tseries.invalidate();\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Recalculates Sunburst radius, based on a number of criteria.\r\n\t *\r\n\t * @ignore Exclude from docs\r\n\t */\r\n\tpublic updateRadius(): void {\r\n\r\n\t\tsuper.updateRadius();\r\n\r\n\t\tlet chartRadius = this._chartPixelRadius;\r\n\t\tlet chartPixelInnerRadius = this._chartPixelInnerRadius;\r\n\r\n\r\n\r\n\t\tlet seriesRadius = (chartRadius - chartPixelInnerRadius) / this._levelCount;\r\n\r\n\t\t$iter.each($iter.indexed(this.series.iterator()), (a) => {\r\n\t\t\tlet series = a[1];\r\n\r\n\t\t\tlet radius = chartPixelInnerRadius + $utils.relativeRadiusToValue(series.radius, chartRadius - chartPixelInnerRadius);\r\n\t\t\tlet innerRadius = chartPixelInnerRadius + $utils.relativeRadiusToValue(series.innerRadius, chartRadius - chartPixelInnerRadius);\r\n\r\n\t\t\tif (!$type.isNumber(radius)) {\r\n\t\t\t\tradius = chartPixelInnerRadius + seriesRadius * (series.level + 1);\r\n\t\t\t}\r\n\t\t\tif (!$type.isNumber(innerRadius)) {\r\n\t\t\t\tinnerRadius = chartPixelInnerRadius + seriesRadius * series.level;\r\n\t\t\t}\r\n\r\n\t\t\tseries.pixelRadius = radius;\r\n\t\t\tseries.pixelInnerRadius = innerRadius;\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sets defaults that instantiate some objects that rely on parent, so they\r\n\t * cannot be set in constructor.\r\n\t */\r\n\tprotected applyInternalDefaults(): void {\r\n\r\n\t\tsuper.applyInternalDefaults();\r\n\r\n\t\t// Add a default screen reader title for accessibility\r\n\t\t// This will be overridden in screen reader if there are any `titles` set\r\n\t\tif (!$type.hasValue(this.readerTitle)) {\r\n\t\t\tthis.readerTitle = this.language.translate(\"Sunburst chart\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Since this chart uses hierarchical data, we need to remove childrent\r\n\t * dataField from export of non-hierarchical formats such as CSV and XSLX.\r\n\t *\r\n\t * @return Export\r\n\t */\r\n\tprotected getExporting(): Export {\r\n\t\tconst exporting = super.getExporting();\r\n\t\texporting.adapter.add(\"formatDataFields\", (info) => {\r\n\t\t\tif (info.format == \"csv\" || info.format == \"xlsx\") {\r\n\t\t\t\tif($type.hasValue(this.dataFields.children)) {\r\n\t\t\t\t\tdelete info.dataFields[this.dataFields.children];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn info;\r\n\t\t})\r\n\t\treturn exporting;\r\n\t}\r\n\r\n\tprotected handleSeriesAdded2(){\r\n\t\t// void\r\n\t}\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[\"Sunburst\"] = Sunburst;\r\nregistry.registeredClasses[\"SunburstDataItem\"] = SunburstDataItem;\r\n\n\n\n// WEBPACK FOOTER //\n// ../../../../../src/.internal/plugins/sunburst/Sunburst.ts","import * as m from \"../../es2015/plugins/sunburst\";\nwindow.am4plugins_sunburst = m;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./plugins/sunburst.js\n// module id = null\n// module chunks = "],"sourceRoot":""}