@amcharts/amcharts5 5.11.0 → 5.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/.internal/charts/hierarchy/Hierarchy.js +1 -1
  2. package/.internal/charts/hierarchy/Hierarchy.js.map +1 -1
  3. package/.internal/charts/map/MapSeries.d.ts.map +1 -1
  4. package/.internal/charts/map/MapSeries.js +8 -0
  5. package/.internal/charts/map/MapSeries.js.map +1 -1
  6. package/.internal/charts/stock/toolbar/DateRangeSelector.d.ts +8 -0
  7. package/.internal/charts/stock/toolbar/DateRangeSelector.d.ts.map +1 -1
  8. package/.internal/charts/stock/toolbar/DateRangeSelector.js +13 -3
  9. package/.internal/charts/stock/toolbar/DateRangeSelector.js.map +1 -1
  10. package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
  11. package/.internal/charts/xy/series/XYSeries.js +3 -0
  12. package/.internal/charts/xy/series/XYSeries.js.map +1 -1
  13. package/.internal/core/Registry.js +1 -1
  14. package/.internal/core/Registry.js.map +1 -1
  15. package/.internal/core/render/Sprite.d.ts.map +1 -1
  16. package/.internal/core/render/Sprite.js +5 -0
  17. package/.internal/core/render/Sprite.js.map +1 -1
  18. package/.internal/core/util/DurationFormatter.d.ts.map +1 -1
  19. package/.internal/core/util/DurationFormatter.js +57 -2
  20. package/.internal/core/util/DurationFormatter.js.map +1 -1
  21. package/CHANGELOG.md +14 -0
  22. package/examples/javascript/flow-arc-horizontal/package.json +1 -1
  23. package/examples/javascript/flow-arc-vertical/package.json +1 -1
  24. package/examples/javascript/flow-chord/package.json +1 -1
  25. package/examples/javascript/flow-chord-directed/package.json +1 -1
  26. package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
  27. package/examples/javascript/flow-sankey/package.json +1 -1
  28. package/examples/javascript/gauge/package.json +1 -1
  29. package/examples/javascript/gauge-bands/package.json +1 -1
  30. package/examples/javascript/hierarchy-force-directed/package.json +1 -1
  31. package/examples/javascript/hierarchy-pack/package.json +1 -1
  32. package/examples/javascript/hierarchy-partition/package.json +1 -1
  33. package/examples/javascript/hierarchy-sunburst/package.json +1 -1
  34. package/examples/javascript/hierarchy-tree/package.json +1 -1
  35. package/examples/javascript/hierarchy-treemap/package.json +1 -1
  36. package/examples/javascript/hierarchy-voronoi-treemap/package.json +1 -1
  37. package/examples/javascript/jest/package.json +1 -1
  38. package/examples/javascript/json-pie/package.json +1 -1
  39. package/examples/javascript/json-xy/package.json +1 -1
  40. package/examples/javascript/map-animating-along-lines/package.json +1 -1
  41. package/examples/javascript/map-clustered-points/package.json +1 -1
  42. package/examples/javascript/map-day-and-night/package.json +1 -1
  43. package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
  44. package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
  45. package/examples/javascript/map-with-bubbles/package.json +1 -1
  46. package/examples/javascript/map-zoom-to-country/package.json +1 -1
  47. package/examples/javascript/misc-40-charts/package.json +1 -1
  48. package/examples/javascript/misc-microchart-grid/package.json +1 -1
  49. package/examples/javascript/pie-chart/package.json +1 -1
  50. package/examples/javascript/pie-donut-chart/package.json +1 -1
  51. package/examples/javascript/pie-variable-radius/package.json +1 -1
  52. package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
  53. package/examples/javascript/radar-heat-map/package.json +1 -1
  54. package/examples/javascript/radar-line/package.json +1 -1
  55. package/examples/javascript/radar-time-line/package.json +1 -1
  56. package/examples/javascript/sliced-funnel/package.json +1 -1
  57. package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
  58. package/examples/javascript/sliced-pyramid/package.json +1 -1
  59. package/examples/javascript/stock-chart/package.json +1 -1
  60. package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
  61. package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
  62. package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
  63. package/examples/javascript/stock-chart-intraday/package.json +1 -1
  64. package/examples/javascript/stock-chart-live/package.json +1 -1
  65. package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
  66. package/examples/javascript/venn-diagram/package.json +1 -1
  67. package/examples/javascript/wordcloud-with-data/package.json +1 -1
  68. package/examples/javascript/wordcloud-with-text/package.json +1 -1
  69. package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
  70. package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  71. package/examples/javascript/xy-bubble/package.json +1 -1
  72. package/examples/javascript/xy-candlestick/package.json +1 -1
  73. package/examples/javascript/xy-clustered-column/package.json +1 -1
  74. package/examples/javascript/xy-column/package.json +1 -1
  75. package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
  76. package/examples/javascript/xy-data-grouping/package.json +1 -1
  77. package/examples/javascript/xy-draggable-range/package.json +1 -1
  78. package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  79. package/examples/javascript/xy-dumbbell plot/package.json +1 -1
  80. package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
  81. package/examples/javascript/xy-line/package.json +1 -1
  82. package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
  83. package/examples/javascript/xy-live-data/package.json +1 -1
  84. package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
  85. package/examples/javascript/xy-ohlc/package.json +1 -1
  86. package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
  87. package/examples/javascript/xy-smoothed-line/package.json +1 -1
  88. package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
  89. package/examples/javascript/xy-stacked-column/package.json +1 -1
  90. package/examples/javascript/xy-stacked-step/package.json +1 -1
  91. package/examples/javascript/xy-stock/package.json +1 -1
  92. package/examples/javascript/xy-stock-comparing/package.json +1 -1
  93. package/examples/typescript/flow-arc-horizontal/package.json +1 -1
  94. package/examples/typescript/flow-arc-vertical/package.json +1 -1
  95. package/examples/typescript/flow-chord/package.json +1 -1
  96. package/examples/typescript/flow-chord-directed/package.json +1 -1
  97. package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
  98. package/examples/typescript/flow-sankey/package.json +1 -1
  99. package/examples/typescript/gauge/package.json +1 -1
  100. package/examples/typescript/gauge-bands/package.json +1 -1
  101. package/examples/typescript/hierarchy-force-directed/package.json +1 -1
  102. package/examples/typescript/hierarchy-pack/package.json +1 -1
  103. package/examples/typescript/hierarchy-partition/package.json +1 -1
  104. package/examples/typescript/hierarchy-sunburst/package.json +1 -1
  105. package/examples/typescript/hierarchy-tree/package.json +1 -1
  106. package/examples/typescript/hierarchy-treemap/package.json +1 -1
  107. package/examples/typescript/hierarchy-voronoi-treemap/package.json +1 -1
  108. package/examples/typescript/jest/package.json +1 -1
  109. package/examples/typescript/json-pie/package.json +1 -1
  110. package/examples/typescript/json-xy/package.json +1 -1
  111. package/examples/typescript/map-animating-along-lines/package.json +1 -1
  112. package/examples/typescript/map-clustered-points/package.json +1 -1
  113. package/examples/typescript/map-day-and-night/package.json +1 -1
  114. package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
  115. package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
  116. package/examples/typescript/map-with-bubbles/package.json +1 -1
  117. package/examples/typescript/map-zoom-to-country/package.json +1 -1
  118. package/examples/typescript/misc-40-charts/package.json +1 -1
  119. package/examples/typescript/misc-microchart-grid/package.json +1 -1
  120. package/examples/typescript/pie-chart/package.json +1 -1
  121. package/examples/typescript/pie-donut-chart/package.json +1 -1
  122. package/examples/typescript/pie-variable-radius/package.json +1 -1
  123. package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
  124. package/examples/typescript/radar-heat-map/package.json +1 -1
  125. package/examples/typescript/radar-line/package.json +1 -1
  126. package/examples/typescript/radar-time-line/package.json +1 -1
  127. package/examples/typescript/sliced-funnel/package.json +1 -1
  128. package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
  129. package/examples/typescript/sliced-pyramid/package.json +1 -1
  130. package/examples/typescript/stock-chart/package.json +1 -1
  131. package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
  132. package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
  133. package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
  134. package/examples/typescript/stock-chart-intraday/package.json +1 -1
  135. package/examples/typescript/stock-chart-live/package.json +1 -1
  136. package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
  137. package/examples/typescript/venn-diagram/package.json +1 -1
  138. package/examples/typescript/wordcloud-with-data/package.json +1 -1
  139. package/examples/typescript/wordcloud-with-text/package.json +1 -1
  140. package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
  141. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  142. package/examples/typescript/xy-bubble/package.json +1 -1
  143. package/examples/typescript/xy-candlestick/package.json +1 -1
  144. package/examples/typescript/xy-clustered-column/package.json +1 -1
  145. package/examples/typescript/xy-column/package.json +1 -1
  146. package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
  147. package/examples/typescript/xy-data-grouping/package.json +1 -1
  148. package/examples/typescript/xy-draggable-range/package.json +1 -1
  149. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  150. package/examples/typescript/xy-dumbbell plot/package.json +1 -1
  151. package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
  152. package/examples/typescript/xy-line/package.json +1 -1
  153. package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
  154. package/examples/typescript/xy-live-data/package.json +1 -1
  155. package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
  156. package/examples/typescript/xy-ohlc/package.json +1 -1
  157. package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
  158. package/examples/typescript/xy-smoothed-line/package.json +1 -1
  159. package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
  160. package/examples/typescript/xy-stacked-column/package.json +1 -1
  161. package/examples/typescript/xy-stacked-step/package.json +1 -1
  162. package/examples/typescript/xy-stock/package.json +1 -1
  163. package/examples/typescript/xy-stock-comparing/package.json +1 -1
  164. package/package.json +2 -2
@@ -315,7 +315,7 @@ export class Hierarchy extends Series {
315
315
  }
316
316
  const node = dataItem.get("node");
317
317
  if (node) {
318
- node.set("toggleKey", "disabled");
318
+ node.set("toggleKey", this.nodes.template.get("toggleKey", "disabled"));
319
319
  }
320
320
  let depth = dataItem.get("depth");
321
321
  $array.each(childData, (child) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Hierarchy.js","sourceRoot":"","sources":["../../../../../src/.internal/charts/hierarchy/Hierarchy.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAmE,MAAM,0BAA0B,CAAC;AACnH,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAW3C,CAAC;AAqNF;;;;GAIG;AACH,MAAM,OAAgB,SAAU,SAAQ,MAAM;IAA9C;;QASC;;;;WAIG;QACH;;;;mBAAiC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;WAAC;QAEtG;;;;;WAA8E;QAE9E;;;;;WAAmD;QAEnD;;;;mBA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MAAM,CAAC,CAAC;QAClC,IAAI,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,EAAE,CAAC;SACf;IACF,CAAC;;AAjzBD;;;;WAAkC,WAAW;GAAC;AAC9C;;;;WAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import type { Color } from \"../../core/util/Color\";\nimport type { ColorSet } from \"../../core/util/ColorSet\";\nimport type { Bullet } from \"../../core/render/Bullet\";\nimport type { Root } from \"../../core/Root\";\nimport type { Easing } from \"../../core/util/Ease\";\nimport type { PatternSet } from \"../../core/util/PatternSet\";\nimport type { Pattern } from \"../../core/render/patterns/Pattern\";\n\nimport { HierarchyDefaultTheme } from \"./HierarchyDefaultTheme\";\nimport { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate, ISeriesEvents } from \"../../core/render/Series\";\nimport { DataItem } from \"../../core/render/Component\";\nimport { HierarchyNode } from \"./HierarchyNode\";\nimport { Container } from \"../../core/render/Container\";\nimport { Label } from \"../../core/render/Label\";\nimport { Template } from \"../../core/util/Template\";\nimport { ListTemplate } from \"../../core/util/List\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $utils from \"../../core/util/Utils\";\nimport * as d3hierarchy from \"d3-hierarchy\";\n\n/**\n * @ignore\n */\nexport interface IHierarchyDataObject {\n\tname?: string,\n\tvalue?: number,\n\tchildren?: IHierarchyDataObject[],\n\tdataItem?: DataItem<IHierarchyDataItem>\n\tcustomValue?: boolean;\n};\n\nexport interface IHierarchyDataItem extends ISeriesDataItem {\n\n\t/**\n\t * Value of the node as set in data.\n\t */\n\tvalue: number;\n\n\t/**\n\t * @ignore\n\t */\n\tvalueWorking: number;\n\n\t/**\n\t * Percent value of the node, based on total sum of all nodes in upper level.\n\t */\n\tvaluePercentTotal: number;\n\n\t/**\n\t * Percent value of the node, based on the value of its direct parent.\n\t *\n\t * @since 5.2.21\n\t */\n\tvaluePercent: number;\n\n\t/**\n\t * Sum of child values.\n\t */\n\tsum: number;\n\n\t/**\n\t * Category.\n\t */\n\tcategory: string;\n\n\t/**\n\t * List of child node data items.\n\t */\n\tchildren: Array<DataItem<IHierarchyDataItem>>;\n\n\t/**\n\t * Raw data of the node's children.\n\t */\n\tchildData: Array<any>\n\n\t/**\n\t * Data item of parent node.\n\t */\n\tparent: DataItem<IHierarchyDataItem>;\n\n\t/**\n\t * Node's depth within the hierarchy.\n\t */\n\tdepth: number;\n\n\t/**\n\t * A reference to the related [[HierarchyNode]].\n\t */\n\tnode: HierarchyNode;\n\n\t/**\n\t * A reference to node's [[Label]].\n\t */\n\tlabel: Label;\n\n\t/**\n\t * Node's auto-assigned color.\n\t */\n\tfill: Color;\n\n\t/**\n\t * Node's auto-assigned pattern.\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\t/**\n\t * Indicates if node is currently disabled.\n\t */\n\tdisabled: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\td3HierarchyNode: d3hierarchy.HierarchyNode<IHierarchyDataObject>;\n\n}\n\nexport interface IHierarchySettings extends ISeriesSettings {\n\t/**\n\t * How to sort nodes by their value.\n\t *\n\t * @default \"none\"\n\t */\n\tsort?: \"ascending\" | \"descending\" | \"none\"\n\n\n\t/**\n\t * A field in data that holds numeric value for the node.\n\t */\n\tvalueField?: string;\n\n\t/**\n\t * A field in data that holds string-based identificator for node.\n\t */\n\tcategoryField?: string;\n\n\t/**\n\t * A field in data that holds an array of child node data.\n\t */\n\tchildDataField?: string;\n\n\t/**\n\t * A field in data that holds boolean value indicating if node is\n\t * disabled (collapsed).\n\t */\n\tdisabledField?: string;\n\n\t/**\n\t * A field in data that holds color used for fills for various elements, such\n\t * as nodes.\n\t */\n\tfillField?: string;\n\n\t/**\n\t * A [[ColorSet]] to use when asigning colors for nodes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Node_colors} for more info\n\t */\n\tcolors?: ColorSet;\n\n\t/**\n\t * A [[PatternSet]] to use when asigning patterns for nodes.\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 * Number of child levels to open when clicking on a node.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Drill_down} for more info\n\t */\n\tdownDepth?: number;\n\n\t/**\n\t * Number of levels parent levels to show from currently selected node.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Drill_down} for more info\n\t */\n\tupDepth?: number;\n\n\t/**\n\t * Number of levels to show on chart's first load.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Tree_depth} for more info\n\t */\n\tinitialDepth?: number;\n\n\t/**\n\t * If set, will show nodes starting from set level.\n\t *\n\t * It could be used to eliminate top level branches, that do not need to be\n\t * shown.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Tree_depth} for more info\n\t */\n\ttopDepth?: number;\n\n\t/**\n\t * If set to `true` will make all other branches collapse when some branch is\n\t * expanded.\n\t */\n\tsingleBranchOnly?: boolean;\n\n\t/**\n\t * A data item for currently selected node.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Pre_selected_branch} for more info\n\t */\n\tselectedDataItem?: DataItem<IHierarchyDataItem>;\n\n\t/**\n\t * Duration for all drill animations in milliseconds.\n\t */\n\tanimationDuration?: number;\n\n\t/**\n\t * An easing function to use for drill animations.\n\t */\n\tanimationEasing?: Easing;\n\n}\n\nexport interface IHierarchyPrivate extends ISeriesPrivate {\n\n\t/**\n\t * Level count in series.\n\t */\n\tmaxDepth: number;\n\n}\n\nexport interface IHierarchyEvents extends ISeriesEvents {\n\tdataitemselected: {\n\t\tdataItem?: DataItem<IHierarchyDataItem>\n\t};\n}\n\n/**\n * A base class for all hierarchy charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/} for more info\n */\nexport abstract class Hierarchy extends Series {\n\tpublic static className: string = \"Hierarchy\";\n\tpublic static classNames: Array<string> = Series.classNames.concat([Hierarchy.className]);\n\n\tdeclare public _settings: IHierarchySettings;\n\tdeclare public _privateSettings: IHierarchyPrivate;\n\tdeclare public _dataItemSettings: IHierarchyDataItem;\n\tdeclare public _events: IHierarchyEvents;\n\n\t/**\n\t * A [[Container]] that nodes are placed in.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly nodesContainer = this.children.push(Container.new(this._root, { isMeasured: false }));\n\n\tpublic _rootNode: d3hierarchy.HierarchyNode<IHierarchyDataObject> | undefined;\n\n\tpublic _treeData: IHierarchyDataObject | undefined;\n\n\tprotected _index: number = 0;\n\n\tprotected _tag: string = \"hierarchy\";\n\n\t/**\n\t * A list of nodes in a [[Hierarchy]] chart.\n\t *\n\t * @default new ListTemplate<HierarchyNode>\n\t */\n\tpublic readonly nodes: ListTemplate<HierarchyNode> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => HierarchyNode.new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.nodes.template.get(\"themeTags\", []), [this._tag, \"hierarchy\", \"node\"])\n\t\t}, this.nodes.template)\n\t));\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeNode(dataItem: DataItem<this[\"_dataItemSettings\"]>): HierarchyNode {\n\n\t\tconst childData = dataItem.get(\"childData\");\n\n\t\tconst node = this.nodes.make();\n\t\tnode.series = this;\n\t\tnode._setDataItem(dataItem);\n\t\tthis.nodes.push(node);\n\t\tdataItem.setRaw(\"node\", node);\n\n\t\tconst label = this.labels.make();\n\t\tlabel._setDataItem(dataItem);\n\t\tdataItem.setRaw(\"label\", label);\n\t\tthis.labels.push(label);\n\n\t\tif (!childData || childData.length == 0) {\n\t\t\tnode.addTag(\"last\");\n\t\t}\n\n\t\tconst depth = dataItem.get(\"depth\");\n\t\tnode.addTag(\"depth\" + depth);\n\n\t\tthis.nodesContainer.children.push(node);\n\t\tnode.children.push(label);\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * A list of label elements in a [[Hierarchy]] chart.\n\t *\n\t * @default new ListTemplate<Label>\n\t */\n\tpublic readonly labels: ListTemplate<Label> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Label.new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.labels.template.get(\"themeTags\", []), [this._tag])\n\t\t}, this.labels.template)\n\t));\n\n\tpublic _currentDownDepth: number | undefined;\n\n\tprotected _afterNew() {\n\t\tthis._defaultThemes.push(HierarchyDefaultTheme.new(this._root));\n\t\tthis.fields.push(\"category\", \"childData\", \"disabled\", \"fill\");\n\t\tthis.children.push(this.bulletsContainer);\n\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this._valuesDirty) {\n\t\t\tthis._treeData = {};\n\n\t\t\tconst first = this.dataItems[0];\n\t\t\tif (first) {\n\t\t\t\tthis._makeHierarchyData(this._treeData, first);\n\t\t\t\tthis._index = 0;\n\t\t\t\tthis._rootNode = (d3hierarchy.hierarchy(this._treeData) as any);\n\t\t\t\tif (this._rootNode) {\n\t\t\t\t\tthis._rootNode.sum((d) => {\n\t\t\t\t\t\treturn d.value as any;\n\t\t\t\t\t});\n\t\t\t\t\tconst sort = this.get(\"sort\")\n\t\t\t\t\tif (sort == \"descending\") {\n\t\t\t\t\t\tthis._rootNode.sort((a, b) => (b.value as any) - (a.value as any));\n\t\t\t\t\t}\n\t\t\t\t\telse if (sort == \"ascending\") {\n\t\t\t\t\t\tthis._rootNode.sort((a, b) => (a.value as any) - (b.value as any));\n\t\t\t\t\t}\n\t\t\t\t\tthis.setPrivateRaw(\"valueLow\", Infinity);\n\t\t\t\t\tthis.setPrivateRaw(\"valueHigh\", -Infinity);\n\t\t\t\t\tthis.setPrivateRaw(\"maxDepth\", 0);\n\t\t\t\t\tthis._updateValues(this._rootNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this._valuesDirty || this._sizeDirty) {\n\t\t\tthis._updateVisuals();\n\t\t}\n\n\t\tif (this._sizeDirty) {\n\t\t\tconst dataItem = this.get(\"selectedDataItem\");\n\t\t\tif (dataItem) {\n\t\t\t\tthis._zoom(dataItem);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\t\tif (this.isDirty(\"selectedDataItem\")) {\n\t\t\tthis._selectDataItem(this.get(\"selectedDataItem\"));\n\t\t}\n\t}\n\n\tprotected _updateVisuals() {\n\t\tif (this._rootNode) {\n\t\t\tthis._updateNodes(this._rootNode);\n\t\t}\n\t}\n\n\tprotected _updateNodes(hierarchyNode: d3hierarchy.HierarchyNode<IHierarchyDataObject>) {\n\t\tconst dataItem = hierarchyNode.data.dataItem;\n\n\t\tif (dataItem) {\n\t\t\tthis._updateNode(dataItem);\n\n\t\t\tif (this.bullets.length > 0 && !dataItem.bullets) {\n\t\t\t\tthis._makeBullets(dataItem);\n\t\t\t}\n\n\t\t\tconst hierarchyChildren = hierarchyNode.children;\n\t\t\tif (hierarchyChildren) {\n\t\t\t\t$array.each(hierarchyChildren, (hierarchyChild) => {\n\t\t\t\t\tthis._updateNodes(hierarchyChild)\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _updateNode(_dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\n\t}\n\n\t/**\n\t * Looks up and returns a data item by its ID.\n\t *\n\t * @param id ID\n\t * @return Data item\n\t */\n\tpublic getDataItemById(id: string): DataItem<this[\"_dataItemSettings\"]> | undefined {\n\t\treturn this._getDataItemById(this.dataItems, id);\n\t}\n\n\tpublic _getDataItemById(dataItems: Array<DataItem<this[\"_dataItemSettings\"]>>, id: string): DataItem<this[\"_dataItemSettings\"]> | undefined {\n\n\t\tlet di: DataItem<this[\"_dataItemSettings\"]> | undefined;\n\n\t\t$array.each(dataItems, (dataItem: any) => {\n\n\t\t\tif (dataItem.get(\"id\") == id) {\n\t\t\t\tdi = dataItem;\n\t\t\t}\n\n\t\t\tconst children = dataItem.get(\"children\");\n\t\t\tif (children) {\n\t\t\t\tlet childDataItem = this._getDataItemById(children, id);\n\t\t\t\tif (childDataItem) {\n\t\t\t\t\tdi = childDataItem\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\treturn di;\n\t}\n\n\tprotected _handleBullets(dataItems: Array<DataItem<this[\"_dataItemSettings\"]>>) {\n\t\t$array.each(dataItems, (dataItem) => {\n\t\t\tconst bullets = dataItem.bullets;\n\t\t\tif (bullets) {\n\t\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\t\tbullet.dispose();\n\t\t\t\t})\n\t\t\t\tdataItem.bullets = undefined;\n\t\t\t}\n\n\t\t\tconst children = dataItem.get(\"children\");\n\n\t\t\tif (children) {\n\t\t\t\tthis._handleBullets(children);\n\t\t\t}\n\t\t})\n\n\t\tthis._updateVisuals();\n\t}\n\n\tprotected _onDataClear() {\n\t\tsuper._onDataClear();\n\t\tconst colors = this.get(\"colors\");\n\t\tif (colors) {\n\t\t\tcolors.reset();\n\t\t}\n\n\t\tconst patterns = this.get(\"patterns\");\n\t\tif (patterns) {\n\t\t\tpatterns.reset();\n\t\t}\n\t}\n\n\tprotected processDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.processDataItem(dataItem);\n\n\t\tconst childData = dataItem.get(\"childData\");\n\t\tconst colors = this.get(\"colors\");\n\t\tconst patterns = this.get(\"patterns\");\n\t\tconst topDepth = this.get(\"topDepth\", 0);\n\n\t\tif (!dataItem.get(\"parent\")) {\n\t\t\tdataItem.setRaw(\"depth\", 0);\n\t\t\tif (colors && topDepth == 0 && dataItem.get(\"fill\") == null) {\n\t\t\t\tdataItem.setRaw(\"fill\", colors.next());\n\n\t\t\t\tif (patterns) {\n\t\t\t\t\tdataItem.setRaw(\"fillPattern\", patterns.next());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlet depth = dataItem.get(\"depth\");\n\t\tconst initialDepth = this.get(\"initialDepth\", 1);\n\n\t\tthis.makeNode(dataItem);\n\t\tthis._processDataItem(dataItem);\n\n\t\tif (childData) {\n\t\t\tconst children: Array<DataItem<this[\"_dataItemSettings\"]>> = [];\n\t\t\tdataItem.setRaw(\"children\", children);\n\n\t\t\t$array.each(childData, (child) => {\n\t\t\t\tconst childDataItem = new DataItem(this, child, this._makeDataItem(child));\n\n\t\t\t\tchildren.push(childDataItem);\n\n\t\t\t\tchildDataItem.setRaw(\"parent\", dataItem);\n\t\t\t\tchildDataItem.setRaw(\"depth\", depth + 1);\n\n\t\t\t\tif (this.dataItems.length == 1 && depth == 0) {\n\t\t\t\t\tif (colors && childDataItem.get(\"fill\") == null) {\n\t\t\t\t\t\tchildDataItem.setRaw(\"fill\", colors.next());\n\t\t\t\t\t}\n\t\t\t\t\tif (patterns && childDataItem.get(\"fillPattern\") == null) {\n\t\t\t\t\t\tchildDataItem.setRaw(\"fillPattern\", patterns.next());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (childDataItem.get(\"fill\") == null) {\n\t\t\t\t\t\tchildDataItem.setRaw(\"fill\", dataItem.get(\"fill\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (childDataItem.get(\"fillPattern\") == null) {\n\t\t\t\t\t\tchildDataItem.setRaw(\"fillPattern\", dataItem.get(\"fillPattern\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.processDataItem(childDataItem);\n\t\t\t})\n\t\t}\n\n\t\tconst children = dataItem.get(\"children\");\n\t\tif (!children || children.length == 0) {\n\t\t\tconst node = dataItem.get(\"node\");\n\t\t\tnode.setAll({ toggleKey: undefined });\n\t\t}\n\n\t\tif (dataItem.get(\"disabled\") == null) {\n\t\t\tif (depth >= topDepth + initialDepth) {\n\t\t\t\tthis.disableDataItem(dataItem, 0);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Adds children data to the target data item.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/hierarchy-api/#Dynamically_adding_child_nodes} for more info\n\t * @since 5.4.5\n\t */\n\tpublic addChildData(dataItem: DataItem<this[\"_dataItemSettings\"]>, data: Array<any>) {\n\t\tconst dataContext = dataItem.dataContext as any;\n\t\tconst childDataField = this.get(\"childDataField\");\n\n\t\tlet childData = dataContext[childDataField] as any;\n\t\tif (!childData) {\n\t\t\tchildData = data;\n\t\t\tdataContext[childDataField] = childData;\n\t\t}\n\t\telse {\n\t\t\tchildData.push(...data);\n\t\t}\n\n\t\tlet children = dataItem.get(\"children\");\n\t\tif (!children) {\n\t\t\tchildren = [];\n\t\t\tdataItem.set(\"children\", children);\n\t\t}\n\n\t\tconst node = dataItem.get(\"node\");\n\n\t\tif (node) {\n\t\t\tnode.set(\"toggleKey\", \"disabled\");\n\t\t}\n\n\t\tlet depth = dataItem.get(\"depth\");\n\n\t\t$array.each(childData, (child) => {\n\t\t\tlet found = false;\n\t\t\t$array.eachContinue(children, (dataItem) => {\n\t\t\t\tif (dataItem.dataContext == child) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t})\n\n\t\t\tif (!found) {\n\t\t\t\tconst childDataItem = new DataItem(this, child, this._makeDataItem(child));\n\n\t\t\t\tchildren.push(childDataItem);\n\n\t\t\t\tchildDataItem.setRaw(\"parent\", dataItem);\n\t\t\t\tchildDataItem.setRaw(\"depth\", depth + 1);\n\n\t\t\t\tif (childDataItem.get(\"fill\") == null) {\n\t\t\t\t\tlet fill = dataItem.get(\"fill\");\n\t\t\t\t\tif(fill == null) {\n\t\t\t\t\t\tconst colors = this.get(\"colors\");\n\t\t\t\t\t\tif(colors){\n\t\t\t\t\t\t\tfill = colors.next();\t\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tchildDataItem.setRaw(\"fill\", fill);\n\t\t\t\t}\n\n\t\t\t\tthis.processDataItem(childDataItem);\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected _processDataItem(_dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\n\t}\n\n\tprotected _updateValues(d3HierarchyNode: d3hierarchy.HierarchyNode<IHierarchyDataObject>) {\n\t\tconst dataItem = d3HierarchyNode.data.dataItem;\n\n\t\tif (d3HierarchyNode.depth > this.getPrivate(\"maxDepth\")) {\n\t\t\tthis.setPrivateRaw(\"maxDepth\", d3HierarchyNode.depth);\n\t\t}\n\n\t\tif (dataItem) {\n\t\t\tdataItem.setRaw(\"d3HierarchyNode\", d3HierarchyNode);\n\n\t\t\t(d3HierarchyNode as any).index = this._index;\n\n\t\t\tthis._index++;\n\n\t\t\tthis.root.events.once(\"frameended\", () => {\n\t\t\t\tdataItem.get(\"node\").set(\"disabled\", dataItem.get(\"disabled\"));\n\t\t\t})\n\n\t\t\tlet dataValue = d3HierarchyNode.data.value;\n\t\t\tlet value = d3HierarchyNode.value\n\n\t\t\tif (dataValue != null) {\n\t\t\t\tvalue = dataValue;\n\t\t\t\t(d3HierarchyNode as any)[\"value\"] = value;\n\t\t\t}\n\n\t\t\tif ($type.isNumber(value)) {\n\t\t\t\tdataItem.setRaw(\"sum\", value);\n\t\t\t\tdataItem.setRaw(\"valuePercentTotal\", value / this.dataItems[0].get(\"sum\") * 100);\n\n\t\t\t\tlet valuePercent = 100;\n\t\t\t\tconst parent = dataItem.get(\"parent\");\n\t\t\t\tif (parent) {\n\t\t\t\t\tvaluePercent = value / parent.get(\"sum\") * 100;\n\t\t\t\t}\n\t\t\t\tdataItem.get(\"label\").text.markDirtyText();\n\t\t\t\tdataItem.setRaw(\"valuePercent\", valuePercent);\n\n\t\t\t\tconst valueLow = this.getPrivate(\"valueLow\");\n\t\t\t\tif (valueLow != undefined && valueLow > value) {\n\t\t\t\t\tthis.setPrivateRaw(\"valueLow\", value);\n\t\t\t\t}\n\n\t\t\t\tconst valueHigh = this.getPrivate(\"valueHigh\");\n\t\t\t\tif (valueHigh != undefined && valueHigh < value) {\n\t\t\t\t\tthis.setPrivateRaw(\"valueHigh\", value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.updateLegendValue(dataItem);\n\t\t}\n\n\t\tconst hierarchyChildren = d3HierarchyNode.children;\n\t\tif (hierarchyChildren) {\n\t\t\t$array.each(hierarchyChildren, (d3HierarchyChild) => {\n\t\t\t\tthis._updateValues(d3HierarchyChild);\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _makeHierarchyData(data: IHierarchyDataObject, dataItem: DataItem<IHierarchyDataItem>) {\n\t\tdata.dataItem = dataItem;\n\n\t\tconst children = dataItem.get(\"children\");\n\t\tif (children) {\n\t\t\tconst childrenDataArray: Array<IHierarchyDataObject> = [];\n\t\t\tdata.children = childrenDataArray;\n\t\t\t$array.each(children, (childDataItem) => {\n\t\t\t\tconst childData = {};\n\t\t\t\tchildrenDataArray.push(childData);\n\t\t\t\tthis._makeHierarchyData(childData, childDataItem);\n\t\t\t})\n\n\t\t\tconst value = dataItem.get(\"valueWorking\");\n\t\t\tif ($type.isNumber(value)) {\n\t\t\t\tdata.value = value;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tconst value = dataItem.get(\"valueWorking\");\n\t\t\tif ($type.isNumber(value)) {\n\t\t\t\tdata.value = value;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tconst node = dataItem.get(\"node\");\n\t\tif (node) {\n\t\t\tthis.nodes.removeValue(node);\n\t\t\tnode.dispose();\n\t\t}\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\tthis.labels.removeValue(label);\n\t\t\tlabel.dispose();\n\t\t}\n\n\t\tconst children = dataItem.get(\"children\");\n\t\tif (children) {\n\t\t\t$array.each(children, (child) => {\n\t\t\t\tthis.disposeDataItem(child);\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Hides hierarchy'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<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.hideDataItem(dataItem, duration)];\n\n\t\tconst hiddenState = this.states.create(\"hidden\", {})\n\n\t\tif (!$type.isNumber(duration)) {\n\t\t\tconst stateAnimationDuration = \"stateAnimationDuration\"\n\t\t\tduration = hiddenState.get(stateAnimationDuration, this.get(stateAnimationDuration, 0));\n\t\t}\n\n\t\tconst stateAnimationEasing = \"stateAnimationEasing\";\n\t\tconst easing = hiddenState.get(stateAnimationEasing, this.get(stateAnimationEasing));\n\n\t\tconst children = dataItem.get(\"children\");\n\n\t\tif ((!children || children.length == 0) && $type.isNumber(dataItem.get(\"value\"))) {\n\t\t\tpromises.push(dataItem.animate({ key: \"valueWorking\" as any, to: 0, duration: duration, easing: easing }).waitForStop());\n\t\t}\n\n\t\tconst node = dataItem.get(\"node\");\n\t\tnode.hide();\n\t\tnode.hideTooltip();\n\n\t\tif (children) {\n\t\t\t$array.each(children, (childDataItem) => {\n\t\t\t\tpromises.push(this.hideDataItem(childDataItem));\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Shows hierarchy'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<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.showDataItem(dataItem, duration)];\n\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\tconst children = dataItem.get(\"children\");\n\n\t\tif ((!children || children.length == 0) && $type.isNumber(dataItem.get(\"value\"))) {\n\t\t\tpromises.push(dataItem.animate({ key: \"valueWorking\" as any, to: dataItem.get(\"value\"), duration: duration, easing: easing }).waitForStop());\n\t\t}\n\n\t\tconst node = dataItem.get(\"node\");\n\t\tnode.show();\n\n\t\tif (children) {\n\t\t\t$array.each(children, (childDataItem) => {\n\t\t\t\tpromises.push(this.showDataItem(childDataItem));\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Enables a disabled data item.\n\t *\n\t * @param dataItem Target data item\n\t * @param duration Animation duration in milliseconds\n\t */\n\tpublic enableDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, maxDepth?: number, depth?: number, duration?: number) {\n\t\tif (depth == null) {\n\t\t\tdepth = 0;\n\t\t}\n\n\t\tif (maxDepth == null) {\n\t\t\tmaxDepth = 1;\n\t\t}\n\n\t\tdataItem.set(\"disabled\", false);\n\t\tdataItem.get(\"node\").set(\"disabled\", false);\n\n\t\tif (!dataItem.isHidden()) {\n\t\t\tdataItem.get(\"node\").show(duration);\n\t\t}\n\n\n\n\t\tconst topDepth = this.get(\"topDepth\", 0);\n\t\tif (dataItem.get(\"depth\") < topDepth) {\n\t\t\tdataItem.get(\"node\").hide(0);\n\t\t}\n\n\t\tif (depth == 0) {\n\t\t\tconst upDepth = this.get(\"upDepth\", Infinity);\n\t\t\tlet parent = dataItem;\n\t\t\tlet count = 0;\n\n\t\t\twhile (parent !== undefined) {\n\t\t\t\tif (count > upDepth) {\n\t\t\t\t\tparent.get(\"node\").hide();\n\t\t\t\t}\n\t\t\t\tparent = parent.get(\"parent\");\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tlet children = dataItem.get(\"children\");\n\t\tif (children) {\n\t\t\tif (depth < maxDepth - 1) {\n\t\t\t\t$array.each(children, (child) => {\n\t\t\t\t\tconst disabledField = this.get(\"disabledField\");\n\t\t\t\t\tif (disabledField) {\n\t\t\t\t\t\tconst dataContext = child.dataContext as any;\n\t\t\t\t\t\tif (dataContext[disabledField] != true) {\n\t\t\t\t\t\t\tthis.enableDataItem(child, maxDepth, depth as number + 1, duration);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.disableDataItem(child);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.enableDataItem(child, maxDepth, depth as number + 1, duration);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$array.each(children, (child) => {\n\t\t\t\t\tif (!child.isHidden()) {\n\t\t\t\t\t\tchild.get(\"node\").show(duration);\n\t\t\t\t\t\tchild.get(\"node\").states.applyAnimate(\"disabled\");\n\t\t\t\t\t\tchild.set(\"disabled\", true);\n\n\t\t\t\t\t\tthis.disableDataItem(child);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Disables a data item.\n\t *\n\t * @param dataItem Target data item\n\t * @param duration Animation duration in milliseconds\n\t */\n\tpublic disableDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, duration?: number) {\n\t\tdataItem.set(\"disabled\", true);\n\t\tlet children = dataItem.get(\"children\");\n\t\tif (children) {\n\t\t\t$array.each(children, (child) => {\n\t\t\t\tthis.disableDataItem(child, duration);\n\t\t\t\tchild.get(\"node\").hide(duration);\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _selectDataItem(dataItem?: DataItem<this[\"_dataItemSettings\"]>, downDepth?: number, skipDisptach?: boolean) {\n\t\tif (dataItem) {\n\t\t\tif (!skipDisptach) {\n\t\t\t\tconst type = \"dataitemselected\";\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this, dataItem: dataItem });\n\t\t\t}\n\n\t\t\tlet maxDepth = this.getPrivate(\"maxDepth\", 1);\n\t\t\tconst topDepth = this.get(\"topDepth\", 0);\n\n\t\t\tif (downDepth == null) {\n\t\t\t\tdownDepth = Math.min(this.get(\"downDepth\", 1), maxDepth - dataItem.get(\"depth\"));\n\t\t\t}\n\n\t\t\tconst hierarchyNode = dataItem.get(\"d3HierarchyNode\");\n\t\t\tlet currentDepth = hierarchyNode.depth;\n\t\t\tif (!this.inited) {\n\t\t\t\tdownDepth = Math.min(this.get(\"initialDepth\", 1), maxDepth - topDepth);\n\t\t\t\tdownDepth = Math.max(0, downDepth);\n\t\t\t}\n\n\t\t\tthis._currentDownDepth = downDepth;\n\n\t\t\tif (currentDepth + downDepth > maxDepth) {\n\t\t\t\tdownDepth = maxDepth - currentDepth;\n\t\t\t}\n\n\t\t\tif (currentDepth < topDepth) {\n\t\t\t\tdownDepth += topDepth - currentDepth;\n\t\t\t\tcurrentDepth = topDepth;\n\t\t\t}\n\n\t\t\tconst children = dataItem.get(\"children\");\n\n\t\t\tif (children && children.length > 0) {\n\t\t\t\tif (downDepth > 0) {\n\t\t\t\t\tthis.enableDataItem(dataItem, downDepth);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdataItem.get(\"node\").show();\n\t\t\t\t\t$array.each(children, (child) => {\n\t\t\t\t\t\tchild.get(\"node\").hide();\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tif (hierarchyNode.depth < topDepth) {\n\t\t\t\t\tdataItem.get(\"node\").hide(0);\n\t\t\t\t}\n\n\t\t\t\tif (this.get(\"singleBranchOnly\")) {\n\t\t\t\t\tthis._handleSingle(dataItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.enableDataItem(dataItem, downDepth);\n\t\t\t}\n\n\t\t\tthis._root.events.once(\"frameended\", () => {\n\t\t\t\tthis._zoom(dataItem);\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _zoom(_dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t}\n\n\tprotected _handleSingle(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tconst parent = dataItem.get(\"parent\");\n\t\tif (parent) {\n\t\t\tconst children = parent.get(\"children\");\n\t\t\tif (children) {\n\t\t\t\t$array.each(children, (child) => {\n\t\t\t\t\tif (child != dataItem) {\n\t\t\t\t\t\tthis.disableDataItem(child);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Selects specific data item.\n\t *\n\t * @param dataItem Target data item\n\t */\n\tpublic selectDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tconst parent = dataItem.get(\"parent\");\n\t\tconst maxDepth = this.getPrivate(\"maxDepth\", 1);\n\n\t\tif (this.get(\"selectedDataItem\") == dataItem) {\n\t\t\tif (parent) {\n\t\t\t\tthis.set(\"selectedDataItem\", parent);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet depth = Math.min(this.get(\"downDepth\", 1), maxDepth - dataItem.get(\"depth\"));\n\n\t\t\t\tif (this._currentDownDepth == depth) {\n\t\t\t\t\tdepth = Math.min(this.get(\"initialDepth\", 1), maxDepth - this.get(\"topDepth\", 0));\n\t\t\t\t}\n\n\t\t\t\tthis._selectDataItem(dataItem, depth);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.set(\"selectedDataItem\", dataItem);\n\t\t}\n\t}\n\n\n\tprotected _makeBullet(dataItem: DataItem<this[\"_dataItemSettings\"]>, bulletFunction: (root: Root, series: Series, dataItem: DataItem<this[\"_dataItemSettings\"]>) => Bullet | undefined, index?: number) {\n\t\tconst bullet = super._makeBullet(dataItem, bulletFunction, index);\n\t\tif (bullet) {\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tconst node = dataItem.get(\"node\");\n\n\t\t\tif (sprite) {\n\t\t\t\tnode.children.push(sprite);\n\t\t\t\tnode.on(\"width\", () => {\n\t\t\t\t\tthis._positionBullet(bullet);\n\t\t\t\t})\n\t\t\t\tnode.on(\"height\", () => {\n\t\t\t\t\tthis._positionBullet(bullet);\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\treturn bullet;\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<this[\"_dataItemSettings\"]>;\n\n\t\t\tconst locationX = bullet.get(\"locationX\", 0.5);\n\t\t\tconst locationY = bullet.get(\"locationY\", 0.5);\n\n\t\t\tconst node = dataItem.get(\"node\");\n\n\t\t\tsprite.set(\"x\", node.width() * locationX);\n\t\t\tsprite.set(\"y\", node.height() * locationY);\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<this[\"_dataItemSettings\"]>) {\n\t\tconst node = dataItem.get(\"node\");\n\t\tif (node && !node.isHidden()) {\n\t\t\tnode.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<this[\"_dataItemSettings\"]>) {\n\t\tconst node = dataItem.get(\"node\");\n\t\tif (node) {\n\t\t\tnode.unhover();\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"Hierarchy.js","sourceRoot":"","sources":["../../../../../src/.internal/charts/hierarchy/Hierarchy.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAmE,MAAM,0BAA0B,CAAC;AACnH,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;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S,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;YAE/C,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAElC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,SAAS,CAAC,CAAC;YAC1C,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;SAC3C;IACF,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,QAA6C;QACjE,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE;YAC7B,IAAI,CAAC,KAAK,EAAE,CAAC;SACb;IACF,CAAC;IAED;;;;;OAKG;IACI,eAAe,CAAC,QAA6C;QACnE,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,EAAE,CAAC;SACf;IACF,CAAC;;AAjzBD;;;;WAAkC,WAAW;GAAC;AAC9C;;;;WAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import type { Color } from \"../../core/util/Color\";\nimport type { ColorSet } from \"../../core/util/ColorSet\";\nimport type { Bullet } from \"../../core/render/Bullet\";\nimport type { Root } from \"../../core/Root\";\nimport type { Easing } from \"../../core/util/Ease\";\nimport type { PatternSet } from \"../../core/util/PatternSet\";\nimport type { Pattern } from \"../../core/render/patterns/Pattern\";\n\nimport { HierarchyDefaultTheme } from \"./HierarchyDefaultTheme\";\nimport { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate, ISeriesEvents } from \"../../core/render/Series\";\nimport { DataItem } from \"../../core/render/Component\";\nimport { HierarchyNode } from \"./HierarchyNode\";\nimport { Container } from \"../../core/render/Container\";\nimport { Label } from \"../../core/render/Label\";\nimport { Template } from \"../../core/util/Template\";\nimport { ListTemplate } from \"../../core/util/List\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\nimport * as $utils from \"../../core/util/Utils\";\nimport * as d3hierarchy from \"d3-hierarchy\";\n\n/**\n * @ignore\n */\nexport interface IHierarchyDataObject {\n\tname?: string,\n\tvalue?: number,\n\tchildren?: IHierarchyDataObject[],\n\tdataItem?: DataItem<IHierarchyDataItem>\n\tcustomValue?: boolean;\n};\n\nexport interface IHierarchyDataItem extends ISeriesDataItem {\n\n\t/**\n\t * Value of the node as set in data.\n\t */\n\tvalue: number;\n\n\t/**\n\t * @ignore\n\t */\n\tvalueWorking: number;\n\n\t/**\n\t * Percent value of the node, based on total sum of all nodes in upper level.\n\t */\n\tvaluePercentTotal: number;\n\n\t/**\n\t * Percent value of the node, based on the value of its direct parent.\n\t *\n\t * @since 5.2.21\n\t */\n\tvaluePercent: number;\n\n\t/**\n\t * Sum of child values.\n\t */\n\tsum: number;\n\n\t/**\n\t * Category.\n\t */\n\tcategory: string;\n\n\t/**\n\t * List of child node data items.\n\t */\n\tchildren: Array<DataItem<IHierarchyDataItem>>;\n\n\t/**\n\t * Raw data of the node's children.\n\t */\n\tchildData: Array<any>\n\n\t/**\n\t * Data item of parent node.\n\t */\n\tparent: DataItem<IHierarchyDataItem>;\n\n\t/**\n\t * Node's depth within the hierarchy.\n\t */\n\tdepth: number;\n\n\t/**\n\t * A reference to the related [[HierarchyNode]].\n\t */\n\tnode: HierarchyNode;\n\n\t/**\n\t * A reference to node's [[Label]].\n\t */\n\tlabel: Label;\n\n\t/**\n\t * Node's auto-assigned color.\n\t */\n\tfill: Color;\n\n\t/**\n\t * Node's auto-assigned pattern.\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\t/**\n\t * Indicates if node is currently disabled.\n\t */\n\tdisabled: boolean;\n\n\t/**\n\t * @ignore\n\t */\n\td3HierarchyNode: d3hierarchy.HierarchyNode<IHierarchyDataObject>;\n\n}\n\nexport interface IHierarchySettings extends ISeriesSettings {\n\t/**\n\t * How to sort nodes by their value.\n\t *\n\t * @default \"none\"\n\t */\n\tsort?: \"ascending\" | \"descending\" | \"none\"\n\n\n\t/**\n\t * A field in data that holds numeric value for the node.\n\t */\n\tvalueField?: string;\n\n\t/**\n\t * A field in data that holds string-based identificator for node.\n\t */\n\tcategoryField?: string;\n\n\t/**\n\t * A field in data that holds an array of child node data.\n\t */\n\tchildDataField?: string;\n\n\t/**\n\t * A field in data that holds boolean value indicating if node is\n\t * disabled (collapsed).\n\t */\n\tdisabledField?: string;\n\n\t/**\n\t * A field in data that holds color used for fills for various elements, such\n\t * as nodes.\n\t */\n\tfillField?: string;\n\n\t/**\n\t * A [[ColorSet]] to use when asigning colors for nodes.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Node_colors} for more info\n\t */\n\tcolors?: ColorSet;\n\n\t/**\n\t * A [[PatternSet]] to use when asigning patterns for nodes.\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 * Number of child levels to open when clicking on a node.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Drill_down} for more info\n\t */\n\tdownDepth?: number;\n\n\t/**\n\t * Number of levels parent levels to show from currently selected node.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Drill_down} for more info\n\t */\n\tupDepth?: number;\n\n\t/**\n\t * Number of levels to show on chart's first load.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Tree_depth} for more info\n\t */\n\tinitialDepth?: number;\n\n\t/**\n\t * If set, will show nodes starting from set level.\n\t *\n\t * It could be used to eliminate top level branches, that do not need to be\n\t * shown.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Tree_depth} for more info\n\t */\n\ttopDepth?: number;\n\n\t/**\n\t * If set to `true` will make all other branches collapse when some branch is\n\t * expanded.\n\t */\n\tsingleBranchOnly?: boolean;\n\n\t/**\n\t * A data item for currently selected node.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/#Pre_selected_branch} for more info\n\t */\n\tselectedDataItem?: DataItem<IHierarchyDataItem>;\n\n\t/**\n\t * Duration for all drill animations in milliseconds.\n\t */\n\tanimationDuration?: number;\n\n\t/**\n\t * An easing function to use for drill animations.\n\t */\n\tanimationEasing?: Easing;\n\n}\n\nexport interface IHierarchyPrivate extends ISeriesPrivate {\n\n\t/**\n\t * Level count in series.\n\t */\n\tmaxDepth: number;\n\n}\n\nexport interface IHierarchyEvents extends ISeriesEvents {\n\tdataitemselected: {\n\t\tdataItem?: DataItem<IHierarchyDataItem>\n\t};\n}\n\n/**\n * A base class for all hierarchy charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/} for more info\n */\nexport abstract class Hierarchy extends Series {\n\tpublic static className: string = \"Hierarchy\";\n\tpublic static classNames: Array<string> = Series.classNames.concat([Hierarchy.className]);\n\n\tdeclare public _settings: IHierarchySettings;\n\tdeclare public _privateSettings: IHierarchyPrivate;\n\tdeclare public _dataItemSettings: IHierarchyDataItem;\n\tdeclare public _events: IHierarchyEvents;\n\n\t/**\n\t * A [[Container]] that nodes are placed in.\n\t *\n\t * @default Container.new()\n\t */\n\tpublic readonly nodesContainer = this.children.push(Container.new(this._root, { isMeasured: false }));\n\n\tpublic _rootNode: d3hierarchy.HierarchyNode<IHierarchyDataObject> | undefined;\n\n\tpublic _treeData: IHierarchyDataObject | undefined;\n\n\tprotected _index: number = 0;\n\n\tprotected _tag: string = \"hierarchy\";\n\n\t/**\n\t * A list of nodes in a [[Hierarchy]] chart.\n\t *\n\t * @default new ListTemplate<HierarchyNode>\n\t */\n\tpublic readonly nodes: ListTemplate<HierarchyNode> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => HierarchyNode.new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.nodes.template.get(\"themeTags\", []), [this._tag, \"hierarchy\", \"node\"])\n\t\t}, this.nodes.template)\n\t));\n\n\t/**\n\t * @ignore\n\t */\n\tpublic makeNode(dataItem: DataItem<this[\"_dataItemSettings\"]>): HierarchyNode {\n\n\t\tconst childData = dataItem.get(\"childData\");\n\n\t\tconst node = this.nodes.make();\n\t\tnode.series = this;\n\t\tnode._setDataItem(dataItem);\n\t\tthis.nodes.push(node);\n\t\tdataItem.setRaw(\"node\", node);\n\n\t\tconst label = this.labels.make();\n\t\tlabel._setDataItem(dataItem);\n\t\tdataItem.setRaw(\"label\", label);\n\t\tthis.labels.push(label);\n\n\t\tif (!childData || childData.length == 0) {\n\t\t\tnode.addTag(\"last\");\n\t\t}\n\n\t\tconst depth = dataItem.get(\"depth\");\n\t\tnode.addTag(\"depth\" + depth);\n\n\t\tthis.nodesContainer.children.push(node);\n\t\tnode.children.push(label);\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * A list of label elements in a [[Hierarchy]] chart.\n\t *\n\t * @default new ListTemplate<Label>\n\t */\n\tpublic readonly labels: ListTemplate<Label> = this.addDisposer(new ListTemplate(\n\t\tTemplate.new({}),\n\t\t() => Label.new(this._root, {\n\t\t\tthemeTags: $utils.mergeTags(this.labels.template.get(\"themeTags\", []), [this._tag])\n\t\t}, this.labels.template)\n\t));\n\n\tpublic _currentDownDepth: number | undefined;\n\n\tprotected _afterNew() {\n\t\tthis._defaultThemes.push(HierarchyDefaultTheme.new(this._root));\n\t\tthis.fields.push(\"category\", \"childData\", \"disabled\", \"fill\");\n\t\tthis.children.push(this.bulletsContainer);\n\n\t\tsuper._afterNew();\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this._valuesDirty) {\n\t\t\tthis._treeData = {};\n\n\t\t\tconst first = this.dataItems[0];\n\t\t\tif (first) {\n\t\t\t\tthis._makeHierarchyData(this._treeData, first);\n\t\t\t\tthis._index = 0;\n\t\t\t\tthis._rootNode = (d3hierarchy.hierarchy(this._treeData) as any);\n\t\t\t\tif (this._rootNode) {\n\t\t\t\t\tthis._rootNode.sum((d) => {\n\t\t\t\t\t\treturn d.value as any;\n\t\t\t\t\t});\n\t\t\t\t\tconst sort = this.get(\"sort\")\n\t\t\t\t\tif (sort == \"descending\") {\n\t\t\t\t\t\tthis._rootNode.sort((a, b) => (b.value as any) - (a.value as any));\n\t\t\t\t\t}\n\t\t\t\t\telse if (sort == \"ascending\") {\n\t\t\t\t\t\tthis._rootNode.sort((a, b) => (a.value as any) - (b.value as any));\n\t\t\t\t\t}\n\t\t\t\t\tthis.setPrivateRaw(\"valueLow\", Infinity);\n\t\t\t\t\tthis.setPrivateRaw(\"valueHigh\", -Infinity);\n\t\t\t\t\tthis.setPrivateRaw(\"maxDepth\", 0);\n\t\t\t\t\tthis._updateValues(this._rootNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this._valuesDirty || this._sizeDirty) {\n\t\t\tthis._updateVisuals();\n\t\t}\n\n\t\tif (this._sizeDirty) {\n\t\t\tconst dataItem = this.get(\"selectedDataItem\");\n\t\t\tif (dataItem) {\n\t\t\t\tthis._zoom(dataItem);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\t\tif (this.isDirty(\"selectedDataItem\")) {\n\t\t\tthis._selectDataItem(this.get(\"selectedDataItem\"));\n\t\t}\n\t}\n\n\tprotected _updateVisuals() {\n\t\tif (this._rootNode) {\n\t\t\tthis._updateNodes(this._rootNode);\n\t\t}\n\t}\n\n\tprotected _updateNodes(hierarchyNode: d3hierarchy.HierarchyNode<IHierarchyDataObject>) {\n\t\tconst dataItem = hierarchyNode.data.dataItem;\n\n\t\tif (dataItem) {\n\t\t\tthis._updateNode(dataItem);\n\n\t\t\tif (this.bullets.length > 0 && !dataItem.bullets) {\n\t\t\t\tthis._makeBullets(dataItem);\n\t\t\t}\n\n\t\t\tconst hierarchyChildren = hierarchyNode.children;\n\t\t\tif (hierarchyChildren) {\n\t\t\t\t$array.each(hierarchyChildren, (hierarchyChild) => {\n\t\t\t\t\tthis._updateNodes(hierarchyChild)\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _updateNode(_dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\n\t}\n\n\t/**\n\t * Looks up and returns a data item by its ID.\n\t *\n\t * @param id ID\n\t * @return Data item\n\t */\n\tpublic getDataItemById(id: string): DataItem<this[\"_dataItemSettings\"]> | undefined {\n\t\treturn this._getDataItemById(this.dataItems, id);\n\t}\n\n\tpublic _getDataItemById(dataItems: Array<DataItem<this[\"_dataItemSettings\"]>>, id: string): DataItem<this[\"_dataItemSettings\"]> | undefined {\n\n\t\tlet di: DataItem<this[\"_dataItemSettings\"]> | undefined;\n\n\t\t$array.each(dataItems, (dataItem: any) => {\n\n\t\t\tif (dataItem.get(\"id\") == id) {\n\t\t\t\tdi = dataItem;\n\t\t\t}\n\n\t\t\tconst children = dataItem.get(\"children\");\n\t\t\tif (children) {\n\t\t\t\tlet childDataItem = this._getDataItemById(children, id);\n\t\t\t\tif (childDataItem) {\n\t\t\t\t\tdi = childDataItem\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\treturn di;\n\t}\n\n\tprotected _handleBullets(dataItems: Array<DataItem<this[\"_dataItemSettings\"]>>) {\n\t\t$array.each(dataItems, (dataItem) => {\n\t\t\tconst bullets = dataItem.bullets;\n\t\t\tif (bullets) {\n\t\t\t\t$array.each(bullets, (bullet) => {\n\t\t\t\t\tbullet.dispose();\n\t\t\t\t})\n\t\t\t\tdataItem.bullets = undefined;\n\t\t\t}\n\n\t\t\tconst children = dataItem.get(\"children\");\n\n\t\t\tif (children) {\n\t\t\t\tthis._handleBullets(children);\n\t\t\t}\n\t\t})\n\n\t\tthis._updateVisuals();\n\t}\n\n\tprotected _onDataClear() {\n\t\tsuper._onDataClear();\n\t\tconst colors = this.get(\"colors\");\n\t\tif (colors) {\n\t\t\tcolors.reset();\n\t\t}\n\n\t\tconst patterns = this.get(\"patterns\");\n\t\tif (patterns) {\n\t\t\tpatterns.reset();\n\t\t}\n\t}\n\n\tprotected processDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.processDataItem(dataItem);\n\n\t\tconst childData = dataItem.get(\"childData\");\n\t\tconst colors = this.get(\"colors\");\n\t\tconst patterns = this.get(\"patterns\");\n\t\tconst topDepth = this.get(\"topDepth\", 0);\n\n\t\tif (!dataItem.get(\"parent\")) {\n\t\t\tdataItem.setRaw(\"depth\", 0);\n\t\t\tif (colors && topDepth == 0 && dataItem.get(\"fill\") == null) {\n\t\t\t\tdataItem.setRaw(\"fill\", colors.next());\n\n\t\t\t\tif (patterns) {\n\t\t\t\t\tdataItem.setRaw(\"fillPattern\", patterns.next());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlet depth = dataItem.get(\"depth\");\n\t\tconst initialDepth = this.get(\"initialDepth\", 1);\n\n\t\tthis.makeNode(dataItem);\n\t\tthis._processDataItem(dataItem);\n\n\t\tif (childData) {\n\t\t\tconst children: Array<DataItem<this[\"_dataItemSettings\"]>> = [];\n\t\t\tdataItem.setRaw(\"children\", children);\n\n\t\t\t$array.each(childData, (child) => {\n\t\t\t\tconst childDataItem = new DataItem(this, child, this._makeDataItem(child));\n\n\t\t\t\tchildren.push(childDataItem);\n\n\t\t\t\tchildDataItem.setRaw(\"parent\", dataItem);\n\t\t\t\tchildDataItem.setRaw(\"depth\", depth + 1);\n\n\t\t\t\tif (this.dataItems.length == 1 && depth == 0) {\n\t\t\t\t\tif (colors && childDataItem.get(\"fill\") == null) {\n\t\t\t\t\t\tchildDataItem.setRaw(\"fill\", colors.next());\n\t\t\t\t\t}\n\t\t\t\t\tif (patterns && childDataItem.get(\"fillPattern\") == null) {\n\t\t\t\t\t\tchildDataItem.setRaw(\"fillPattern\", patterns.next());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (childDataItem.get(\"fill\") == null) {\n\t\t\t\t\t\tchildDataItem.setRaw(\"fill\", dataItem.get(\"fill\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (childDataItem.get(\"fillPattern\") == null) {\n\t\t\t\t\t\tchildDataItem.setRaw(\"fillPattern\", dataItem.get(\"fillPattern\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.processDataItem(childDataItem);\n\t\t\t})\n\t\t}\n\n\t\tconst children = dataItem.get(\"children\");\n\t\tif (!children || children.length == 0) {\n\t\t\tconst node = dataItem.get(\"node\");\n\t\t\tnode.setAll({ toggleKey: undefined });\n\t\t}\n\n\t\tif (dataItem.get(\"disabled\") == null) {\n\t\t\tif (depth >= topDepth + initialDepth) {\n\t\t\t\tthis.disableDataItem(dataItem, 0);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Adds children data to the target data item.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/hierarchy/hierarchy-api/#Dynamically_adding_child_nodes} for more info\n\t * @since 5.4.5\n\t */\n\tpublic addChildData(dataItem: DataItem<this[\"_dataItemSettings\"]>, data: Array<any>) {\n\t\tconst dataContext = dataItem.dataContext as any;\n\t\tconst childDataField = this.get(\"childDataField\");\n\n\t\tlet childData = dataContext[childDataField] as any;\n\t\tif (!childData) {\n\t\t\tchildData = data;\n\t\t\tdataContext[childDataField] = childData;\n\t\t}\n\t\telse {\n\t\t\tchildData.push(...data);\n\t\t}\n\n\t\tlet children = dataItem.get(\"children\");\n\t\tif (!children) {\n\t\t\tchildren = [];\n\t\t\tdataItem.set(\"children\", children);\n\t\t}\n\n\t\tconst node = dataItem.get(\"node\");\n\n\t\tif (node) {\n\t\t\tnode.set(\"toggleKey\", this.nodes.template.get(\"toggleKey\", \"disabled\"));\n\t\t}\n\n\t\tlet depth = dataItem.get(\"depth\");\n\n\t\t$array.each(childData, (child) => {\n\t\t\tlet found = false;\n\t\t\t$array.eachContinue(children, (dataItem) => {\n\t\t\t\tif (dataItem.dataContext == child) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t})\n\n\t\t\tif (!found) {\n\t\t\t\tconst childDataItem = new DataItem(this, child, this._makeDataItem(child));\n\n\t\t\t\tchildren.push(childDataItem);\n\n\t\t\t\tchildDataItem.setRaw(\"parent\", dataItem);\n\t\t\t\tchildDataItem.setRaw(\"depth\", depth + 1);\n\n\t\t\t\tif (childDataItem.get(\"fill\") == null) {\n\t\t\t\t\tlet fill = dataItem.get(\"fill\");\n\t\t\t\t\tif(fill == null) {\n\t\t\t\t\t\tconst colors = this.get(\"colors\");\n\t\t\t\t\t\tif(colors){\n\t\t\t\t\t\t\tfill = colors.next();\t\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tchildDataItem.setRaw(\"fill\", fill);\n\t\t\t\t}\n\n\t\t\t\tthis.processDataItem(childDataItem);\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected _processDataItem(_dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\n\t}\n\n\tprotected _updateValues(d3HierarchyNode: d3hierarchy.HierarchyNode<IHierarchyDataObject>) {\n\t\tconst dataItem = d3HierarchyNode.data.dataItem;\n\n\t\tif (d3HierarchyNode.depth > this.getPrivate(\"maxDepth\")) {\n\t\t\tthis.setPrivateRaw(\"maxDepth\", d3HierarchyNode.depth);\n\t\t}\n\n\t\tif (dataItem) {\n\t\t\tdataItem.setRaw(\"d3HierarchyNode\", d3HierarchyNode);\n\n\t\t\t(d3HierarchyNode as any).index = this._index;\n\n\t\t\tthis._index++;\n\n\t\t\tthis.root.events.once(\"frameended\", () => {\n\t\t\t\tdataItem.get(\"node\").set(\"disabled\", dataItem.get(\"disabled\"));\n\t\t\t})\n\n\t\t\tlet dataValue = d3HierarchyNode.data.value;\n\t\t\tlet value = d3HierarchyNode.value\n\n\t\t\tif (dataValue != null) {\n\t\t\t\tvalue = dataValue;\n\t\t\t\t(d3HierarchyNode as any)[\"value\"] = value;\n\t\t\t}\n\n\t\t\tif ($type.isNumber(value)) {\n\t\t\t\tdataItem.setRaw(\"sum\", value);\n\t\t\t\tdataItem.setRaw(\"valuePercentTotal\", value / this.dataItems[0].get(\"sum\") * 100);\n\n\t\t\t\tlet valuePercent = 100;\n\t\t\t\tconst parent = dataItem.get(\"parent\");\n\t\t\t\tif (parent) {\n\t\t\t\t\tvaluePercent = value / parent.get(\"sum\") * 100;\n\t\t\t\t}\n\t\t\t\tdataItem.get(\"label\").text.markDirtyText();\n\t\t\t\tdataItem.setRaw(\"valuePercent\", valuePercent);\n\n\t\t\t\tconst valueLow = this.getPrivate(\"valueLow\");\n\t\t\t\tif (valueLow != undefined && valueLow > value) {\n\t\t\t\t\tthis.setPrivateRaw(\"valueLow\", value);\n\t\t\t\t}\n\n\t\t\t\tconst valueHigh = this.getPrivate(\"valueHigh\");\n\t\t\t\tif (valueHigh != undefined && valueHigh < value) {\n\t\t\t\t\tthis.setPrivateRaw(\"valueHigh\", value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.updateLegendValue(dataItem);\n\t\t}\n\n\t\tconst hierarchyChildren = d3HierarchyNode.children;\n\t\tif (hierarchyChildren) {\n\t\t\t$array.each(hierarchyChildren, (d3HierarchyChild) => {\n\t\t\t\tthis._updateValues(d3HierarchyChild);\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _makeHierarchyData(data: IHierarchyDataObject, dataItem: DataItem<IHierarchyDataItem>) {\n\t\tdata.dataItem = dataItem;\n\n\t\tconst children = dataItem.get(\"children\");\n\t\tif (children) {\n\t\t\tconst childrenDataArray: Array<IHierarchyDataObject> = [];\n\t\t\tdata.children = childrenDataArray;\n\t\t\t$array.each(children, (childDataItem) => {\n\t\t\t\tconst childData = {};\n\t\t\t\tchildrenDataArray.push(childData);\n\t\t\t\tthis._makeHierarchyData(childData, childDataItem);\n\t\t\t})\n\n\t\t\tconst value = dataItem.get(\"valueWorking\");\n\t\t\tif ($type.isNumber(value)) {\n\t\t\t\tdata.value = value;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tconst value = dataItem.get(\"valueWorking\");\n\t\t\tif ($type.isNumber(value)) {\n\t\t\t\tdata.value = value;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic disposeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tsuper.disposeDataItem(dataItem);\n\t\tconst node = dataItem.get(\"node\");\n\t\tif (node) {\n\t\t\tthis.nodes.removeValue(node);\n\t\t\tnode.dispose();\n\t\t}\n\t\tconst label = dataItem.get(\"label\");\n\t\tif (label) {\n\t\t\tthis.labels.removeValue(label);\n\t\t\tlabel.dispose();\n\t\t}\n\n\t\tconst children = dataItem.get(\"children\");\n\t\tif (children) {\n\t\t\t$array.each(children, (child) => {\n\t\t\t\tthis.disposeDataItem(child);\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Hides hierarchy'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<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.hideDataItem(dataItem, duration)];\n\n\t\tconst hiddenState = this.states.create(\"hidden\", {})\n\n\t\tif (!$type.isNumber(duration)) {\n\t\t\tconst stateAnimationDuration = \"stateAnimationDuration\"\n\t\t\tduration = hiddenState.get(stateAnimationDuration, this.get(stateAnimationDuration, 0));\n\t\t}\n\n\t\tconst stateAnimationEasing = \"stateAnimationEasing\";\n\t\tconst easing = hiddenState.get(stateAnimationEasing, this.get(stateAnimationEasing));\n\n\t\tconst children = dataItem.get(\"children\");\n\n\t\tif ((!children || children.length == 0) && $type.isNumber(dataItem.get(\"value\"))) {\n\t\t\tpromises.push(dataItem.animate({ key: \"valueWorking\" as any, to: 0, duration: duration, easing: easing }).waitForStop());\n\t\t}\n\n\t\tconst node = dataItem.get(\"node\");\n\t\tnode.hide();\n\t\tnode.hideTooltip();\n\n\t\tif (children) {\n\t\t\t$array.each(children, (childDataItem) => {\n\t\t\t\tpromises.push(this.hideDataItem(childDataItem));\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Shows hierarchy'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<this[\"_dataItemSettings\"]>, duration?: number): Promise<void> {\n\t\tconst promises = [super.showDataItem(dataItem, duration)];\n\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\tconst children = dataItem.get(\"children\");\n\n\t\tif ((!children || children.length == 0) && $type.isNumber(dataItem.get(\"value\"))) {\n\t\t\tpromises.push(dataItem.animate({ key: \"valueWorking\" as any, to: dataItem.get(\"value\"), duration: duration, easing: easing }).waitForStop());\n\t\t}\n\n\t\tconst node = dataItem.get(\"node\");\n\t\tnode.show();\n\n\t\tif (children) {\n\t\t\t$array.each(children, (childDataItem) => {\n\t\t\t\tpromises.push(this.showDataItem(childDataItem));\n\t\t\t})\n\t\t}\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/**\n\t * Enables a disabled data item.\n\t *\n\t * @param dataItem Target data item\n\t * @param duration Animation duration in milliseconds\n\t */\n\tpublic enableDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, maxDepth?: number, depth?: number, duration?: number) {\n\t\tif (depth == null) {\n\t\t\tdepth = 0;\n\t\t}\n\n\t\tif (maxDepth == null) {\n\t\t\tmaxDepth = 1;\n\t\t}\n\n\t\tdataItem.set(\"disabled\", false);\n\t\tdataItem.get(\"node\").set(\"disabled\", false);\n\n\t\tif (!dataItem.isHidden()) {\n\t\t\tdataItem.get(\"node\").show(duration);\n\t\t}\n\n\n\n\t\tconst topDepth = this.get(\"topDepth\", 0);\n\t\tif (dataItem.get(\"depth\") < topDepth) {\n\t\t\tdataItem.get(\"node\").hide(0);\n\t\t}\n\n\t\tif (depth == 0) {\n\t\t\tconst upDepth = this.get(\"upDepth\", Infinity);\n\t\t\tlet parent = dataItem;\n\t\t\tlet count = 0;\n\n\t\t\twhile (parent !== undefined) {\n\t\t\t\tif (count > upDepth) {\n\t\t\t\t\tparent.get(\"node\").hide();\n\t\t\t\t}\n\t\t\t\tparent = parent.get(\"parent\");\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tlet children = dataItem.get(\"children\");\n\t\tif (children) {\n\t\t\tif (depth < maxDepth - 1) {\n\t\t\t\t$array.each(children, (child) => {\n\t\t\t\t\tconst disabledField = this.get(\"disabledField\");\n\t\t\t\t\tif (disabledField) {\n\t\t\t\t\t\tconst dataContext = child.dataContext as any;\n\t\t\t\t\t\tif (dataContext[disabledField] != true) {\n\t\t\t\t\t\t\tthis.enableDataItem(child, maxDepth, depth as number + 1, duration);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.disableDataItem(child);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.enableDataItem(child, maxDepth, depth as number + 1, duration);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$array.each(children, (child) => {\n\t\t\t\t\tif (!child.isHidden()) {\n\t\t\t\t\t\tchild.get(\"node\").show(duration);\n\t\t\t\t\t\tchild.get(\"node\").states.applyAnimate(\"disabled\");\n\t\t\t\t\t\tchild.set(\"disabled\", true);\n\n\t\t\t\t\t\tthis.disableDataItem(child);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Disables a data item.\n\t *\n\t * @param dataItem Target data item\n\t * @param duration Animation duration in milliseconds\n\t */\n\tpublic disableDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>, duration?: number) {\n\t\tdataItem.set(\"disabled\", true);\n\t\tlet children = dataItem.get(\"children\");\n\t\tif (children) {\n\t\t\t$array.each(children, (child) => {\n\t\t\t\tthis.disableDataItem(child, duration);\n\t\t\t\tchild.get(\"node\").hide(duration);\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _selectDataItem(dataItem?: DataItem<this[\"_dataItemSettings\"]>, downDepth?: number, skipDisptach?: boolean) {\n\t\tif (dataItem) {\n\t\t\tif (!skipDisptach) {\n\t\t\t\tconst type = \"dataitemselected\";\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this, dataItem: dataItem });\n\t\t\t}\n\n\t\t\tlet maxDepth = this.getPrivate(\"maxDepth\", 1);\n\t\t\tconst topDepth = this.get(\"topDepth\", 0);\n\n\t\t\tif (downDepth == null) {\n\t\t\t\tdownDepth = Math.min(this.get(\"downDepth\", 1), maxDepth - dataItem.get(\"depth\"));\n\t\t\t}\n\n\t\t\tconst hierarchyNode = dataItem.get(\"d3HierarchyNode\");\n\t\t\tlet currentDepth = hierarchyNode.depth;\n\t\t\tif (!this.inited) {\n\t\t\t\tdownDepth = Math.min(this.get(\"initialDepth\", 1), maxDepth - topDepth);\n\t\t\t\tdownDepth = Math.max(0, downDepth);\n\t\t\t}\n\n\t\t\tthis._currentDownDepth = downDepth;\n\n\t\t\tif (currentDepth + downDepth > maxDepth) {\n\t\t\t\tdownDepth = maxDepth - currentDepth;\n\t\t\t}\n\n\t\t\tif (currentDepth < topDepth) {\n\t\t\t\tdownDepth += topDepth - currentDepth;\n\t\t\t\tcurrentDepth = topDepth;\n\t\t\t}\n\n\t\t\tconst children = dataItem.get(\"children\");\n\n\t\t\tif (children && children.length > 0) {\n\t\t\t\tif (downDepth > 0) {\n\t\t\t\t\tthis.enableDataItem(dataItem, downDepth);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdataItem.get(\"node\").show();\n\t\t\t\t\t$array.each(children, (child) => {\n\t\t\t\t\t\tchild.get(\"node\").hide();\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tif (hierarchyNode.depth < topDepth) {\n\t\t\t\t\tdataItem.get(\"node\").hide(0);\n\t\t\t\t}\n\n\t\t\t\tif (this.get(\"singleBranchOnly\")) {\n\t\t\t\t\tthis._handleSingle(dataItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.enableDataItem(dataItem, downDepth);\n\t\t\t}\n\n\t\t\tthis._root.events.once(\"frameended\", () => {\n\t\t\t\tthis._zoom(dataItem);\n\t\t\t})\n\t\t}\n\t}\n\n\tprotected _zoom(_dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t}\n\n\tprotected _handleSingle(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tconst parent = dataItem.get(\"parent\");\n\t\tif (parent) {\n\t\t\tconst children = parent.get(\"children\");\n\t\t\tif (children) {\n\t\t\t\t$array.each(children, (child) => {\n\t\t\t\t\tif (child != dataItem) {\n\t\t\t\t\t\tthis.disableDataItem(child);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Selects specific data item.\n\t *\n\t * @param dataItem Target data item\n\t */\n\tpublic selectDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tconst parent = dataItem.get(\"parent\");\n\t\tconst maxDepth = this.getPrivate(\"maxDepth\", 1);\n\n\t\tif (this.get(\"selectedDataItem\") == dataItem) {\n\t\t\tif (parent) {\n\t\t\t\tthis.set(\"selectedDataItem\", parent);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet depth = Math.min(this.get(\"downDepth\", 1), maxDepth - dataItem.get(\"depth\"));\n\n\t\t\t\tif (this._currentDownDepth == depth) {\n\t\t\t\t\tdepth = Math.min(this.get(\"initialDepth\", 1), maxDepth - this.get(\"topDepth\", 0));\n\t\t\t\t}\n\n\t\t\t\tthis._selectDataItem(dataItem, depth);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.set(\"selectedDataItem\", dataItem);\n\t\t}\n\t}\n\n\n\tprotected _makeBullet(dataItem: DataItem<this[\"_dataItemSettings\"]>, bulletFunction: (root: Root, series: Series, dataItem: DataItem<this[\"_dataItemSettings\"]>) => Bullet | undefined, index?: number) {\n\t\tconst bullet = super._makeBullet(dataItem, bulletFunction, index);\n\t\tif (bullet) {\n\t\t\tconst sprite = bullet.get(\"sprite\");\n\t\t\tconst node = dataItem.get(\"node\");\n\n\t\t\tif (sprite) {\n\t\t\t\tnode.children.push(sprite);\n\t\t\t\tnode.on(\"width\", () => {\n\t\t\t\t\tthis._positionBullet(bullet);\n\t\t\t\t})\n\t\t\t\tnode.on(\"height\", () => {\n\t\t\t\t\tthis._positionBullet(bullet);\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\treturn bullet;\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<this[\"_dataItemSettings\"]>;\n\n\t\t\tconst locationX = bullet.get(\"locationX\", 0.5);\n\t\t\tconst locationY = bullet.get(\"locationY\", 0.5);\n\n\t\t\tconst node = dataItem.get(\"node\");\n\n\t\t\tsprite.set(\"x\", node.width() * locationX);\n\t\t\tsprite.set(\"y\", node.height() * locationY);\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<this[\"_dataItemSettings\"]>) {\n\t\tconst node = dataItem.get(\"node\");\n\t\tif (node && !node.isHidden()) {\n\t\t\tnode.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<this[\"_dataItemSettings\"]>) {\n\t\tconst node = dataItem.get(\"node\");\n\t\tif (node) {\n\t\t\tnode.unhover();\n\t\t}\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MapSeries.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/charts/map/MapSeries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKnH,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IAE1D;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;IAE1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAExB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAE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ries extends Series {
82
82
  this._excludeDataItem(dataItem);
83
83
  }
84
84
  });
85
+ $array.each(this._excluded, (dataItem) => {
86
+ const id = dataItem.get("id");
87
+ if (id) {
88
+ if (exclude.indexOf(id) == -1) {
89
+ this._unexcludeDataItem(dataItem);
90
+ }
91
+ }
92
+ });
85
93
  }
86
94
  if (!exclude || exclude.length == 0) {
87
95
  $array.each(this._excluded, (dataItem) => {
@@ -1 +1 @@
1
- {"version":3,"file":"MapSeries.js","sourceRoot":"","sources":["../../../../../src/.internal/charts/map/MapSeries.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAmE,MAAM,0BAA0B,CAAC;AAEnH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AA2FlD;;GAEG;AACH,MAAM,OAAgB,SAAU,SAAQ,MAAM;IAA9C;;QAUC;;;;mBAAwD,EAAE;WAAC;QAE3D;;;;mBAA8C,EAAE;WAAC;QACjD;;;;mBAAoC,KAAK;WAAC;QAE1C;;;;mBAA2D,EAAE;WAAC;QAC9D;;;;mBAA8D,EAAE;WAAC;IAiSlE,CAAC;IA/RU,SAAS;QAClB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7C,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;QACjD,IAAI,CAAC,cAAc,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;QACzD,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAErC,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;YAC9B,IAAI,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;YAC1C,IAAI,QAAQ,IAAI,QAAQ,IAAI,OAAO,EAAE;gBACpC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;aAClB;Q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;QACjB,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEjB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,KAAK,EAAE;YACV,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC/B;IACF,CAAC;IAES,YAAY;QACrB,KAAK,CAAC,YAAY,EAAE,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;;AA/SD;;;;WAAkC,WAAW;GAAC;AAC9C;;;;WAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import type { MapChart } from \"./MapChart\";\nimport type { GeoProjection, GeoPath } from \"d3-geo\";\nimport type { DataItem } from \"../../core/render/Component\";\n\nimport { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate, ISeriesEvents } from \"../../core/render/Series\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $object from \"../../core/util/Object\";\n\nexport interface IMapSeriesDataItem extends ISeriesDataItem {\n\tgeometry?: GeoJSON.Geometry;\n\tgeometryType?: GeoJSON.GeoJsonGeometryTypes;\n\tvalue?: number;\n}\n\nexport interface IMapSeriesSettings extends ISeriesSettings {\n\n\t/**\n\t * All map series will determine the actual bounds shown in the [[MapChart]].\n\t *\n\t * If we need a series to be ignored while calculating the bounds, we can set\n\t * this to `false`.\n\t *\n\t * Especially useful for background series.\n\t *\n\t * @default true\n\t * @since 5.2.36\n\t */\n\taffectsBounds?: boolean;\n\n\t/**\n\t * Map data in GeoJSON format.\n\t */\n\tgeoJSON?: GeoJSON.GeoJSON;\n\n\t/**\n\t * An array of map object ids from geodata to include in the map.\n\t *\n\t * If set, only those objects listed in `include` will be shown.\n\t */\n\tinclude?: Array<string>;\n\n\t/**\n\t * An array of map object ids from geodata to omit when showing the map.\n\t */\n\texclude?: Array<string>;\n\n\t/**\n\t * A field in series `data` that will hold map object's numeric value.\n\t *\n\t * It can be used in a number of places, e.g. tooltips, heat rules, etc.\n\t */\n\tvalueField?: string;\n\n\t/**\n\t * @ignore\n\t */\n\tgeometryField?: string;\n\n\t/**\n\t * @ignore\n\t */\n\tgeometryTypeField?: string;\n\n\t/**\n\t * Names of geodata items, such as countries, to replace by from loaded\n\t * geodata.\n\t *\n\t * Can be used to override built-in English names for countries.\n\t *\n\t * ```TypeScript\n\t * import am5geodata_lang_ES from '@amcharts5-geodata/lang/es';\n\t * // ...\n\t * map.geodataNames = am5geodata_lang_ES;\n\t * ```\n\t * ```JavaScript\n\t * map.geodataNames = am5geodata_lang_ES;\n\t * ```\n\t *\n\t * @since 5.1.13\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-translations/} for more info\n\t */\n\tgeodataNames?: { [index: string]: string };\n\n}\n\nexport interface IMapSeriesPrivate extends ISeriesPrivate {\n}\n\nexport interface IMapSeriesEvents extends ISeriesEvents {\n\n\t/**\n\t * Invoked when geodata is finished loading and processed.\n\t */\n\tgeodataprocessed: {};\n\n}\n\n/**\n * Base class for map series.\n */\nexport abstract class MapSeries extends Series {\n\tpublic static className: string = \"MapSeries\";\n\tpublic static classNames: Array<string> = Series.classNames.concat([MapSeries.className]);\n\n\tdeclare public chart: MapChart | undefined;\n\tdeclare public _settings: IMapSeriesSettings;\n\tdeclare public _privateSettings: IMapSeriesPrivate;\n\tdeclare public _dataItemSettings: IMapSeriesDataItem;\n\tdeclare public _events: IMapSeriesEvents;\n\n\tprotected _types: Array<GeoJSON.GeoJsonGeometryTypes> = [];\n\n\tpublic _geometries: Array<GeoJSON.Geometry> = [];\n\tprotected _geoJSONparsed: boolean = false;\n\n\tprotected _excluded: Array<DataItem<IMapSeriesDataItem>> = [];\n\tprotected _notIncluded: Array<DataItem<IMapSeriesDataItem>> = [];\n\n\tprotected _afterNew() {\n\t\tthis.fields.push(\"geometry\", \"geometryType\");\n\t\tthis._setRawDefault(\"geometryField\", \"geometry\");\n\t\tthis._setRawDefault(\"geometryTypeField\", \"geometryType\");\n\t\tthis._setRawDefault(\"idField\", \"id\");\n\n\t\tthis.on(\"geoJSON\", (geoJSON) => {\n\t\t\tlet previous = this._prevSettings.geoJSON;\n\t\t\tif (previous && previous != geoJSON) {\n\t\t\t\tthis.data.clear();\n\t\t\t}\n\t\t})\n\n\t\tsuper._afterNew();\n\t}\n\n\tprotected _handleDirties() {\n\t\tconst geoJSON = this.get(\"geoJSON\");\n\t\tlet previous = this._prevSettings.geoJSON;\n\n\t\tif (previous && previous != geoJSON) {\n\t\t\tthis._prevSettings.geoJSON = undefined;\n\t\t\tthis._geoJSONparsed = false;\n\t\t}\n\n\t\tif (!this._geoJSONparsed) {\n\t\t\tthis._parseGeoJSON();\n\t\t\tthis._geoJSONparsed = true;\n\t\t}\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this._valuesDirty) {\n\t\t\tthis._handleDirties();\n\t\t}\n\n\t\tif (this.get(\"geoJSON\") && (this.isDirty(\"geoJSON\") || this.isDirty(\"include\") || this.isDirty(\"exclude\"))) {\n\n\t\t\tthis._handleDirties();\n\n\t\t\tconst chart = this.chart;\n\n\t\t\tconst exclude = this.get(\"exclude\");\n\n\t\t\tif (exclude) {\n\t\t\t\tif (chart) {\n\t\t\t\t\tchart._centerLocation = null;\n\t\t\t\t}\n\t\t\t\t$array.each(exclude, (id) => {\n\t\t\t\t\tconst dataItem = this.getDataItemById(id);\n\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\tthis._excludeDataItem(dataItem)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (!exclude || exclude.length == 0) {\n\t\t\t\t$array.each(this._excluded, (dataItem) => {\n\t\t\t\t\tthis._unexcludeDataItem(dataItem)\n\t\t\t\t})\n\t\t\t\tthis._excluded = [];\n\t\t\t}\n\n\t\t\tconst include = this.get(\"include\");\n\t\t\tif (include) {\n\t\t\t\tif (chart) {\n\t\t\t\t\tchart._centerLocation = null;\n\t\t\t\t}\n\t\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\t\tconst id = dataItem.get(\"id\");\n\t\t\t\t\tif (id && include.indexOf(id) == -1) {\n\t\t\t\t\t\tthis._notIncludeDataItem(dataItem);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._unNotIncludeDataItem(dataItem);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (!include) {\n\t\t\t\t$array.each(this._notIncluded, (dataItem) => {\n\t\t\t\t\tthis._unNotIncludeDataItem(dataItem);\n\t\t\t\t})\n\t\t\t\tthis._notIncluded = [];\n\t\t\t}\n\n\t\t}\n\t}\n\n\tprotected _excludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._removeGeometry(dataItem.get(\"geometry\"));\n\t\t$array.move(this._excluded, dataItem);\n\t}\n\n\tprotected _unexcludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._addGeometry(dataItem.get(\"geometry\"), this);\n\t}\n\n\tprotected _notIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._removeGeometry(dataItem.get(\"geometry\"));\n\t\t$array.move(this._notIncluded, dataItem);\n\t}\n\n\tprotected _unNotIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._addGeometry(dataItem.get(\"geometry\"), this);\n\t}\n\n\tprotected checkInclude(id: string, includes: string[] | undefined, excludes?: string[] | undefined): boolean {\n\t\tif (includes) {\n\t\t\tif (includes.length == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (includes.indexOf(id) == -1) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (excludes && excludes.length > 0) {\n\t\t\tif (excludes.indexOf(id) != -1) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprotected _parseGeoJSON() {\n\n\t\tconst geoJSON = this.get(\"geoJSON\");\n\t\tif (geoJSON) {\n\n\t\t\tlet features!: any[];\n\n\t\t\tif (geoJSON.type == \"FeatureCollection\") {\n\t\t\t\tfeatures = geoJSON.features;\n\t\t\t}\n\t\t\telse if (geoJSON.type == \"Feature\") {\n\t\t\t\tfeatures = [geoJSON];\n\t\t\t}\n\t\t\telse if ([\"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\"].indexOf(geoJSON.type) != -1) {\n\t\t\t\tfeatures = [{ geometry: geoJSON }];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconsole.log(\"nothing found in geoJSON\");\n\t\t\t}\n\n\t\t\tconst geodataNames = this.get(\"geodataNames\");\n\t\t\tif (features) {\n\n\t\t\t\tconst idField = this.get(\"idField\", \"id\");\n\n\t\t\t\tfor (let i = 0, len = features.length; i < len; i++) {\n\t\t\t\t\tlet feature: any = features[i];\n\t\t\t\t\tlet geometry: any = feature.geometry;\n\n\t\t\t\t\tif (geometry) {\n\t\t\t\t\t\tlet type = geometry.type;\n\t\t\t\t\t\tlet id: string = feature[idField];\n\n\t\t\t\t\t\tif (geodataNames && geodataNames[id]) {\n\t\t\t\t\t\t\tfeature.properties.name = geodataNames[id];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (this._types.indexOf(type) != -1) {\n\t\t\t\t\t\t\t//if (!this.checkInclude(id, this.get(\"include\"), this.get(\"exclude\"))) {\n\t\t\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\t\t//}\n\n\t\t\t\t\t\t\tlet dataItem: any;\n\n\t\t\t\t\t\t\tif (id != null) {\n\t\t\t\t\t\t\t\t// find data object in user-provided data\n\t\t\t\t\t\t\t\tdataItem = $array.find(this.dataItems, (value: any) => {\n\t\t\t\t\t\t\t\t\treturn value.get(\"id\") == id;\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlet dataObject: any;\n\n\t\t\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\t\t\tdataObject = dataItem.dataContext;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// create one if not found\n\t\t\t\t\t\t\tif (!dataItem) {\n\t\t\t\t\t\t\t\tdataObject = { geometry: geometry, geometryType: type, madeFromGeoData: true };\n\t\t\t\t\t\t\t\tdataObject[idField] = id;\n\t\t\t\t\t\t\t\tthis.data.push(dataObject);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// in case found\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// if user-provided object doesn't have points data provided in any way:\n\t\t\t\t\t\t\t\tif (!dataObject.geometry) {\n\t\t\t\t\t\t\t\t\tdataObject.geometry = geometry;\n\t\t\t\t\t\t\t\t\tdataObject.geometryType = type;\n\t\t\t\t\t\t\t\t\tdataItem.set(\"geometry\", geometry);\n\t\t\t\t\t\t\t\t\tdataItem.set(\"geometryType\", type);\n\t\t\t\t\t\t\t\t\tthis.processDataItem(dataItem);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy properties data to datacontext\n\t\t\t\t\t\t\t$object.softCopyProperties(feature.properties, dataObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst type = \"geodataprocessed\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract markDirtyProjection(): void\n\n\tpublic _placeBulletsContainer(_chart: MapChart) {\n\t\tthis.children.moveValue(this.bulletsContainer);\n\t}\n\n\tpublic _removeBulletsContainer() {\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic projection(): GeoProjection | undefined {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\treturn chart.get(\"projection\");\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic geoPath(): GeoPath | undefined {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\treturn chart.getPrivate(\"geoPath\");\n\t\t}\n\t}\n\n\tprotected _addGeometry(geometry: any, series: MapSeries) {\n\t\tif (geometry && series.get(\"affectsBounds\", true)) {\n\t\t\tthis._geometries.push(geometry);\n\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tchart.markDirtyGeometries();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _removeGeometry(geometry: any) {\n\t\tif (geometry) {\n\t\t\t$array.remove(this._geometries, geometry);\n\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tchart.markDirtyGeometries();\n\t\t\t}\n\t\t}\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\tprotected _onDataClear() {\n\t\tsuper._onDataClear();\n\t\tthis._geoJSONparsed = false;\n\t\tthis._markDirtyKey(\"exclude\");\n\t}\t\n}\n"]}
1
+ {"version":3,"file":"MapSeries.js","sourceRoot":"","sources":["../../../../../src/.internal/charts/map/MapSeries.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAmE,MAAM,0BAA0B,CAAC;AAEnH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AA2FlD;;GAEG;AACH,MAAM,OAAgB,SAAU,SAAQ,MAAM;IAA9C;;QAUC;;;;mBAAwD,EAAE;WAAC;QAE3D;;;;mBAA8C,EAAE;WAAC;QACjD;;;;mBAAoC,KAAK;WAAC;QAE1C;;;;mBAA2D,EAAE;WAAC;QAC9D;;;;mBAA8D,EAAE;WAAC;IA2SlE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;;;;WAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import type { MapChart } from \"./MapChart\";\nimport type { GeoProjection, GeoPath } from \"d3-geo\";\nimport type { DataItem } from \"../../core/render/Component\";\n\nimport { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate, ISeriesEvents } from \"../../core/render/Series\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $object from \"../../core/util/Object\";\n\nexport interface IMapSeriesDataItem extends ISeriesDataItem {\n\tgeometry?: GeoJSON.Geometry;\n\tgeometryType?: GeoJSON.GeoJsonGeometryTypes;\n\tvalue?: number;\n}\n\nexport interface IMapSeriesSettings extends ISeriesSettings {\n\n\t/**\n\t * All map series will determine the actual bounds shown in the [[MapChart]].\n\t *\n\t * If we need a series to be ignored while calculating the bounds, we can set\n\t * this to `false`.\n\t *\n\t * Especially useful for background series.\n\t *\n\t * @default true\n\t * @since 5.2.36\n\t */\n\taffectsBounds?: boolean;\n\n\t/**\n\t * Map data in GeoJSON format.\n\t */\n\tgeoJSON?: GeoJSON.GeoJSON;\n\n\t/**\n\t * An array of map object ids from geodata to include in the map.\n\t *\n\t * If set, only those objects listed in `include` will be shown.\n\t */\n\tinclude?: Array<string>;\n\n\t/**\n\t * An array of map object ids from geodata to omit when showing the map.\n\t */\n\texclude?: Array<string>;\n\n\t/**\n\t * A field in series `data` that will hold map object's numeric value.\n\t *\n\t * It can be used in a number of places, e.g. tooltips, heat rules, etc.\n\t */\n\tvalueField?: string;\n\n\t/**\n\t * @ignore\n\t */\n\tgeometryField?: string;\n\n\t/**\n\t * @ignore\n\t */\n\tgeometryTypeField?: string;\n\n\t/**\n\t * Names of geodata items, such as countries, to replace by from loaded\n\t * geodata.\n\t *\n\t * Can be used to override built-in English names for countries.\n\t *\n\t * ```TypeScript\n\t * import am5geodata_lang_ES from '@amcharts5-geodata/lang/es';\n\t * // ...\n\t * map.geodataNames = am5geodata_lang_ES;\n\t * ```\n\t * ```JavaScript\n\t * map.geodataNames = am5geodata_lang_ES;\n\t * ```\n\t *\n\t * @since 5.1.13\n\t * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-translations/} for more info\n\t */\n\tgeodataNames?: { [index: string]: string };\n\n}\n\nexport interface IMapSeriesPrivate extends ISeriesPrivate {\n}\n\nexport interface IMapSeriesEvents extends ISeriesEvents {\n\n\t/**\n\t * Invoked when geodata is finished loading and processed.\n\t */\n\tgeodataprocessed: {};\n\n}\n\n/**\n * Base class for map series.\n */\nexport abstract class MapSeries extends Series {\n\tpublic static className: string = \"MapSeries\";\n\tpublic static classNames: Array<string> = Series.classNames.concat([MapSeries.className]);\n\n\tdeclare public chart: MapChart | undefined;\n\tdeclare public _settings: IMapSeriesSettings;\n\tdeclare public _privateSettings: IMapSeriesPrivate;\n\tdeclare public _dataItemSettings: IMapSeriesDataItem;\n\tdeclare public _events: IMapSeriesEvents;\n\n\tprotected _types: Array<GeoJSON.GeoJsonGeometryTypes> = [];\n\n\tpublic _geometries: Array<GeoJSON.Geometry> = [];\n\tprotected _geoJSONparsed: boolean = false;\n\n\tprotected _excluded: Array<DataItem<IMapSeriesDataItem>> = [];\n\tprotected _notIncluded: Array<DataItem<IMapSeriesDataItem>> = [];\n\n\tprotected _afterNew() {\n\t\tthis.fields.push(\"geometry\", \"geometryType\");\n\t\tthis._setRawDefault(\"geometryField\", \"geometry\");\n\t\tthis._setRawDefault(\"geometryTypeField\", \"geometryType\");\n\t\tthis._setRawDefault(\"idField\", \"id\");\n\n\t\tthis.on(\"geoJSON\", (geoJSON) => {\n\t\t\tlet previous = this._prevSettings.geoJSON;\n\t\t\tif (previous && previous != geoJSON) {\n\t\t\t\tthis.data.clear();\n\t\t\t}\n\t\t})\n\n\t\tsuper._afterNew();\n\t}\n\n\tprotected _handleDirties() {\n\t\tconst geoJSON = this.get(\"geoJSON\");\n\t\tlet previous = this._prevSettings.geoJSON;\n\n\t\tif (previous && previous != geoJSON) {\n\t\t\tthis._prevSettings.geoJSON = undefined;\n\t\t\tthis._geoJSONparsed = false;\n\t\t}\n\n\t\tif (!this._geoJSONparsed) {\n\t\t\tthis._parseGeoJSON();\n\t\t\tthis._geoJSONparsed = true;\n\t\t}\n\t}\n\n\tpublic _prepareChildren() {\n\t\tsuper._prepareChildren();\n\n\t\tif (this._valuesDirty) {\n\t\t\tthis._handleDirties();\n\t\t}\n\n\t\tif (this.get(\"geoJSON\") && (this.isDirty(\"geoJSON\") || this.isDirty(\"include\") || this.isDirty(\"exclude\"))) {\n\n\t\t\tthis._handleDirties();\n\n\t\t\tconst chart = this.chart;\n\n\t\t\tconst exclude = this.get(\"exclude\");\n\n\t\t\tif (exclude) {\n\t\t\t\tif (chart) {\n\t\t\t\t\tchart._centerLocation = null;\n\t\t\t\t}\n\t\t\t\t$array.each(exclude, (id) => {\n\t\t\t\t\tconst dataItem = this.getDataItemById(id);\n\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\tthis._excludeDataItem(dataItem)\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\t$array.each(this._excluded, (dataItem) => {\n\t\t\t\t\tconst id = dataItem.get(\"id\");\n\t\t\t\t\tif (id) {\n\t\t\t\t\t\tif (exclude.indexOf(id) == -1) {\n\t\t\t\t\t\t\tthis._unexcludeDataItem(dataItem)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\n\t\t\tif (!exclude || exclude.length == 0) {\n\t\t\t\t$array.each(this._excluded, (dataItem) => {\n\t\t\t\t\tthis._unexcludeDataItem(dataItem)\n\t\t\t\t})\n\t\t\t\tthis._excluded = [];\n\t\t\t}\n\n\t\t\tconst include = this.get(\"include\");\n\t\t\tif (include) {\n\t\t\t\tif (chart) {\n\t\t\t\t\tchart._centerLocation = null;\n\t\t\t\t}\n\t\t\t\t$array.each(this.dataItems, (dataItem) => {\n\t\t\t\t\tconst id = dataItem.get(\"id\");\n\t\t\t\t\tif (id && include.indexOf(id) == -1) {\n\t\t\t\t\t\tthis._notIncludeDataItem(dataItem);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis._unNotIncludeDataItem(dataItem);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (!include) {\n\t\t\t\t$array.each(this._notIncluded, (dataItem) => {\n\t\t\t\t\tthis._unNotIncludeDataItem(dataItem);\n\t\t\t\t})\n\t\t\t\tthis._notIncluded = [];\n\t\t\t}\n\n\t\t}\n\t}\n\n\tprotected _excludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._removeGeometry(dataItem.get(\"geometry\"));\n\t\t$array.move(this._excluded, dataItem);\n\t}\n\n\tprotected _unexcludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._addGeometry(dataItem.get(\"geometry\"), this);\n\t}\n\n\tprotected _notIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._removeGeometry(dataItem.get(\"geometry\"));\n\t\t$array.move(this._notIncluded, dataItem);\n\t}\n\n\tprotected _unNotIncludeDataItem(dataItem: DataItem<this[\"_dataItemSettings\"]>) {\n\t\tthis._addGeometry(dataItem.get(\"geometry\"), this);\n\t}\n\n\tprotected checkInclude(id: string, includes: string[] | undefined, excludes?: string[] | undefined): boolean {\n\t\tif (includes) {\n\t\t\tif (includes.length == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (includes.indexOf(id) == -1) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (excludes && excludes.length > 0) {\n\t\t\tif (excludes.indexOf(id) != -1) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprotected _parseGeoJSON() {\n\n\t\tconst geoJSON = this.get(\"geoJSON\");\n\t\tif (geoJSON) {\n\n\t\t\tlet features!: any[];\n\n\t\t\tif (geoJSON.type == \"FeatureCollection\") {\n\t\t\t\tfeatures = geoJSON.features;\n\t\t\t}\n\t\t\telse if (geoJSON.type == \"Feature\") {\n\t\t\t\tfeatures = [geoJSON];\n\t\t\t}\n\t\t\telse if ([\"Point\", \"LineString\", \"Polygon\", \"MultiPoint\", \"MultiLineString\", \"MultiPolygon\"].indexOf(geoJSON.type) != -1) {\n\t\t\t\tfeatures = [{ geometry: geoJSON }];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconsole.log(\"nothing found in geoJSON\");\n\t\t\t}\n\n\t\t\tconst geodataNames = this.get(\"geodataNames\");\n\t\t\tif (features) {\n\n\t\t\t\tconst idField = this.get(\"idField\", \"id\");\n\n\t\t\t\tfor (let i = 0, len = features.length; i < len; i++) {\n\t\t\t\t\tlet feature: any = features[i];\n\t\t\t\t\tlet geometry: any = feature.geometry;\n\n\t\t\t\t\tif (geometry) {\n\t\t\t\t\t\tlet type = geometry.type;\n\t\t\t\t\t\tlet id: string = feature[idField];\n\n\t\t\t\t\t\tif (geodataNames && geodataNames[id]) {\n\t\t\t\t\t\t\tfeature.properties.name = geodataNames[id];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (this._types.indexOf(type) != -1) {\n\t\t\t\t\t\t\t//if (!this.checkInclude(id, this.get(\"include\"), this.get(\"exclude\"))) {\n\t\t\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\t\t//}\n\n\t\t\t\t\t\t\tlet dataItem: any;\n\n\t\t\t\t\t\t\tif (id != null) {\n\t\t\t\t\t\t\t\t// find data object in user-provided data\n\t\t\t\t\t\t\t\tdataItem = $array.find(this.dataItems, (value: any) => {\n\t\t\t\t\t\t\t\t\treturn value.get(\"id\") == id;\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlet dataObject: any;\n\n\t\t\t\t\t\t\tif (dataItem) {\n\t\t\t\t\t\t\t\tdataObject = dataItem.dataContext;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// create one if not found\n\t\t\t\t\t\t\tif (!dataItem) {\n\t\t\t\t\t\t\t\tdataObject = { geometry: geometry, geometryType: type, madeFromGeoData: true };\n\t\t\t\t\t\t\t\tdataObject[idField] = id;\n\t\t\t\t\t\t\t\tthis.data.push(dataObject);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// in case found\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// if user-provided object doesn't have points data provided in any way:\n\t\t\t\t\t\t\t\tif (!dataObject.geometry) {\n\t\t\t\t\t\t\t\t\tdataObject.geometry = geometry;\n\t\t\t\t\t\t\t\t\tdataObject.geometryType = type;\n\t\t\t\t\t\t\t\t\tdataItem.set(\"geometry\", geometry);\n\t\t\t\t\t\t\t\t\tdataItem.set(\"geometryType\", type);\n\t\t\t\t\t\t\t\t\tthis.processDataItem(dataItem);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy properties data to datacontext\n\t\t\t\t\t\t\t$object.softCopyProperties(feature.properties, dataObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst type = \"geodataprocessed\";\n\t\t\tif (this.events.isEnabled(type)) {\n\t\t\t\tthis.events.dispatch(type, { type: type, target: this });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic abstract markDirtyProjection(): void\n\n\tpublic _placeBulletsContainer(_chart: MapChart) {\n\t\tthis.children.moveValue(this.bulletsContainer);\n\t}\n\n\tpublic _removeBulletsContainer() {\n\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic projection(): GeoProjection | undefined {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\treturn chart.get(\"projection\");\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic geoPath(): GeoPath | undefined {\n\t\tconst chart = this.chart;\n\t\tif (chart) {\n\t\t\treturn chart.getPrivate(\"geoPath\");\n\t\t}\n\t}\n\n\tprotected _addGeometry(geometry: any, series: MapSeries) {\n\t\tif (geometry && series.get(\"affectsBounds\", true)) {\n\t\t\tthis._geometries.push(geometry);\n\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tchart.markDirtyGeometries();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _removeGeometry(geometry: any) {\n\t\tif (geometry) {\n\t\t\t$array.remove(this._geometries, geometry);\n\n\t\t\tconst chart = this.chart;\n\t\t\tif (chart) {\n\t\t\t\tchart.markDirtyGeometries();\n\t\t\t}\n\t\t}\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\tprotected _onDataClear() {\n\t\tsuper._onDataClear();\n\t\tthis._geoJSONparsed = false;\n\t\tthis._markDirtyKey(\"exclude\");\n\t}\n}\n"]}
@@ -36,6 +36,14 @@ export interface IDateRangeSelectorSettings extends IStockControlSettings {
36
36
  * @since 5.3.7
37
37
  */
38
38
  maxDate?: Date | "auto" | null;
39
+ /**
40
+ * Set to array of days to disable in date picker dropdowns, with Sunday
41
+ * starting at 0, Monday - 1, etc.
42
+ *
43
+ * @default []
44
+ * @since 5.11.1
45
+ */
46
+ disableWeekDays?: number[];
39
47
  }
40
48
  export interface IDateRangeSelectorPrivate extends IStockControlPrivate {
41
49
  dropdown: Dropdown;
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangeSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/.internal/charts/stock/toolbar/DateRangeSelector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAChH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC,MAAM,WAAW,0BAA2B,SAAQ,qBA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ACd,QAAQ,EAAE,IAAI,CAAC;QACf,MAAM,EAAE,IAAI,CAAC;KACb,CAAA;CACD;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IAClD,OAAc,SAAS,EAAE,MAAM,CAAuB;IACtD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAiE;IAEzF,SAAS,EAAE,0BAA0B,CAAC;IACtC,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,OAAO,EAAE,wBAAwB,CAAC;IAEjD,SAAS,CAAC,SAAS;IAyCnB,SAAS,CAAC,aAAa,IAAI,IAAI;IAkK/B,SAAS,CAAC,eAAe,IAAI,UAAU;IAIhC,aAAa;IAIpB,SAAS,CAAC,aAAa,IAAI,IAAI;IAqC/B,SAAS,CAAC,cAAc,IAAI,IAAI;IAyChC,SAAS,CAAC,YAAY,IAAI,IAAI;IAa9B,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIzC,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIxC,SAAS,CAAC,cAAc,IAAI,MAAM;IAKlC,SAAS,CAAC,QAAQ,IAAI,GAAG;IAOzB,SAAS,CAAC,gBAAgB,IAAI,GAAG;IAsEjC;;;;OAIG;IACH,SAAS,CAAC,eAAe,IAAI,IAAI;CA43BjC"}
@@ -82,11 +82,19 @@ export class DateRangeSelector extends StockControl {
82
82
  this.setPrivate("toField", toField);
83
83
  // Date pickers
84
84
  const pickerLocale = this._getPickerLocale();
85
+ // Disable weekends?
86
+ const disableWeekDays = this.get("disableWeekDays", []);
87
+ const disable = disableWeekDays.length ? [
88
+ function (date) {
89
+ return (disableWeekDays.indexOf(date.getDay()) !== -1);
90
+ }
91
+ ] : [];
85
92
  const fromPicker = flatpickr(fromField, {
86
93
  inline: true,
87
94
  appendTo: fromColumn,
88
95
  allowInput: true,
89
96
  locale: pickerLocale,
97
+ disable: disable,
90
98
  formatDate: (date) => {
91
99
  return this._formatDate(date);
92
100
  },
@@ -100,6 +108,7 @@ export class DateRangeSelector extends StockControl {
100
108
  appendTo: toColumn,
101
109
  allowInput: true,
102
110
  locale: pickerLocale,
111
+ disable: disable,
103
112
  formatDate: (date) => {
104
113
  return this._formatDate(date);
105
114
  },
@@ -270,7 +279,7 @@ export class DateRangeSelector extends StockControl {
270
279
  }
271
280
  _getPickerLocale() {
272
281
  const l = this._root.language;
273
- return {
282
+ const locale = {
274
283
  weekdays: {
275
284
  shorthand: [
276
285
  l.translate("Sun"),
@@ -321,7 +330,7 @@ export class DateRangeSelector extends StockControl {
321
330
  l.translate("December"),
322
331
  ],
323
332
  },
324
- firstDayOfWeek: l.translate("firstDayOfWeek"),
333
+ firstDayOfWeek: this._root.locale.firstDayOfWeek,
325
334
  ordinal: l.translateFunc("_dateOrd"),
326
335
  rangeSeparator: " " + l.translateAny("to") + " ",
327
336
  weekAbbreviation: l.translateAny("Wk"),
@@ -332,8 +341,9 @@ export class DateRangeSelector extends StockControl {
332
341
  monthAriaLabel: l.translateAny("Month"),
333
342
  hourAriaLabel: l.translateAny("Hour"),
334
343
  minuteAriaLabel: l.translateAny("Minute"),
335
- time_24hr: true,
344
+ time_24hr: true
336
345
  };
346
+ return locale;
337
347
  }
338
348
  /**
339
349
  * Loads the default CSS.