@amcharts/amcharts5 5.13.6 → 5.14.0

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 (675) hide show
  1. package/.internal/charts/funnel/FunnelSeries.d.ts +1 -1
  2. package/.internal/charts/funnel/FunnelSeries.d.ts.map +1 -1
  3. package/.internal/charts/funnel/FunnelSeries.js.map +1 -1
  4. package/.internal/charts/funnel/FunnelSlice.d.ts +1 -1
  5. package/.internal/charts/funnel/FunnelSlice.d.ts.map +1 -1
  6. package/.internal/charts/funnel/FunnelSlice.js.map +1 -1
  7. package/.internal/charts/funnel/PyramidSeries.d.ts.map +1 -1
  8. package/.internal/charts/funnel/PyramidSeries.js.map +1 -1
  9. package/.internal/charts/funnel/SlicedChart.d.ts +1 -1
  10. package/.internal/charts/funnel/SlicedChart.d.ts.map +1 -1
  11. package/.internal/charts/funnel/SlicedChart.js.map +1 -1
  12. package/.internal/charts/gantt/Gantt.d.ts +216 -0
  13. package/.internal/charts/gantt/Gantt.d.ts.map +1 -0
  14. package/.internal/charts/gantt/Gantt.js +772 -0
  15. package/.internal/charts/gantt/Gantt.js.map +1 -0
  16. package/.internal/charts/gantt/GanttCategoryAxis.d.ts +287 -0
  17. package/.internal/charts/gantt/GanttCategoryAxis.d.ts.map +1 -0
  18. package/.internal/charts/gantt/GanttCategoryAxis.js +1238 -0
  19. package/.internal/charts/gantt/GanttCategoryAxis.js.map +1 -0
  20. package/.internal/charts/gantt/GanttCategoryAxisRenderer.d.ts +98 -0
  21. package/.internal/charts/gantt/GanttCategoryAxisRenderer.d.ts.map +1 -0
  22. package/.internal/charts/gantt/GanttCategoryAxisRenderer.js +270 -0
  23. package/.internal/charts/gantt/GanttCategoryAxisRenderer.js.map +1 -0
  24. package/.internal/charts/gantt/GanttDateAxis.d.ts +36 -0
  25. package/.internal/charts/gantt/GanttDateAxis.d.ts.map +1 -0
  26. package/.internal/charts/gantt/GanttDateAxis.js +35 -0
  27. package/.internal/charts/gantt/GanttDateAxis.js.map +1 -0
  28. package/.internal/charts/gantt/GanttDateAxisRenderer.d.ts +19 -0
  29. package/.internal/charts/gantt/GanttDateAxisRenderer.d.ts.map +1 -0
  30. package/.internal/charts/gantt/GanttDateAxisRenderer.js +23 -0
  31. package/.internal/charts/gantt/GanttDateAxisRenderer.js.map +1 -0
  32. package/.internal/charts/gantt/GanttDefaultTheme.d.ts +8 -0
  33. package/.internal/charts/gantt/GanttDefaultTheme.d.ts.map +1 -0
  34. package/.internal/charts/gantt/GanttDefaultTheme.js +756 -0
  35. package/.internal/charts/gantt/GanttDefaultTheme.js.map +1 -0
  36. package/.internal/charts/gantt/GanttSeries.d.ts +348 -0
  37. package/.internal/charts/gantt/GanttSeries.d.ts.map +1 -0
  38. package/.internal/charts/gantt/GanttSeries.js +1524 -0
  39. package/.internal/charts/gantt/GanttSeries.js.map +1 -0
  40. package/.internal/charts/hierarchy/Hierarchy.js.map +1 -1
  41. package/.internal/charts/hierarchy/HierarchyDefaultTheme.js.map +1 -1
  42. package/.internal/charts/hierarchy/HierarchyLink.d.ts +1 -1
  43. package/.internal/charts/hierarchy/HierarchyLink.d.ts.map +1 -1
  44. package/.internal/charts/hierarchy/HierarchyLink.js.map +1 -1
  45. package/.internal/charts/hierarchy/LinkedHierarchy.d.ts +2 -2
  46. package/.internal/charts/hierarchy/LinkedHierarchy.d.ts.map +1 -1
  47. package/.internal/charts/hierarchy/LinkedHierarchy.js +1 -1
  48. package/.internal/charts/hierarchy/LinkedHierarchy.js.map +1 -1
  49. package/.internal/charts/hierarchy/Pack.d.ts.map +1 -1
  50. package/.internal/charts/hierarchy/Pack.js.map +1 -1
  51. package/.internal/charts/hierarchy/Partition.d.ts.map +1 -1
  52. package/.internal/charts/hierarchy/Partition.js.map +1 -1
  53. package/.internal/charts/hierarchy/Treemap.js.map +1 -1
  54. package/.internal/charts/hierarchy/VoronoiTreemap.d.ts.map +1 -1
  55. package/.internal/charts/hierarchy/VoronoiTreemap.js +3 -3
  56. package/.internal/charts/hierarchy/VoronoiTreemap.js.map +1 -1
  57. package/.internal/charts/map/MapChart.d.ts.map +1 -1
  58. package/.internal/charts/map/MapChart.js +1 -3
  59. package/.internal/charts/map/MapChart.js.map +1 -1
  60. package/.internal/charts/stock/drawing/DrawingSeries.d.ts +1 -0
  61. package/.internal/charts/stock/drawing/DrawingSeries.d.ts.map +1 -1
  62. package/.internal/charts/stock/drawing/DrawingSeries.js +7 -0
  63. package/.internal/charts/stock/drawing/DrawingSeries.js.map +1 -1
  64. package/.internal/charts/stock/drawing/HorizontalLineSeries.d.ts.map +1 -1
  65. package/.internal/charts/stock/drawing/HorizontalLineSeries.js +2 -1
  66. package/.internal/charts/stock/drawing/HorizontalLineSeries.js.map +1 -1
  67. package/.internal/charts/stock/drawing/HorizontalRaySeries.d.ts.map +1 -1
  68. package/.internal/charts/stock/drawing/HorizontalRaySeries.js +2 -1
  69. package/.internal/charts/stock/drawing/HorizontalRaySeries.js.map +1 -1
  70. package/.internal/charts/stock/drawing/ParallelChannelSeries.d.ts.map +1 -1
  71. package/.internal/charts/stock/drawing/ParallelChannelSeries.js +2 -1
  72. package/.internal/charts/stock/drawing/ParallelChannelSeries.js.map +1 -1
  73. package/.internal/charts/stock/drawing/PolylineSeries.d.ts.map +1 -1
  74. package/.internal/charts/stock/drawing/PolylineSeries.js +3 -1
  75. package/.internal/charts/stock/drawing/PolylineSeries.js.map +1 -1
  76. package/.internal/charts/stock/drawing/SimpleLineSeries.d.ts.map +1 -1
  77. package/.internal/charts/stock/drawing/SimpleLineSeries.js +2 -1
  78. package/.internal/charts/stock/drawing/SimpleLineSeries.js.map +1 -1
  79. package/.internal/charts/stock/drawing/VerticalLineSeries.d.ts.map +1 -1
  80. package/.internal/charts/stock/drawing/VerticalLineSeries.js +2 -1
  81. package/.internal/charts/stock/drawing/VerticalLineSeries.js.map +1 -1
  82. package/.internal/charts/timeline/AxisRendererCurveX.js.map +1 -1
  83. package/.internal/charts/timeline/AxisRendererCurveY.js.map +1 -1
  84. package/.internal/charts/timeline/CurveChart.js.map +1 -1
  85. package/.internal/charts/timeline/CurveColumnSeries.js.map +1 -1
  86. package/.internal/charts/timeline/CurveCursor.js +1 -1
  87. package/.internal/charts/timeline/CurveCursor.js.map +1 -1
  88. package/.internal/charts/timeline/SerpentineChart.d.ts +1 -1
  89. package/.internal/charts/timeline/SerpentineChart.d.ts.map +1 -1
  90. package/.internal/charts/timeline/SerpentineChart.js.map +1 -1
  91. package/.internal/charts/timeline/SpiralChart.d.ts +1 -1
  92. package/.internal/charts/timeline/SpiralChart.d.ts.map +1 -1
  93. package/.internal/charts/timeline/SpiralChart.js.map +1 -1
  94. package/.internal/charts/wordcloud/WordCloud.js.map +1 -1
  95. package/.internal/charts/xy/XYChart.d.ts.map +1 -1
  96. package/.internal/charts/xy/XYChart.js +16 -8
  97. package/.internal/charts/xy/XYChart.js.map +1 -1
  98. package/.internal/charts/xy/XYChartDefaultTheme.d.ts.map +1 -1
  99. package/.internal/charts/xy/XYChartDefaultTheme.js +6 -3
  100. package/.internal/charts/xy/XYChartDefaultTheme.js.map +1 -1
  101. package/.internal/charts/xy/axes/Axis.d.ts +17 -1
  102. package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
  103. package/.internal/charts/xy/axes/Axis.js +46 -26
  104. package/.internal/charts/xy/axes/Axis.js.map +1 -1
  105. package/.internal/charts/xy/axes/AxisBullet.d.ts +1 -1
  106. package/.internal/charts/xy/axes/AxisBullet.d.ts.map +1 -1
  107. package/.internal/charts/xy/axes/AxisBullet.js.map +1 -1
  108. package/.internal/charts/xy/axes/AxisLabel.d.ts +1 -1
  109. package/.internal/charts/xy/axes/AxisLabel.d.ts.map +1 -1
  110. package/.internal/charts/xy/axes/AxisLabel.js.map +1 -1
  111. package/.internal/charts/xy/axes/AxisLabelRadial.d.ts +1 -1
  112. package/.internal/charts/xy/axes/AxisLabelRadial.d.ts.map +1 -1
  113. package/.internal/charts/xy/axes/AxisLabelRadial.js.map +1 -1
  114. package/.internal/charts/xy/axes/AxisRenderer.d.ts +5 -5
  115. package/.internal/charts/xy/axes/AxisRenderer.d.ts.map +1 -1
  116. package/.internal/charts/xy/axes/AxisRenderer.js.map +1 -1
  117. package/.internal/charts/xy/axes/AxisRendererX.d.ts +1 -1
  118. package/.internal/charts/xy/axes/AxisRendererX.d.ts.map +1 -1
  119. package/.internal/charts/xy/axes/AxisRendererX.js +9 -5
  120. package/.internal/charts/xy/axes/AxisRendererX.js.map +1 -1
  121. package/.internal/charts/xy/axes/AxisRendererY.d.ts +1 -1
  122. package/.internal/charts/xy/axes/AxisRendererY.d.ts.map +1 -1
  123. package/.internal/charts/xy/axes/AxisRendererY.js +9 -5
  124. package/.internal/charts/xy/axes/AxisRendererY.js.map +1 -1
  125. package/.internal/charts/xy/axes/CategoryAxis.d.ts +34 -3
  126. package/.internal/charts/xy/axes/CategoryAxis.d.ts.map +1 -1
  127. package/.internal/charts/xy/axes/CategoryAxis.js +243 -40
  128. package/.internal/charts/xy/axes/CategoryAxis.js.map +1 -1
  129. package/.internal/charts/xy/axes/CategoryDateAxis.d.ts +1 -1
  130. package/.internal/charts/xy/axes/CategoryDateAxis.d.ts.map +1 -1
  131. package/.internal/charts/xy/axes/CategoryDateAxis.js.map +1 -1
  132. package/.internal/charts/xy/axes/DateAxis.d.ts +16 -2
  133. package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
  134. package/.internal/charts/xy/axes/DateAxis.js +20 -5
  135. package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
  136. package/.internal/charts/xy/axes/EditableAxisLabel.d.ts +21 -0
  137. package/.internal/charts/xy/axes/EditableAxisLabel.d.ts.map +1 -0
  138. package/.internal/charts/xy/axes/EditableAxisLabel.js +31 -0
  139. package/.internal/charts/xy/axes/EditableAxisLabel.js.map +1 -0
  140. package/.internal/charts/xy/axes/GaplessDateAxis.d.ts +2 -2
  141. package/.internal/charts/xy/axes/GaplessDateAxis.d.ts.map +1 -1
  142. package/.internal/charts/xy/axes/GaplessDateAxis.js.map +1 -1
  143. package/.internal/charts/xy/axes/ValueAxis.d.ts +2 -2
  144. package/.internal/charts/xy/axes/ValueAxis.d.ts.map +1 -1
  145. package/.internal/charts/xy/axes/ValueAxis.js +4 -3
  146. package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
  147. package/.internal/charts/xy/series/BaseColumnSeries.d.ts +5 -1
  148. package/.internal/charts/xy/series/BaseColumnSeries.d.ts.map +1 -1
  149. package/.internal/charts/xy/series/BaseColumnSeries.js +60 -32
  150. package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
  151. package/.internal/charts/xy/series/CandlestickSeries.d.ts +2 -1
  152. package/.internal/charts/xy/series/CandlestickSeries.d.ts.map +1 -1
  153. package/.internal/charts/xy/series/CandlestickSeries.js +99 -44
  154. package/.internal/charts/xy/series/CandlestickSeries.js.map +1 -1
  155. package/.internal/charts/xy/series/ColumnSeries.d.ts +39 -0
  156. package/.internal/charts/xy/series/ColumnSeries.d.ts.map +1 -1
  157. package/.internal/charts/xy/series/ColumnSeries.js +77 -1
  158. package/.internal/charts/xy/series/ColumnSeries.js.map +1 -1
  159. package/.internal/charts/xy/series/LineSeries.d.ts.map +1 -1
  160. package/.internal/charts/xy/series/LineSeries.js.map +1 -1
  161. package/.internal/charts/xy/series/OHLC.d.ts +6 -0
  162. package/.internal/charts/xy/series/OHLC.d.ts.map +1 -1
  163. package/.internal/charts/xy/series/OHLC.js +6 -0
  164. package/.internal/charts/xy/series/OHLC.js.map +1 -1
  165. package/.internal/charts/xy/series/SmoothedXLineSeries.d.ts.map +1 -1
  166. package/.internal/charts/xy/series/SmoothedXLineSeries.js.map +1 -1
  167. package/.internal/charts/xy/series/SmoothedXYLineSeries.d.ts.map +1 -1
  168. package/.internal/charts/xy/series/SmoothedXYLineSeries.js.map +1 -1
  169. package/.internal/charts/xy/series/SmoothedYLineSeries.d.ts.map +1 -1
  170. package/.internal/charts/xy/series/SmoothedYLineSeries.js.map +1 -1
  171. package/.internal/charts/xy/series/StepLineSeries.d.ts +8 -2
  172. package/.internal/charts/xy/series/StepLineSeries.d.ts.map +1 -1
  173. package/.internal/charts/xy/series/StepLineSeries.js +6 -0
  174. package/.internal/charts/xy/series/StepLineSeries.js.map +1 -1
  175. package/.internal/charts/xy/series/XYSeries.d.ts +1 -1
  176. package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
  177. package/.internal/charts/xy/series/XYSeries.js +4 -1
  178. package/.internal/charts/xy/series/XYSeries.js.map +1 -1
  179. package/.internal/core/Classes.d.ts +28 -0
  180. package/.internal/core/Classes.d.ts.map +1 -1
  181. package/.internal/core/Classes.js.map +1 -1
  182. package/.internal/core/Registry.js +1 -1
  183. package/.internal/core/Registry.js.map +1 -1
  184. package/.internal/core/Root.d.ts +8 -0
  185. package/.internal/core/Root.d.ts.map +1 -1
  186. package/.internal/core/Root.js +26 -19
  187. package/.internal/core/Root.js.map +1 -1
  188. package/.internal/core/render/Button.d.ts +4 -1
  189. package/.internal/core/render/Button.d.ts.map +1 -1
  190. package/.internal/core/render/Button.js.map +1 -1
  191. package/.internal/core/render/Component.d.ts +8 -0
  192. package/.internal/core/render/Component.d.ts.map +1 -1
  193. package/.internal/core/render/Component.js +17 -0
  194. package/.internal/core/render/Component.js.map +1 -1
  195. package/.internal/core/render/ConfirmButton.d.ts +30 -0
  196. package/.internal/core/render/ConfirmButton.d.ts.map +1 -0
  197. package/.internal/core/render/ConfirmButton.js +84 -0
  198. package/.internal/core/render/ConfirmButton.js.map +1 -0
  199. package/.internal/core/render/Container.d.ts +6 -0
  200. package/.internal/core/render/Container.d.ts.map +1 -1
  201. package/.internal/core/render/Container.js +49 -2
  202. package/.internal/core/render/Container.js.map +1 -1
  203. package/.internal/core/render/EditableLabel.d.ts.map +1 -1
  204. package/.internal/core/render/EditableLabel.js +6 -6
  205. package/.internal/core/render/EditableLabel.js.map +1 -1
  206. package/.internal/core/render/HeatLegend.d.ts +14 -0
  207. package/.internal/core/render/HeatLegend.d.ts.map +1 -1
  208. package/.internal/core/render/HeatLegend.js +16 -3
  209. package/.internal/core/render/HeatLegend.js.map +1 -1
  210. package/.internal/core/render/Link.d.ts +28 -0
  211. package/.internal/core/render/Link.d.ts.map +1 -0
  212. package/.internal/core/render/Link.js +90 -0
  213. package/.internal/core/render/Link.js.map +1 -0
  214. package/.internal/core/render/MonotoneXTension.d.ts.map +1 -1
  215. package/.internal/core/render/MonotoneXTension.js.map +1 -1
  216. package/.internal/core/render/MonotoneYTension.d.ts.map +1 -1
  217. package/.internal/core/render/MonotoneYTension.js.map +1 -1
  218. package/.internal/core/render/NumericStepper.d.ts +27 -0
  219. package/.internal/core/render/NumericStepper.d.ts.map +1 -0
  220. package/.internal/core/render/NumericStepper.js +117 -0
  221. package/.internal/core/render/NumericStepper.js.map +1 -0
  222. package/.internal/core/render/OrthogonalLine.d.ts +33 -0
  223. package/.internal/core/render/OrthogonalLine.d.ts.map +1 -0
  224. package/.internal/core/render/OrthogonalLine.js +97 -0
  225. package/.internal/core/render/OrthogonalLine.js.map +1 -0
  226. package/.internal/core/render/ProgressPie.d.ts +32 -0
  227. package/.internal/core/render/ProgressPie.d.ts.map +1 -0
  228. package/.internal/core/render/ProgressPie.js +89 -0
  229. package/.internal/core/render/ProgressPie.js.map +1 -0
  230. package/.internal/core/render/Series.d.ts +0 -7
  231. package/.internal/core/render/Series.d.ts.map +1 -1
  232. package/.internal/core/render/Series.js +24 -27
  233. package/.internal/core/render/Series.js.map +1 -1
  234. package/.internal/core/render/Sprite.d.ts +3 -2
  235. package/.internal/core/render/Sprite.d.ts.map +1 -1
  236. package/.internal/core/render/Sprite.js +40 -30
  237. package/.internal/core/render/Sprite.js.map +1 -1
  238. package/.internal/core/render/patterns/LinePattern.d.ts +8 -0
  239. package/.internal/core/render/patterns/LinePattern.d.ts.map +1 -1
  240. package/.internal/core/render/patterns/LinePattern.js +32 -1
  241. package/.internal/core/render/patterns/LinePattern.js.map +1 -1
  242. package/.internal/core/util/Entity.d.ts.map +1 -1
  243. package/.internal/core/util/Entity.js.map +1 -1
  244. package/.internal/core/util/EventDispatcher.d.ts +32 -3
  245. package/.internal/core/util/EventDispatcher.d.ts.map +1 -1
  246. package/.internal/core/util/EventDispatcher.js +51 -5
  247. package/.internal/core/util/EventDispatcher.js.map +1 -1
  248. package/.internal/core/util/Language.d.ts +2 -0
  249. package/.internal/core/util/Language.d.ts.map +1 -1
  250. package/.internal/core/util/Language.js.map +1 -1
  251. package/.internal/core/util/Time.d.ts.map +1 -1
  252. package/.internal/core/util/Time.js +4 -1
  253. package/.internal/core/util/Time.js.map +1 -1
  254. package/.internal/plugins/colorPicker/ColorPicker.d.ts +151 -0
  255. package/.internal/plugins/colorPicker/ColorPicker.d.ts.map +1 -0
  256. package/.internal/plugins/colorPicker/ColorPicker.js +665 -0
  257. package/.internal/plugins/colorPicker/ColorPicker.js.map +1 -0
  258. package/.internal/plugins/colorPicker/ColorPickerButton.d.ts +28 -0
  259. package/.internal/plugins/colorPicker/ColorPickerButton.d.ts.map +1 -0
  260. package/.internal/plugins/colorPicker/ColorPickerButton.js +87 -0
  261. package/.internal/plugins/colorPicker/ColorPickerButton.js.map +1 -0
  262. package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.d.ts +8 -0
  263. package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.d.ts.map +1 -0
  264. package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.js +248 -0
  265. package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.js.map +1 -0
  266. package/.internal/plugins/json/Classes-script.d.ts +28 -0
  267. package/.internal/plugins/json/Classes-script.d.ts.map +1 -1
  268. package/.internal/plugins/json/Classes-script.js +14 -0
  269. package/.internal/plugins/json/Classes-script.js.map +1 -1
  270. package/.internal/plugins/json/Classes.d.ts +28 -0
  271. package/.internal/plugins/json/Classes.d.ts.map +1 -1
  272. package/.internal/plugins/json/Classes.js +14 -0
  273. package/.internal/plugins/json/Classes.js.map +1 -1
  274. package/.internal/themes/DefaultTheme.d.ts.map +1 -1
  275. package/.internal/themes/DefaultTheme.js +227 -2
  276. package/.internal/themes/DefaultTheme.js.map +1 -1
  277. package/CHANGELOG.md +27 -0
  278. package/examples/javascript/flow-arc-horizontal/package.json +1 -1
  279. package/examples/javascript/flow-arc-vertical/package.json +1 -1
  280. package/examples/javascript/flow-chord/package.json +1 -1
  281. package/examples/javascript/flow-chord-directed/package.json +1 -1
  282. package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
  283. package/examples/javascript/flow-sankey/package.json +1 -1
  284. package/examples/javascript/gantt/README.md +6 -0
  285. package/examples/javascript/gantt/index.css +11 -0
  286. package/examples/javascript/gantt/index.html +12 -0
  287. package/examples/javascript/gantt/index.js +233 -0
  288. package/examples/javascript/gantt/package.json +16 -0
  289. package/examples/javascript/gantt/webpack.config.js +38 -0
  290. package/examples/javascript/gantt-multilevel/README.md +6 -0
  291. package/examples/javascript/gantt-multilevel/index.css +11 -0
  292. package/examples/javascript/gantt-multilevel/index.html +12 -0
  293. package/examples/javascript/gantt-multilevel/index.js +111 -0
  294. package/examples/javascript/gantt-multilevel/package.json +16 -0
  295. package/examples/javascript/gantt-multilevel/webpack.config.js +38 -0
  296. package/examples/javascript/gantt-simple/README.md +6 -0
  297. package/examples/javascript/gantt-simple/index.css +11 -0
  298. package/examples/javascript/gantt-simple/index.html +12 -0
  299. package/examples/javascript/gantt-simple/index.js +94 -0
  300. package/examples/javascript/gantt-simple/package.json +16 -0
  301. package/examples/javascript/gantt-simple/webpack.config.js +38 -0
  302. package/examples/javascript/gauge/package.json +1 -1
  303. package/examples/javascript/gauge-bands/package.json +1 -1
  304. package/examples/javascript/hierarchy-force-directed/package.json +1 -1
  305. package/examples/javascript/hierarchy-pack/package.json +1 -1
  306. package/examples/javascript/hierarchy-partition/package.json +1 -1
  307. package/examples/javascript/hierarchy-sunburst/package.json +1 -1
  308. package/examples/javascript/hierarchy-tree/package.json +1 -1
  309. package/examples/javascript/hierarchy-treemap/package.json +1 -1
  310. package/examples/javascript/hierarchy-voronoi-treemap/package.json +1 -1
  311. package/examples/javascript/jest/package.json +1 -1
  312. package/examples/javascript/json-pie/package.json +1 -1
  313. package/examples/javascript/json-xy/package.json +1 -1
  314. package/examples/javascript/map-animating-along-lines/package.json +1 -1
  315. package/examples/javascript/map-clustered-points/package.json +1 -1
  316. package/examples/javascript/map-day-and-night/package.json +1 -1
  317. package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
  318. package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
  319. package/examples/javascript/map-with-bubbles/package.json +1 -1
  320. package/examples/javascript/map-zoom-to-country/package.json +1 -1
  321. package/examples/javascript/misc-40-charts/package.json +1 -1
  322. package/examples/javascript/misc-microchart-grid/package.json +1 -1
  323. package/examples/javascript/pie-chart/package.json +1 -1
  324. package/examples/javascript/pie-donut-chart/package.json +1 -1
  325. package/examples/javascript/pie-variable-radius/package.json +1 -1
  326. package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
  327. package/examples/javascript/radar-heat-map/package.json +1 -1
  328. package/examples/javascript/radar-line/package.json +1 -1
  329. package/examples/javascript/radar-time-line/package.json +1 -1
  330. package/examples/javascript/sliced-funnel/package.json +1 -1
  331. package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
  332. package/examples/javascript/sliced-pyramid/package.json +1 -1
  333. package/examples/javascript/stock-chart/index.js +2 -0
  334. package/examples/javascript/stock-chart/package.json +1 -1
  335. package/examples/javascript/stock-chart-comparing-stocks/index.js +2 -0
  336. package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
  337. package/examples/javascript/stock-chart-data-granularity/index.js +2 -0
  338. package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
  339. package/examples/javascript/stock-chart-data-grouping/index.js +2 -0
  340. package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
  341. package/examples/javascript/stock-chart-intraday/index.js +2 -0
  342. package/examples/javascript/stock-chart-intraday/package.json +1 -1
  343. package/examples/javascript/stock-chart-live/index.js +1 -0
  344. package/examples/javascript/stock-chart-live/package.json +1 -1
  345. package/examples/javascript/stock-chart-volume-separate-panel/index.js +2 -0
  346. package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
  347. package/examples/javascript/timeline-horizontal-serpentine-chart/package.json +1 -1
  348. package/examples/javascript/timeline-linear-process-diagram/package.json +1 -1
  349. package/examples/javascript/timeline-serpentine-chart/package.json +1 -1
  350. package/examples/javascript/timeline-spiral-chart/package.json +1 -1
  351. package/examples/javascript/venn-diagram/package.json +1 -1
  352. package/examples/javascript/wordcloud-with-data/package.json +1 -1
  353. package/examples/javascript/wordcloud-with-text/package.json +1 -1
  354. package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
  355. package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  356. package/examples/javascript/xy-bubble/package.json +1 -1
  357. package/examples/javascript/xy-candlestick/index.js +1 -0
  358. package/examples/javascript/xy-candlestick/package.json +1 -1
  359. package/examples/javascript/xy-clustered-column/package.json +1 -1
  360. package/examples/javascript/xy-column/package.json +1 -1
  361. package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
  362. package/examples/javascript/xy-data-grouping/package.json +1 -1
  363. package/examples/javascript/xy-draggable-range/package.json +1 -1
  364. package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  365. package/examples/javascript/xy-dumbbell plot/package.json +1 -1
  366. package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
  367. package/examples/javascript/xy-line/package.json +1 -1
  368. package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
  369. package/examples/javascript/xy-live-data/package.json +1 -1
  370. package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
  371. package/examples/javascript/xy-ohlc/package.json +1 -1
  372. package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
  373. package/examples/javascript/xy-smoothed-line/package.json +1 -1
  374. package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
  375. package/examples/javascript/xy-stacked-column/package.json +1 -1
  376. package/examples/javascript/xy-stacked-step/package.json +1 -1
  377. package/examples/javascript/xy-stock/package.json +1 -1
  378. package/examples/javascript/xy-stock-comparing/package.json +1 -1
  379. package/examples/typescript/flow-arc-horizontal/package.json +1 -1
  380. package/examples/typescript/flow-arc-vertical/package.json +1 -1
  381. package/examples/typescript/flow-chord/package.json +1 -1
  382. package/examples/typescript/flow-chord-directed/package.json +1 -1
  383. package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
  384. package/examples/typescript/flow-sankey/package.json +1 -1
  385. package/examples/typescript/gantt/README.md +6 -0
  386. package/examples/typescript/gantt/index.css +11 -0
  387. package/examples/typescript/gantt/index.html +12 -0
  388. package/examples/typescript/gantt/index.ts +233 -0
  389. package/examples/typescript/gantt/package.json +18 -0
  390. package/examples/typescript/gantt/tsconfig.json +12 -0
  391. package/examples/typescript/gantt/webpack.config.js +45 -0
  392. package/examples/typescript/gantt-multilevel/README.md +6 -0
  393. package/examples/typescript/gantt-multilevel/index.css +11 -0
  394. package/examples/typescript/gantt-multilevel/index.html +12 -0
  395. package/examples/typescript/gantt-multilevel/index.ts +111 -0
  396. package/examples/typescript/gantt-multilevel/package.json +18 -0
  397. package/examples/typescript/gantt-multilevel/tsconfig.json +12 -0
  398. package/examples/typescript/gantt-multilevel/webpack.config.js +45 -0
  399. package/examples/typescript/gantt-simple/README.md +6 -0
  400. package/examples/typescript/gantt-simple/index.css +11 -0
  401. package/examples/typescript/gantt-simple/index.html +12 -0
  402. package/examples/typescript/gantt-simple/index.ts +94 -0
  403. package/examples/typescript/gantt-simple/package.json +18 -0
  404. package/examples/typescript/gantt-simple/tsconfig.json +12 -0
  405. package/examples/typescript/gantt-simple/webpack.config.js +45 -0
  406. package/examples/typescript/gauge/package.json +1 -1
  407. package/examples/typescript/gauge-bands/package.json +1 -1
  408. package/examples/typescript/hierarchy-force-directed/package.json +1 -1
  409. package/examples/typescript/hierarchy-pack/package.json +1 -1
  410. package/examples/typescript/hierarchy-partition/package.json +1 -1
  411. package/examples/typescript/hierarchy-sunburst/package.json +1 -1
  412. package/examples/typescript/hierarchy-tree/package.json +1 -1
  413. package/examples/typescript/hierarchy-treemap/package.json +1 -1
  414. package/examples/typescript/hierarchy-voronoi-treemap/package.json +1 -1
  415. package/examples/typescript/jest/package.json +1 -1
  416. package/examples/typescript/json-pie/package.json +1 -1
  417. package/examples/typescript/json-xy/package.json +1 -1
  418. package/examples/typescript/map-animating-along-lines/package.json +1 -1
  419. package/examples/typescript/map-clustered-points/package.json +1 -1
  420. package/examples/typescript/map-day-and-night/package.json +1 -1
  421. package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
  422. package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
  423. package/examples/typescript/map-with-bubbles/package.json +1 -1
  424. package/examples/typescript/map-zoom-to-country/package.json +1 -1
  425. package/examples/typescript/misc-40-charts/package.json +1 -1
  426. package/examples/typescript/misc-microchart-grid/package.json +1 -1
  427. package/examples/typescript/pie-chart/package.json +1 -1
  428. package/examples/typescript/pie-donut-chart/package.json +1 -1
  429. package/examples/typescript/pie-variable-radius/package.json +1 -1
  430. package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
  431. package/examples/typescript/radar-heat-map/package.json +1 -1
  432. package/examples/typescript/radar-line/package.json +1 -1
  433. package/examples/typescript/radar-time-line/package.json +1 -1
  434. package/examples/typescript/sliced-funnel/package.json +1 -1
  435. package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
  436. package/examples/typescript/sliced-pyramid/package.json +1 -1
  437. package/examples/typescript/stock-chart/index.ts +2 -0
  438. package/examples/typescript/stock-chart/package.json +1 -1
  439. package/examples/typescript/stock-chart-comparing-stocks/index.ts +2 -0
  440. package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
  441. package/examples/typescript/stock-chart-data-granularity/index.ts +2 -0
  442. package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
  443. package/examples/typescript/stock-chart-data-grouping/index.ts +2 -0
  444. package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
  445. package/examples/typescript/stock-chart-intraday/index.ts +2 -0
  446. package/examples/typescript/stock-chart-intraday/package.json +1 -1
  447. package/examples/typescript/stock-chart-live/index.ts +1 -0
  448. package/examples/typescript/stock-chart-live/package.json +1 -1
  449. package/examples/typescript/stock-chart-volume-separate-panel/index.ts +2 -0
  450. package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
  451. package/examples/typescript/timeline-horizontal-serpentine-chart/package.json +1 -1
  452. package/examples/typescript/timeline-linear-process-diagram/package.json +1 -1
  453. package/examples/typescript/timeline-serpentine-chart/package.json +1 -1
  454. package/examples/typescript/timeline-spiral-chart/package.json +1 -1
  455. package/examples/typescript/venn-diagram/package.json +1 -1
  456. package/examples/typescript/wordcloud-with-data/package.json +1 -1
  457. package/examples/typescript/wordcloud-with-text/package.json +1 -1
  458. package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
  459. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  460. package/examples/typescript/xy-bubble/package.json +1 -1
  461. package/examples/typescript/xy-candlestick/index.ts +1 -0
  462. package/examples/typescript/xy-candlestick/package.json +1 -1
  463. package/examples/typescript/xy-clustered-column/package.json +1 -1
  464. package/examples/typescript/xy-column/package.json +1 -1
  465. package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
  466. package/examples/typescript/xy-data-grouping/package.json +1 -1
  467. package/examples/typescript/xy-draggable-range/package.json +1 -1
  468. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  469. package/examples/typescript/xy-dumbbell plot/package.json +1 -1
  470. package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
  471. package/examples/typescript/xy-line/package.json +1 -1
  472. package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
  473. package/examples/typescript/xy-live-data/package.json +1 -1
  474. package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
  475. package/examples/typescript/xy-ohlc/package.json +1 -1
  476. package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
  477. package/examples/typescript/xy-smoothed-line/package.json +1 -1
  478. package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
  479. package/examples/typescript/xy-stacked-column/package.json +1 -1
  480. package/examples/typescript/xy-stacked-step/package.json +1 -1
  481. package/examples/typescript/xy-stock/package.json +1 -1
  482. package/examples/typescript/xy-stock-comparing/package.json +1 -1
  483. package/gantt.d.ts +9 -0
  484. package/gantt.d.ts.map +1 -0
  485. package/gantt.js +9 -0
  486. package/gantt.js.map +1 -0
  487. package/index.d.ts +5 -0
  488. package/index.d.ts.map +1 -1
  489. package/index.js +5 -0
  490. package/index.js.map +1 -1
  491. package/locales/ar.d.ts +4 -0
  492. package/locales/ar.d.ts.map +1 -1
  493. package/locales/ar.js +5 -0
  494. package/locales/ar.js.map +1 -1
  495. package/locales/bg_BG.d.ts +2 -0
  496. package/locales/bg_BG.d.ts.map +1 -1
  497. package/locales/bg_BG.js +3 -1
  498. package/locales/bg_BG.js.map +1 -1
  499. package/locales/bs_BA.d.ts +4 -0
  500. package/locales/bs_BA.d.ts.map +1 -1
  501. package/locales/bs_BA.js +5 -0
  502. package/locales/bs_BA.js.map +1 -1
  503. package/locales/ca_ES.d.ts +4 -0
  504. package/locales/ca_ES.d.ts.map +1 -1
  505. package/locales/ca_ES.js +5 -0
  506. package/locales/ca_ES.js.map +1 -1
  507. package/locales/cs_CZ.d.ts +4 -0
  508. package/locales/cs_CZ.d.ts.map +1 -1
  509. package/locales/cs_CZ.js +5 -0
  510. package/locales/cs_CZ.js.map +1 -1
  511. package/locales/da_DK.d.ts +4 -0
  512. package/locales/da_DK.d.ts.map +1 -1
  513. package/locales/da_DK.js +5 -0
  514. package/locales/da_DK.js.map +1 -1
  515. package/locales/de_CH.d.ts +4 -0
  516. package/locales/de_CH.d.ts.map +1 -1
  517. package/locales/de_CH.js +5 -0
  518. package/locales/de_CH.js.map +1 -1
  519. package/locales/de_DE.d.ts +4 -0
  520. package/locales/de_DE.d.ts.map +1 -1
  521. package/locales/de_DE.js +5 -0
  522. package/locales/de_DE.js.map +1 -1
  523. package/locales/el_GR.d.ts +4 -0
  524. package/locales/el_GR.d.ts.map +1 -1
  525. package/locales/el_GR.js +5 -0
  526. package/locales/el_GR.js.map +1 -1
  527. package/locales/en.d.ts +2 -0
  528. package/locales/en.d.ts.map +1 -1
  529. package/locales/en.js +3 -1
  530. package/locales/en.js.map +1 -1
  531. package/locales/en_CA.d.ts +4 -0
  532. package/locales/en_CA.d.ts.map +1 -1
  533. package/locales/en_CA.js +5 -0
  534. package/locales/en_CA.js.map +1 -1
  535. package/locales/en_US.d.ts +4 -0
  536. package/locales/en_US.d.ts.map +1 -1
  537. package/locales/en_US.js +5 -0
  538. package/locales/en_US.js.map +1 -1
  539. package/locales/es_ES.d.ts +4 -0
  540. package/locales/es_ES.d.ts.map +1 -1
  541. package/locales/es_ES.js +6 -1
  542. package/locales/es_ES.js.map +1 -1
  543. package/locales/et_EE.d.ts +4 -0
  544. package/locales/et_EE.d.ts.map +1 -1
  545. package/locales/et_EE.js +5 -0
  546. package/locales/et_EE.js.map +1 -1
  547. package/locales/fi_FI.d.ts +4 -0
  548. package/locales/fi_FI.d.ts.map +1 -1
  549. package/locales/fi_FI.js +5 -0
  550. package/locales/fi_FI.js.map +1 -1
  551. package/locales/fo_FO.d.ts +2 -0
  552. package/locales/fo_FO.d.ts.map +1 -1
  553. package/locales/fo_FO.js +3 -1
  554. package/locales/fo_FO.js.map +1 -1
  555. package/locales/fr_FR.d.ts +4 -0
  556. package/locales/fr_FR.d.ts.map +1 -1
  557. package/locales/fr_FR.js +5 -0
  558. package/locales/fr_FR.js.map +1 -1
  559. package/locales/he_IL.d.ts +4 -0
  560. package/locales/he_IL.d.ts.map +1 -1
  561. package/locales/he_IL.js +5 -0
  562. package/locales/he_IL.js.map +1 -1
  563. package/locales/hi_IN.d.ts +4 -0
  564. package/locales/hi_IN.d.ts.map +1 -1
  565. package/locales/hi_IN.js +5 -0
  566. package/locales/hi_IN.js.map +1 -1
  567. package/locales/hr_HR.d.ts +4 -0
  568. package/locales/hr_HR.d.ts.map +1 -1
  569. package/locales/hr_HR.js +5 -0
  570. package/locales/hr_HR.js.map +1 -1
  571. package/locales/hu_HU.d.ts +4 -0
  572. package/locales/hu_HU.d.ts.map +1 -1
  573. package/locales/hu_HU.js +5 -0
  574. package/locales/hu_HU.js.map +1 -1
  575. package/locales/id_ID.d.ts +4 -0
  576. package/locales/id_ID.d.ts.map +1 -1
  577. package/locales/id_ID.js +5 -0
  578. package/locales/id_ID.js.map +1 -1
  579. package/locales/it_IT.d.ts +4 -0
  580. package/locales/it_IT.d.ts.map +1 -1
  581. package/locales/it_IT.js +5 -0
  582. package/locales/it_IT.js.map +1 -1
  583. package/locales/ja_JP.d.ts +4 -0
  584. package/locales/ja_JP.d.ts.map +1 -1
  585. package/locales/ja_JP.js +5 -0
  586. package/locales/ja_JP.js.map +1 -1
  587. package/locales/ko_KR.d.ts +4 -0
  588. package/locales/ko_KR.d.ts.map +1 -1
  589. package/locales/ko_KR.js +5 -0
  590. package/locales/ko_KR.js.map +1 -1
  591. package/locales/lt_LT.d.ts +4 -0
  592. package/locales/lt_LT.d.ts.map +1 -1
  593. package/locales/lt_LT.js +5 -0
  594. package/locales/lt_LT.js.map +1 -1
  595. package/locales/lv_LV.d.ts +4 -0
  596. package/locales/lv_LV.d.ts.map +1 -1
  597. package/locales/lv_LV.js +5 -0
  598. package/locales/lv_LV.js.map +1 -1
  599. package/locales/nb_NO.d.ts +4 -0
  600. package/locales/nb_NO.d.ts.map +1 -1
  601. package/locales/nb_NO.js +5 -0
  602. package/locales/nb_NO.js.map +1 -1
  603. package/locales/nl_NL.d.ts +4 -0
  604. package/locales/nl_NL.d.ts.map +1 -1
  605. package/locales/nl_NL.js +5 -0
  606. package/locales/nl_NL.js.map +1 -1
  607. package/locales/pl_PL.d.ts +4 -0
  608. package/locales/pl_PL.d.ts.map +1 -1
  609. package/locales/pl_PL.js +5 -0
  610. package/locales/pl_PL.js.map +1 -1
  611. package/locales/pt_BR.d.ts +4 -0
  612. package/locales/pt_BR.d.ts.map +1 -1
  613. package/locales/pt_BR.js +5 -0
  614. package/locales/pt_BR.js.map +1 -1
  615. package/locales/pt_PT.d.ts +4 -0
  616. package/locales/pt_PT.d.ts.map +1 -1
  617. package/locales/pt_PT.js +5 -0
  618. package/locales/pt_PT.js.map +1 -1
  619. package/locales/ro_RO.d.ts +4 -0
  620. package/locales/ro_RO.d.ts.map +1 -1
  621. package/locales/ro_RO.js +5 -0
  622. package/locales/ro_RO.js.map +1 -1
  623. package/locales/ru_RU.d.ts +4 -0
  624. package/locales/ru_RU.d.ts.map +1 -1
  625. package/locales/ru_RU.js +5 -0
  626. package/locales/ru_RU.js.map +1 -1
  627. package/locales/sk_SK.d.ts +4 -0
  628. package/locales/sk_SK.d.ts.map +1 -1
  629. package/locales/sk_SK.js +5 -0
  630. package/locales/sk_SK.js.map +1 -1
  631. package/locales/sl_SL.d.ts +4 -0
  632. package/locales/sl_SL.d.ts.map +1 -1
  633. package/locales/sl_SL.js +5 -0
  634. package/locales/sl_SL.js.map +1 -1
  635. package/locales/sr_RS.d.ts +4 -0
  636. package/locales/sr_RS.d.ts.map +1 -1
  637. package/locales/sr_RS.js +5 -0
  638. package/locales/sr_RS.js.map +1 -1
  639. package/locales/sv_SE.d.ts +4 -0
  640. package/locales/sv_SE.d.ts.map +1 -1
  641. package/locales/sv_SE.js +5 -0
  642. package/locales/sv_SE.js.map +1 -1
  643. package/locales/th_TH.d.ts +4 -0
  644. package/locales/th_TH.d.ts.map +1 -1
  645. package/locales/th_TH.js +5 -0
  646. package/locales/th_TH.js.map +1 -1
  647. package/locales/tr_TR.d.ts +4 -0
  648. package/locales/tr_TR.d.ts.map +1 -1
  649. package/locales/tr_TR.js +5 -0
  650. package/locales/tr_TR.js.map +1 -1
  651. package/locales/uk_UA.d.ts +4 -0
  652. package/locales/uk_UA.d.ts.map +1 -1
  653. package/locales/uk_UA.js +5 -0
  654. package/locales/uk_UA.js.map +1 -1
  655. package/locales/vi_VN.d.ts +4 -0
  656. package/locales/vi_VN.d.ts.map +1 -1
  657. package/locales/vi_VN.js +5 -0
  658. package/locales/vi_VN.js.map +1 -1
  659. package/locales/zh_Hans.d.ts +4 -0
  660. package/locales/zh_Hans.d.ts.map +1 -1
  661. package/locales/zh_Hans.js +5 -0
  662. package/locales/zh_Hans.js.map +1 -1
  663. package/locales/zh_Hant.d.ts +4 -0
  664. package/locales/zh_Hant.d.ts.map +1 -1
  665. package/locales/zh_Hant.js +5 -0
  666. package/locales/zh_Hant.js.map +1 -1
  667. package/package.json +1 -1
  668. package/plugins/colorPicker.d.ts +3 -0
  669. package/plugins/colorPicker.d.ts.map +1 -0
  670. package/plugins/colorPicker.js +3 -0
  671. package/plugins/colorPicker.js.map +1 -0
  672. package/xy.d.ts +1 -0
  673. package/xy.d.ts.map +1 -1
  674. package/xy.js +1 -0
  675. package/xy.js.map +1 -1
@@ -0,0 +1,1238 @@
1
+ import { __awaiter } from "tslib";
2
+ import { Rectangle } from "../../core/render/Rectangle";
3
+ import { CategoryAxis } from "../xy/axes/CategoryAxis";
4
+ import { Button, color, Graphics } from "../../..";
5
+ import * as $array from "../../core/util/Array";
6
+ import * as $type from "../../core/util/Type";
7
+ /**
8
+ * A category axis that is used as a Y (vertical) axis for [[Gantt]] charts.
9
+ *
10
+ * @see {@link https://www.amcharts.com/docs/v5/charts/gantt/#Category_vertical_axis} for more info
11
+ * @since 5.14.0
12
+ * @important
13
+ */
14
+ export class GanttCategoryAxis extends CategoryAxis {
15
+ constructor() {
16
+ super(...arguments);
17
+ Object.defineProperty(this, "_downX", {
18
+ enumerable: true,
19
+ configurable: true,
20
+ writable: true,
21
+ value: void 0
22
+ });
23
+ Object.defineProperty(this, "_downW", {
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true,
27
+ value: void 0
28
+ });
29
+ Object.defineProperty(this, "_xHideDP", {
30
+ enumerable: true,
31
+ configurable: true,
32
+ writable: true,
33
+ value: void 0
34
+ });
35
+ Object.defineProperty(this, "_insertAfter", {
36
+ enumerable: true,
37
+ configurable: true,
38
+ writable: true,
39
+ value: void 0
40
+ });
41
+ Object.defineProperty(this, "_makeChildOf", {
42
+ enumerable: true,
43
+ configurable: true,
44
+ writable: true,
45
+ value: void 0
46
+ });
47
+ Object.defineProperty(this, "_draggedItem", {
48
+ enumerable: true,
49
+ configurable: true,
50
+ writable: true,
51
+ value: void 0
52
+ });
53
+ Object.defineProperty(this, "_previousTick", {
54
+ enumerable: true,
55
+ configurable: true,
56
+ writable: true,
57
+ value: void 0
58
+ });
59
+ Object.defineProperty(this, "_delDp", {
60
+ enumerable: true,
61
+ configurable: true,
62
+ writable: true,
63
+ value: void 0
64
+ });
65
+ Object.defineProperty(this, "_firstDataItem", {
66
+ enumerable: true,
67
+ configurable: true,
68
+ writable: true,
69
+ value: void 0
70
+ });
71
+ Object.defineProperty(this, "_updDP", {
72
+ enumerable: true,
73
+ configurable: true,
74
+ writable: true,
75
+ value: void 0
76
+ });
77
+ Object.defineProperty(this, "_dataChangeDp", {
78
+ enumerable: true,
79
+ configurable: true,
80
+ writable: true,
81
+ value: void 0
82
+ });
83
+ Object.defineProperty(this, "_treeDirty", {
84
+ enumerable: true,
85
+ configurable: true,
86
+ writable: true,
87
+ value: false
88
+ });
89
+ /**
90
+ * A reference to the parent [[Gantt]] chart.
91
+ */
92
+ Object.defineProperty(this, "gantt", {
93
+ enumerable: true,
94
+ configurable: true,
95
+ writable: true,
96
+ value: void 0
97
+ });
98
+ /**
99
+ * A [[Button]] used for deleting categories.
100
+ */
101
+ Object.defineProperty(this, "xButton", {
102
+ enumerable: true,
103
+ configurable: true,
104
+ writable: true,
105
+ value: this.children.push(Button.new(this._root, {
106
+ themeTags: ["xbutton"],
107
+ icon: Graphics.new(this._root, {
108
+ themeTags: ["icon"]
109
+ })
110
+ }))
111
+ });
112
+ }
113
+ _afterNew() {
114
+ this.fields.push("parentId", "collapsed", "name");
115
+ super._afterNew();
116
+ this.events.on("wheel", (event) => {
117
+ this.chart.handleWheel(event);
118
+ });
119
+ this.xButton.hide(0);
120
+ const renderer = this.get("renderer");
121
+ this._firstDataItem = this.makeDataItem({ cellSize: 0.0001 });
122
+ const tick = renderer.makeTick(this._firstDataItem, []);
123
+ tick.set("dy", 0.5);
124
+ const grid = renderer.makeGrid(this._firstDataItem, []);
125
+ grid.set("dy", 0.5);
126
+ this.labelsContainer.setAll({
127
+ maskContent: true
128
+ });
129
+ const resizer = this.children.push(Rectangle.new(this._root, {
130
+ themeTags: ["axisresizer"]
131
+ }));
132
+ resizer.events.on("pointerdown", (e) => {
133
+ this._downX = this.toLocal(e.point).x;
134
+ this._downW = this.width();
135
+ });
136
+ resizer.events.on("globalpointermove", (e) => {
137
+ if (this._downX !== undefined) {
138
+ const point = this.toLocal(e.point);
139
+ const dy = point.x - this._downX;
140
+ if (this._downW !== undefined) {
141
+ let newWidth = this._downW + dy;
142
+ newWidth = Math.max(newWidth, this.get("minWidth", 100));
143
+ this.labelsContainer.set("width", newWidth);
144
+ }
145
+ }
146
+ });
147
+ resizer.events.on("globalpointerup", () => {
148
+ this._downX = undefined;
149
+ });
150
+ const containersTemplate = renderer.containers.template;
151
+ containersTemplate.events.on("dragged", (e) => {
152
+ var _a, _b;
153
+ this.xButton.hide(0);
154
+ // get all columns from series of this category and move them together
155
+ const dataItem = e.target.dataItem;
156
+ const container = e.target;
157
+ if (dataItem) {
158
+ const deltaPosition = (e.target.y() - startY) / this.chart.plotContainer.height() * (this.get("end", 1) - this.get("start", 0));
159
+ dataItem.set("deltaPosition", deltaPosition);
160
+ // dragg all children together
161
+ const updateDeltaPositionRecursively = (dataItem, deltaPosition) => {
162
+ const children = dataItem.get("children");
163
+ if (children) {
164
+ $array.each(children, (child) => {
165
+ child.set("deltaPosition", deltaPosition);
166
+ updateDeltaPositionRecursively(child, deltaPosition);
167
+ });
168
+ }
169
+ };
170
+ updateDeltaPositionRecursively(dataItem, deltaPosition);
171
+ const tick = dataItem.get("tick");
172
+ const grid = dataItem.get("grid");
173
+ const dy = Math.ceil(startY - container.y());
174
+ if (tick) {
175
+ const children = dataItem.get("children");
176
+ if (!children || children.length == 0) {
177
+ tick.set("dy", dy);
178
+ if (grid) {
179
+ grid.set("dy", dy);
180
+ }
181
+ }
182
+ const y = container.y();
183
+ // Check if y is close to other containers and apply hover state
184
+ const allContainers = renderer.containers;
185
+ if (this._makeChildOf) {
186
+ (_b = (_a = this._makeChildOf.get("container")) === null || _a === void 0 ? void 0 : _a.get("background")) === null || _b === void 0 ? void 0 : _b.unhover();
187
+ }
188
+ this._makeChildOf = undefined;
189
+ for (let i = 0; i < allContainers.length; i++) {
190
+ const otherContainer = allContainers.getIndex(i);
191
+ if (otherContainer && otherContainer.isVisible() && otherContainer !== container) {
192
+ const otherDataItem = otherContainer.dataItem;
193
+ if (otherDataItem.get("cellSize", 0) > 0) {
194
+ // Check if otherDataItem is already a child of the dragged item's container
195
+ const otherChildren = otherDataItem.get("children");
196
+ if (otherChildren) {
197
+ if (otherChildren.indexOf(dataItem) !== -1) {
198
+ continue; // Skip if the dragged item is already a child of the other item
199
+ }
200
+ }
201
+ const background = otherContainer.get("background");
202
+ if (background) {
203
+ const otherY = otherContainer.y();
204
+ if (Math.abs((y + container.height() / 2) - (otherY + otherContainer.height() / 2)) < 5) {
205
+ background.hover();
206
+ this._makeChildOf = otherDataItem;
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }
212
+ if (!this._makeChildOf) {
213
+ if (this._previousTick) {
214
+ this._previousTick.states.applyAnimate("default");
215
+ this._previousTick = undefined;
216
+ }
217
+ let closestDataItem;
218
+ let closestDistance = Infinity;
219
+ //find closest tick
220
+ for (let i = renderer.ticks.length; i >= 0; i--) {
221
+ const t = renderer.ticks.getIndex(i);
222
+ if (t && tick.isVisible()) {
223
+ const dataItem = t.dataItem;
224
+ if (dataItem) {
225
+ const index = dataItem.get("index", 0);
226
+ if (index >= this.startIndex() && index <= this.endIndex()) {
227
+ if (dataItem.get("cellSize", 0) == 0) {
228
+ continue; // Skip if the other item is collapsed
229
+ }
230
+ // recursively check if dataItem is not a child of the dragged item
231
+ let isChild = false;
232
+ let parent = dataItem.get("parent");
233
+ while (parent) {
234
+ if (parent === dataItem) {
235
+ isChild = true;
236
+ break;
237
+ }
238
+ parent = parent.get("parent");
239
+ }
240
+ if (isChild) {
241
+ continue;
242
+ }
243
+ const distance = Math.abs(t.y() + t.get("dy", 0) - y - container.height() / 2);
244
+ if (distance < closestDistance) {
245
+ closestDistance = distance;
246
+ closestDataItem = t.dataItem;
247
+ }
248
+ }
249
+ }
250
+ }
251
+ }
252
+ if (Math.abs(dy) < 10) {
253
+ closestDataItem = undefined;
254
+ this._insertAfter = undefined;
255
+ }
256
+ if (closestDataItem && closestDataItem !== dataItem) {
257
+ // also check if closestDataItem is not a child of the dragged item
258
+ let isChild = false;
259
+ let parent = closestDataItem.get("parent");
260
+ while (parent) {
261
+ if (parent === dataItem) {
262
+ isChild = true;
263
+ break;
264
+ }
265
+ parent = parent.get("parent");
266
+ }
267
+ if (isChild) {
268
+ return;
269
+ }
270
+ // color tick
271
+ const tick = closestDataItem.get("tick");
272
+ if (tick) {
273
+ tick.hover();
274
+ this._previousTick = tick;
275
+ }
276
+ this._insertAfter = closestDataItem;
277
+ }
278
+ }
279
+ else {
280
+ if (this._previousTick) {
281
+ this._previousTick.unhover();
282
+ this._previousTick = undefined;
283
+ }
284
+ }
285
+ }
286
+ }
287
+ });
288
+ containersTemplate.events.on("dragstop", (e) => {
289
+ var _a, _b;
290
+ this._draggedItem = e.target.dataItem;
291
+ this._sortCategoryAxis();
292
+ if (this._makeChildOf) {
293
+ (_b = (_a = this._makeChildOf.get("container")) === null || _a === void 0 ? void 0 : _a.get("background")) === null || _b === void 0 ? void 0 : _b.unhover();
294
+ if (this._makeChildOf.get("collapsed")) {
295
+ this.toggleCollapse(this._makeChildOf, true);
296
+ }
297
+ this._updateCellSizes();
298
+ }
299
+ // disable interactivity of all containers
300
+ const renderer = this.get("renderer");
301
+ renderer.containers.each((container) => {
302
+ container.set("forceInactive", false);
303
+ });
304
+ });
305
+ let startY = 0;
306
+ containersTemplate.events.on("dragstart", (e) => {
307
+ // disable interactivity of all containers
308
+ const renderer = this.get("renderer");
309
+ renderer.containers.each((container) => {
310
+ container.set("forceInactive", true);
311
+ });
312
+ startY = e.target.y();
313
+ });
314
+ }
315
+ _changed() {
316
+ super._changed();
317
+ if (this.isDirty("selectedDataItem")) {
318
+ this.selectDataItem(this.get("selectedDataItem"));
319
+ }
320
+ }
321
+ _processBullet(dataItem) {
322
+ var _a, _b, _c;
323
+ super._processBullet(dataItem);
324
+ const parent = dataItem.get("parent");
325
+ if (parent && parent.get("collapsed")) {
326
+ (_a = dataItem.get("container")) === null || _a === void 0 ? void 0 : _a.hide();
327
+ (_b = dataItem.get("tick")) === null || _b === void 0 ? void 0 : _b.hide();
328
+ (_c = dataItem.get("grid")) === null || _c === void 0 ? void 0 : _c.hide();
329
+ dataItem.set("finalCellSize", 0);
330
+ }
331
+ }
332
+ _updateChildren() {
333
+ super._updateChildren();
334
+ if (this._dataChanged) {
335
+ $array.each(this.dataItems, (dataItem) => {
336
+ var _a;
337
+ const parentId = dataItem.get("parentId");
338
+ if (!parentId) {
339
+ let fill = dataItem.get("customColor", dataItem.get("color"));
340
+ const dataContext = dataItem.dataContext;
341
+ if (fill === undefined && dataContext && dataContext.color !== undefined) {
342
+ fill = color(dataContext.color);
343
+ }
344
+ if (!fill) {
345
+ fill = (_a = this.gantt) === null || _a === void 0 ? void 0 : _a._nextColor();
346
+ }
347
+ dataItem.setRaw("color", fill);
348
+ }
349
+ });
350
+ $array.each(this.dataItems, (dataItem) => {
351
+ const parentId = dataItem.get("parentId");
352
+ if (parentId) {
353
+ // Find the parent data item by category
354
+ const parent = this.getDataItemById(parentId);
355
+ if (parent) {
356
+ dataItem.setRaw("parent", parent);
357
+ dataItem.setRaw("cellSize", Math.pow(this.get("childCellSize", 1), this._getItemDepth(dataItem)));
358
+ dataItem.setRaw("finalCellSize", dataItem.get("cellSize"));
359
+ let fill = dataItem.get("customColor", dataItem.get("color"));
360
+ const dataContext = dataItem.dataContext;
361
+ if (fill === undefined && dataContext && dataContext.color !== undefined) {
362
+ fill = color(dataContext.color);
363
+ }
364
+ if (fill == undefined) {
365
+ dataItem.setRaw("color", parent.get("customColor", parent.get("color")));
366
+ }
367
+ else {
368
+ dataItem.setRaw("color", fill);
369
+ }
370
+ let children = parent.get("children");
371
+ if (!children) {
372
+ children = [];
373
+ parent.set("children", children);
374
+ }
375
+ $array.move(children, dataItem);
376
+ }
377
+ }
378
+ else {
379
+ dataItem.setRaw("cellSize", 1);
380
+ dataItem.setRaw("finalCellSize", 1);
381
+ }
382
+ });
383
+ $array.each(this.dataItems, (dataItem) => {
384
+ this.toggleCollapse(dataItem, dataItem.get("collapsed", false), 0);
385
+ });
386
+ }
387
+ if (this._treeDirty) {
388
+ this._updateTree();
389
+ }
390
+ const renderer = this.get("renderer");
391
+ const firstDataItem = this._firstDataItem;
392
+ if (firstDataItem) {
393
+ renderer.updateTick(firstDataItem.get("tick"), 0);
394
+ renderer.updateGrid(firstDataItem.get("grid"), 0);
395
+ }
396
+ $array.each(this.dataItems, (dataItem) => {
397
+ const progressPie = dataItem.get("progressPie");
398
+ if (progressPie) {
399
+ const progress = dataItem.get("progress", 0);
400
+ progressPie.set("value", progress);
401
+ const color = dataItem.get("customColor", dataItem.get("color"));
402
+ dataItem.dataContext.color = color === null || color === void 0 ? void 0 : color.toString();
403
+ progressPie.slice.set("fill", color);
404
+ progressPie.backgroundSlice.set("fill", color);
405
+ progressPie.label.set("fill", color);
406
+ }
407
+ const cellSize = dataItem.get("cellSize", 1);
408
+ const container = dataItem.get("container");
409
+ if (container) {
410
+ if (cellSize < 0.0001) {
411
+ container.setPrivate("visible", false);
412
+ }
413
+ else {
414
+ container.setPrivate("visible", true);
415
+ }
416
+ const index = dataItem.get("index", 0);
417
+ const p0 = this.indexToPosition(index, 0);
418
+ const p1 = this.indexToPosition(index, 1);
419
+ const y0 = renderer.positionToCoordinate(p0);
420
+ const y1 = renderer.positionToCoordinate(p1);
421
+ container.set("height", Math.abs(y1 - y0));
422
+ }
423
+ });
424
+ }
425
+ _clearDirty() {
426
+ super._clearDirty();
427
+ this._treeDirty = false;
428
+ }
429
+ getSeriesDataItem(dataItem) {
430
+ if (dataItem.get("seriesDataItem")) {
431
+ return dataItem.get("seriesDataItem");
432
+ }
433
+ const gantt = this.gantt;
434
+ if (gantt) {
435
+ const di = gantt.series.getDataItemById(dataItem.get("id"));
436
+ if (di) {
437
+ dataItem.set("seriesDataItem", di);
438
+ return di;
439
+ }
440
+ }
441
+ }
442
+ /**
443
+ * Zooms the axis to relative locations.
444
+ *
445
+ * Both `start` and `end` are relative: 0 means start of the axis, 1 - end.
446
+ *
447
+ * @param start Relative start
448
+ * @param end Relative end
449
+ * @param duration Duration of the zoom animation in milliseconds
450
+ * @return Zoom animation
451
+ */
452
+ zoom(start, end, duration) {
453
+ if (this.get("zoomable", true)) {
454
+ this._updateFinals(start, end);
455
+ if (this.get("start") !== start || this.get("end") != end) {
456
+ let sAnimation = this._sAnimation;
457
+ let eAnimation = this._eAnimation;
458
+ if (start > end) {
459
+ [start, end] = [end, start];
460
+ }
461
+ let maxDeviation = this.get("maxDeviation", 0.5) * Math.min(1, (end - start));
462
+ if (start < -maxDeviation) {
463
+ start = -maxDeviation;
464
+ }
465
+ if (end > 1 + maxDeviation) {
466
+ end = 1 + maxDeviation;
467
+ }
468
+ if (!$type.isNumber(duration)) {
469
+ duration = this.get("interpolationDuration", 0);
470
+ }
471
+ if (((sAnimation && sAnimation.playing && sAnimation.to == start) || this.get("start") == start) && ((eAnimation && eAnimation.playing && eAnimation.to == end) || this.get("end") == end)) {
472
+ return;
473
+ }
474
+ if (duration > 0) {
475
+ let easing = this.get("interpolationEasing");
476
+ let sAnimation, eAnimation;
477
+ if (this.get("start") != start) {
478
+ sAnimation = this.animate({ key: "start", to: start, duration: duration, easing: easing });
479
+ }
480
+ if (this.get("end") != end) {
481
+ eAnimation = this.animate({ key: "end", to: end, duration: duration, easing: easing });
482
+ }
483
+ this._sAnimation = sAnimation;
484
+ this._eAnimation = eAnimation;
485
+ if (sAnimation) {
486
+ return sAnimation;
487
+ }
488
+ else if (eAnimation) {
489
+ return eAnimation;
490
+ }
491
+ }
492
+ else {
493
+ this.set("start", start);
494
+ this.set("end", end);
495
+ this.root.events.once("frameended", () => {
496
+ this.markDirtyKey("start");
497
+ });
498
+ }
499
+ }
500
+ else {
501
+ if (this._sAnimation) {
502
+ this._sAnimation.stop();
503
+ }
504
+ if (this._eAnimation) {
505
+ this._eAnimation.stop();
506
+ }
507
+ }
508
+ }
509
+ }
510
+ _afterDataChange() {
511
+ super._afterDataChange();
512
+ const chart = this.chart;
513
+ if (chart) {
514
+ const availableHeight = chart.plotContainer.height();
515
+ const minCellHeight = this.get("minCellHeight", 70);
516
+ const maxZoomCount = Math.floor(availableHeight / minCellHeight);
517
+ this.set("maxZoomCount", maxZoomCount);
518
+ this.set("minZoomCount", maxZoomCount);
519
+ // to avoid many items to be drawn
520
+ if (this.get("start") == 0 && this.get("end") == 1) {
521
+ this.zoomToIndexes(0, maxZoomCount);
522
+ if (this._dataChangeDp) {
523
+ this._dataChangeDp.dispose();
524
+ }
525
+ this._dataChangeDp = this.root.events.once("frameended", () => {
526
+ this.adjustZoom();
527
+ });
528
+ }
529
+ }
530
+ }
531
+ markDirtyTree() {
532
+ this._treeDirty = true;
533
+ this.markDirty();
534
+ }
535
+ _sortCategoryAxis() {
536
+ var _a;
537
+ let insertAfter = this._insertAfter;
538
+ const draggedItem = this._draggedItem;
539
+ if (this._previousTick) {
540
+ this._previousTick.states.applyAnimate("default");
541
+ this._previousTick = undefined;
542
+ }
543
+ if (!draggedItem) {
544
+ return;
545
+ }
546
+ const currentParent = draggedItem.get("parent");
547
+ const currentDepth = this._getItemDepth(draggedItem);
548
+ if (this._makeChildOf) {
549
+ if (this._makeChildOf && draggedItem !== this._makeChildOf) {
550
+ draggedItem.set("parent", this._makeChildOf);
551
+ let children = this._makeChildOf.get("children");
552
+ if (!children) {
553
+ children = this._makeChildOf.set("children", []);
554
+ }
555
+ if (children && !children.includes(draggedItem)) {
556
+ children.unshift(draggedItem);
557
+ }
558
+ // assign parent color to dragged item if it doesn't have custom color
559
+ if (!draggedItem.get("customColor")) {
560
+ const parentColor = this._makeChildOf.get("customColor", this._makeChildOf.get("color"));
561
+ draggedItem.setRaw("color", parentColor);
562
+ }
563
+ const parentSeriesDataItem = this.getSeriesDataItem(this._makeChildOf);
564
+ if (parentSeriesDataItem) {
565
+ parentSeriesDataItem.setAll({
566
+ openValueX: undefined,
567
+ valueX: undefined,
568
+ duration: draggedItem.get("duration", 0),
569
+ });
570
+ }
571
+ }
572
+ insertAfter = this._makeChildOf;
573
+ }
574
+ else if (insertAfter && draggedItem !== insertAfter) {
575
+ const childrenOfInsertAfter = insertAfter.get("children");
576
+ const parentOfInsertAfter = insertAfter.get("parent");
577
+ // if insertAfter has children
578
+ if (childrenOfInsertAfter && childrenOfInsertAfter.length > 0 && !insertAfter.get("collapsed", false)) {
579
+ // make it child of insertAfter
580
+ draggedItem.set("parent", insertAfter);
581
+ }
582
+ else {
583
+ // if insertAfter has parent
584
+ if (parentOfInsertAfter) {
585
+ const childrenOfParentOfInsertAfter = parentOfInsertAfter.get("children");
586
+ if (childrenOfParentOfInsertAfter) {
587
+ const lastChild = childrenOfParentOfInsertAfter[childrenOfParentOfInsertAfter.length - 1];
588
+ // if insertAfter is last child of its parent, o not change parent of dragged item
589
+ if (insertAfter == lastChild) {
590
+ // if it is already child of parentOfInsertAfter, do not change parent
591
+ if (draggedItem.get("parent") === parentOfInsertAfter) {
592
+ }
593
+ else {
594
+ // get children of one level up
595
+ const nextParent = parentOfInsertAfter.get("parent");
596
+ if (nextParent) {
597
+ const nextChildren = nextParent.get("children");
598
+ if (nextChildren) {
599
+ draggedItem.set("parent", nextParent);
600
+ }
601
+ }
602
+ else {
603
+ if (draggedItem.get("parent") !== undefined) {
604
+ draggedItem.set("parent", undefined);
605
+ this._setNewColor(draggedItem);
606
+ }
607
+ }
608
+ }
609
+ }
610
+ else {
611
+ if (childrenOfInsertAfter && !insertAfter.get("collapsed", false)) {
612
+ draggedItem.set("parent", insertAfter);
613
+ }
614
+ else {
615
+ draggedItem.set("parent", parentOfInsertAfter);
616
+ }
617
+ }
618
+ }
619
+ }
620
+ else {
621
+ // if insertAfter has no parent, do not change parent of dragged item
622
+ if (draggedItem.get("parent") !== undefined) {
623
+ draggedItem.set("parent", undefined);
624
+ this._setNewColor(draggedItem);
625
+ }
626
+ }
627
+ }
628
+ const newParent = draggedItem.get("parent");
629
+ if (newParent) {
630
+ // assign parent color to dragged item if it doesn't have custom color
631
+ if (!draggedItem.get("customColor")) {
632
+ const parentColor = newParent.get("customColor", newParent.get("color"));
633
+ draggedItem.setRaw("color", parentColor);
634
+ }
635
+ const newParentChildren = newParent.get("children");
636
+ if (newParentChildren) {
637
+ if (newParentChildren.indexOf(insertAfter) !== -1) {
638
+ $array.move(newParentChildren, draggedItem, newParentChildren.indexOf(insertAfter) + 1);
639
+ }
640
+ else {
641
+ if (newParent == insertAfter) {
642
+ newParentChildren.unshift(draggedItem);
643
+ }
644
+ else {
645
+ newParentChildren.push(draggedItem);
646
+ }
647
+ }
648
+ }
649
+ }
650
+ }
651
+ // remove from current parent children
652
+ if (currentParent && currentParent != draggedItem.get("parent")) {
653
+ const currentChildren = currentParent.get("children");
654
+ if (currentChildren) {
655
+ const index = currentChildren.indexOf(draggedItem);
656
+ if (index !== -1) {
657
+ $array.remove(currentChildren, draggedItem);
658
+ }
659
+ }
660
+ }
661
+ if (insertAfter) {
662
+ const insertAfterIndex = this.dataItems.indexOf(insertAfter);
663
+ const currentIndex = this.dataItems.indexOf(draggedItem);
664
+ const updateChildrenIndexes = (dataItem, index) => {
665
+ if (currentIndex >= insertAfterIndex) {
666
+ index++;
667
+ $array.move(this.dataItems, dataItem, index);
668
+ const children = dataItem.get("children");
669
+ if (children) {
670
+ $array.eachReverse(children, (child) => {
671
+ updateChildrenIndexes(child, index);
672
+ });
673
+ }
674
+ }
675
+ else {
676
+ $array.move(this.dataItems, dataItem, index);
677
+ const children = dataItem.get("children");
678
+ if (children) {
679
+ $array.each(children, (child) => {
680
+ updateChildrenIndexes(child, index);
681
+ });
682
+ }
683
+ }
684
+ };
685
+ if (this._getItemDepth(draggedItem) != currentDepth) {
686
+ const seriesDataItem = this.getSeriesDataItem(draggedItem);
687
+ if (seriesDataItem) {
688
+ (_a = this.gantt) === null || _a === void 0 ? void 0 : _a.series.disposeLinks(seriesDataItem);
689
+ }
690
+ }
691
+ updateChildrenIndexes(draggedItem, insertAfterIndex);
692
+ }
693
+ this.markDirtyTree();
694
+ const easing = this.get("interpolationEasing");
695
+ const duration = this.get("interpolationDuration", 0);
696
+ $array.each(this.dataItems, (axisItem, index) => {
697
+ var _a, _b;
698
+ const container = axisItem.get("container");
699
+ if (container) {
700
+ let currentPosition = this.coordinateToPosition(container.y() + container.height() / 2);
701
+ let newPosition = this.indexToPosition(index) - axisItem.get("deltaPosition", 0);
702
+ let deltaPosition = newPosition - currentPosition;
703
+ axisItem.set("deltaPosition", -deltaPosition);
704
+ axisItem.animate({ key: "deltaPosition", to: 0, duration: duration, easing: easing });
705
+ (_a = axisItem.get("tick")) === null || _a === void 0 ? void 0 : _a.animate({ key: "dy", to: 0, duration: duration, easing: easing });
706
+ (_b = axisItem.get("grid")) === null || _b === void 0 ? void 0 : _b.animate({ key: "dy", to: 0, duration: duration, easing: easing });
707
+ }
708
+ });
709
+ }
710
+ _setNewColor(dataItem, color) {
711
+ var _a;
712
+ if (!color) {
713
+ color = (_a = this.gantt) === null || _a === void 0 ? void 0 : _a._nextColor();
714
+ }
715
+ dataItem.set("color", color);
716
+ const children = dataItem.get("children");
717
+ if (children && children.length > 0) {
718
+ $array.each(children, (child) => {
719
+ this._setNewColor(child, color);
720
+ });
721
+ }
722
+ }
723
+ _updateTree() {
724
+ const gantt = this.gantt;
725
+ if (gantt) {
726
+ $array.each(gantt.series.dataItems, (seriesDataItem) => {
727
+ seriesDataItem.set("children", []);
728
+ seriesDataItem.set("parent", undefined);
729
+ });
730
+ $array.each(this.dataItems, (dataItem) => {
731
+ const parent = dataItem.get("parent");
732
+ if (parent) {
733
+ const id = dataItem.get("id");
734
+ const parentId = parent.get("id");
735
+ const seriesDataItem = gantt.series.getDataItemById(id);
736
+ dataItem.set("parentId", parentId);
737
+ const parentSeriesDataItem = gantt.series.getDataItemById(parentId);
738
+ if (seriesDataItem) {
739
+ if (parentSeriesDataItem) {
740
+ seriesDataItem.set("parent", parentSeriesDataItem);
741
+ let children = parentSeriesDataItem.get("children", []);
742
+ $array.move(children, seriesDataItem);
743
+ }
744
+ }
745
+ }
746
+ });
747
+ // hide grips for those with children
748
+ $array.each(gantt.series.dataItems, (seriesDataItem) => {
749
+ const children = seriesDataItem.get("children");
750
+ const startGrip = seriesDataItem.get("startGrip");
751
+ const endGrip = seriesDataItem.get("endGrip");
752
+ if (startGrip && endGrip) {
753
+ if (!children || children.length === 0) {
754
+ startGrip.set("forceHidden", false);
755
+ endGrip.set("forceHidden", false);
756
+ }
757
+ else {
758
+ startGrip.set("forceHidden", true);
759
+ endGrip.set("forceHidden", true);
760
+ }
761
+ }
762
+ });
763
+ this.data.values.length = 0;
764
+ gantt.series.data.values.length = 0;
765
+ $array.each(this.dataItems, (dataItem, index) => {
766
+ dataItem.setRaw("index", index);
767
+ this.data.values.push(dataItem.dataContext);
768
+ const seriesDataItem = this.getSeriesDataItem(dataItem);
769
+ if (seriesDataItem) {
770
+ gantt.series.data.values.push(seriesDataItem === null || seriesDataItem === void 0 ? void 0 : seriesDataItem.dataContext);
771
+ $array.move(gantt.series.dataItems, seriesDataItem);
772
+ }
773
+ });
774
+ this._updateCellSizes(); // all bullets exept the first one
775
+ $array.each(this.dataItems, (dataItem) => {
776
+ this._updateBullet(dataItem);
777
+ });
778
+ }
779
+ }
780
+ _updateCellSizes(duration) {
781
+ $array.each(this.dataItems, (dataItem) => {
782
+ if (duration === undefined) {
783
+ duration = this.get("interpolationDuration", 0);
784
+ }
785
+ const depth = this._getItemDepth(dataItem);
786
+ let cellSize = this.get("childCellSize", 1);
787
+ const parent = dataItem.get("parent");
788
+ if (parent && parent.get("collapsed", false)) {
789
+ cellSize = 0;
790
+ }
791
+ cellSize = Math.pow(cellSize, depth);
792
+ if (dataItem.get("deleting")) {
793
+ cellSize = 0;
794
+ }
795
+ //dataItem.set("cellSize", cellSize);
796
+ if (dataItem.get("cellSize", 1) != cellSize) {
797
+ dataItem.set("finalCellSize", cellSize);
798
+ dataItem.animate({ key: "cellSize", to: cellSize, duration: duration, easing: this.get("interpolationEasing") });
799
+ }
800
+ });
801
+ if (this._dataChangeDp) {
802
+ this._dataChangeDp.dispose();
803
+ }
804
+ this._dataChangeDp = this.root.events.once("frameended", () => {
805
+ this.adjustZoom();
806
+ });
807
+ }
808
+ _updateBullet(dataItem) {
809
+ const taskBullet = dataItem.get("taskBullet");
810
+ if (taskBullet) {
811
+ const depth = this._getItemDepth(dataItem);
812
+ const children = dataItem.get("children");
813
+ taskBullet.setAll({
814
+ marginLeft: this.get("childShift", 20) * depth
815
+ });
816
+ const collapsed = dataItem.get("collapsed", false);
817
+ const icon = taskBullet.get("icon");
818
+ let hasChildren = false;
819
+ if (children && children.length > 0) {
820
+ hasChildren = true;
821
+ }
822
+ if (icon) {
823
+ if (hasChildren) {
824
+ taskBullet.set("disabled", false);
825
+ this.root.events.once("frameended", () => {
826
+ taskBullet.set("active", !collapsed);
827
+ });
828
+ }
829
+ else {
830
+ taskBullet.set("disabled", true);
831
+ }
832
+ }
833
+ }
834
+ }
835
+ /**
836
+ * Toggles collapse state of a data item.
837
+ * @param dataItem
838
+ * @param collapse
839
+ * @param duration
840
+ */
841
+ toggleCollapse(dataItem, collapse, duration) {
842
+ if (dataItem && dataItem.get("collapsed", false) !== collapse) {
843
+ const children = dataItem.get("children");
844
+ dataItem.set("collapsed", collapse);
845
+ if (children && children.length > 0) {
846
+ $array.each(children, (child) => {
847
+ const container = child.get("container");
848
+ const grid = child.get("grid");
849
+ const tick = child.get("tick");
850
+ if (container) {
851
+ if (collapse) {
852
+ container.hide();
853
+ grid.hide();
854
+ tick.hide();
855
+ }
856
+ else {
857
+ container.show();
858
+ grid.show();
859
+ tick.show();
860
+ }
861
+ }
862
+ const gantt = this.gantt;
863
+ if (gantt && gantt.series) {
864
+ const series = gantt.series;
865
+ const seriesDataItem = series.dataItems.find((item) => item.get("categoryY") === child.get("category"));
866
+ if (seriesDataItem) {
867
+ if (collapse) {
868
+ seriesDataItem.hide();
869
+ }
870
+ else {
871
+ seriesDataItem.show();
872
+ }
873
+ }
874
+ }
875
+ this.toggleCollapse(child, collapse, duration);
876
+ });
877
+ }
878
+ this._updateBullet(dataItem);
879
+ if (this._updDP) {
880
+ this._updDP.dispose();
881
+ }
882
+ this._updDP = this.root.events.once("frameended", () => {
883
+ this._updateCellSizes(duration);
884
+ });
885
+ }
886
+ }
887
+ /**
888
+ * Expands all categories in the axis.
889
+ */
890
+ expandAll() {
891
+ $array.each(this.dataItems, (dataItem) => {
892
+ if (dataItem.get("collapsed", false)) {
893
+ this.toggleCollapse(dataItem, false);
894
+ }
895
+ });
896
+ }
897
+ /**
898
+ * Collapses all categories in the axis.
899
+ */
900
+ collapseAll() {
901
+ $array.each(this.dataItems, (dataItem) => {
902
+ if (!dataItem.get("collapsed", false)) {
903
+ this.toggleCollapse(dataItem, true);
904
+ }
905
+ });
906
+ }
907
+ /**
908
+ * Deletes all data items from the axis.
909
+ */
910
+ deleteAll() {
911
+ var _a;
912
+ this.data.clear();
913
+ (_a = this.gantt) === null || _a === void 0 ? void 0 : _a.series.data.clear();
914
+ this.selectDataItem(undefined);
915
+ }
916
+ /**
917
+ * Deletes a data item from the axis.
918
+ *
919
+ * @param dataItem Data item to delete
920
+ */
921
+ deleteDataItem(dataItem, child) {
922
+ var _a;
923
+ const series = (_a = this.gantt) === null || _a === void 0 ? void 0 : _a.series;
924
+ const children = dataItem.get("children");
925
+ if (children && children.length > 0) {
926
+ for (let i = children.length - 1; i >= 0; i--) {
927
+ this.deleteDataItem(children[i], true);
928
+ }
929
+ }
930
+ dataItem.set("deleting", true);
931
+ if (!child) {
932
+ this._updateCellSizes();
933
+ }
934
+ const container = dataItem.get("container");
935
+ if (container) {
936
+ const promise = container.hide();
937
+ promise.then(() => {
938
+ if (series && seriesDataItem) {
939
+ series.setPrivate("minX", undefined);
940
+ series.setPrivate("maxX", undefined);
941
+ series.data.removeValue(seriesDataItem.dataContext);
942
+ }
943
+ this.data.removeValue(dataItem.dataContext);
944
+ });
945
+ }
946
+ let seriesDataItem;
947
+ if (series) {
948
+ seriesDataItem = this.getSeriesDataItem(dataItem);
949
+ if (seriesDataItem) {
950
+ seriesDataItem.hide();
951
+ }
952
+ }
953
+ }
954
+ /**
955
+ * Toggles progress pie for a data item. Toggling means that progress pie
956
+ * will animate to 1 if it was less than 1, or animate to previous progress
957
+ * value if it was 1.
958
+ *
959
+ * @param dataItem Data item to toggle progress pie for
960
+ */
961
+ toggleProgressPie(dataItem, value) {
962
+ if (dataItem) {
963
+ const children = dataItem.get("children");
964
+ if (children && children.length > 0) {
965
+ const currentValue = dataItem.get("progress", 0);
966
+ let toValue = undefined;
967
+ if (currentValue !== 1) {
968
+ toValue = 1;
969
+ }
970
+ $array.each(children, (child) => {
971
+ this.toggleProgressPie(child, toValue);
972
+ });
973
+ }
974
+ else {
975
+ const seriesDataItem = this.getSeriesDataItem(dataItem);
976
+ if (seriesDataItem) {
977
+ const progress = seriesDataItem.get("progress", 0);
978
+ const prevProgress = seriesDataItem.get("prevProgress", 0);
979
+ let toProgress = 1;
980
+ if (progress == 1 && prevProgress != undefined) {
981
+ toProgress = prevProgress;
982
+ }
983
+ if (value !== undefined) {
984
+ toProgress = value;
985
+ }
986
+ seriesDataItem.set("prevProgress", progress);
987
+ seriesDataItem.animate({
988
+ key: "progress",
989
+ to: toProgress,
990
+ duration: this.get("interpolationDuration", 0), easing: this.get("interpolationEasing")
991
+ });
992
+ }
993
+ }
994
+ }
995
+ }
996
+ /**
997
+ * Sets a custom color for a data item.
998
+ *
999
+ * @param dataItem Data item to set color for
1000
+ * @param c Color to set
1001
+ */
1002
+ setDataItemColor(dataItem, c) {
1003
+ var _a;
1004
+ if (dataItem) {
1005
+ const cc = dataItem.get("color");
1006
+ if (c && cc && c.hex === cc.hex) {
1007
+ c = undefined;
1008
+ }
1009
+ dataItem.set("customColor", c);
1010
+ // children
1011
+ const children = dataItem.get("children");
1012
+ if (children && children.length > 0) {
1013
+ $array.each(children, (child) => {
1014
+ this.setDataItemColor(child, c);
1015
+ });
1016
+ }
1017
+ (_a = this.gantt) === null || _a === void 0 ? void 0 : _a.series.markDirtyValues();
1018
+ }
1019
+ }
1020
+ /**
1021
+ * Hides axis's data item.
1022
+ *
1023
+ * @param dataItem Data item
1024
+ * @param duration Animation duration in milliseconds
1025
+ * @return Promise
1026
+ */
1027
+ hideDataItem(dataItem) {
1028
+ const _super = Object.create(null, {
1029
+ hideDataItem: { get: () => super.hideDataItem }
1030
+ });
1031
+ return __awaiter(this, void 0, void 0, function* () {
1032
+ const promise = _super.hideDataItem.call(this, dataItem);
1033
+ const container = dataItem.get("container");
1034
+ if (container) {
1035
+ container.hide();
1036
+ }
1037
+ return promise;
1038
+ });
1039
+ }
1040
+ /**
1041
+ * Shows axis's data item.
1042
+ *
1043
+ * @param dataItem Data item
1044
+ * @param duration Animation duration in milliseconds
1045
+ * @return Promise
1046
+ */
1047
+ showDataItem(dataItem) {
1048
+ const _super = Object.create(null, {
1049
+ showDataItem: { get: () => super.showDataItem }
1050
+ });
1051
+ return __awaiter(this, void 0, void 0, function* () {
1052
+ const promise = _super.showDataItem.call(this, dataItem);
1053
+ const container = dataItem.get("container");
1054
+ if (container) {
1055
+ container.show();
1056
+ }
1057
+ return promise;
1058
+ });
1059
+ }
1060
+ _toggleFHDataItem(dataItem, forceHidden) {
1061
+ const fh = "forceHidden";
1062
+ const container = dataItem.get("container");
1063
+ if (container) {
1064
+ container.set(fh, forceHidden);
1065
+ }
1066
+ }
1067
+ _toggleDataItem(dataItem, visible) {
1068
+ super._toggleDataItem(dataItem, visible);
1069
+ const container = dataItem.get("container");
1070
+ if (container) {
1071
+ container.set("visible", visible);
1072
+ }
1073
+ }
1074
+ /**
1075
+ * Disposes a data item.
1076
+ *
1077
+ * @param dataItem Data item to dispose
1078
+ */
1079
+ disposeDataItem(dataItem) {
1080
+ super.disposeDataItem(dataItem);
1081
+ // remove all elements
1082
+ const renderer = this.get("renderer");
1083
+ const container = dataItem.get("container");
1084
+ if (container) {
1085
+ renderer.containers.removeValue(container);
1086
+ container.dispose();
1087
+ }
1088
+ // progress pie
1089
+ const progressPie = dataItem.get("progressPie");
1090
+ if (progressPie) {
1091
+ renderer.progressPies.removeValue(progressPie);
1092
+ progressPie.dispose();
1093
+ }
1094
+ // grips
1095
+ const grip = dataItem.get("grip");
1096
+ if (grip) {
1097
+ renderer.grips.removeValue(grip);
1098
+ grip.dispose();
1099
+ }
1100
+ // duration stepper
1101
+ const durationStepper = dataItem.get("durationStepper");
1102
+ if (durationStepper) {
1103
+ renderer.durationSteppers.removeValue(durationStepper);
1104
+ durationStepper.dispose();
1105
+ }
1106
+ // task bullet
1107
+ const taskBullet = dataItem.get("taskBullet");
1108
+ if (taskBullet) {
1109
+ renderer.taskBullets.removeValue(taskBullet);
1110
+ taskBullet.dispose();
1111
+ }
1112
+ const parent = dataItem.get("parent");
1113
+ if (parent) {
1114
+ const children = parent.get("children");
1115
+ if (children) {
1116
+ $array.remove(children, dataItem);
1117
+ }
1118
+ this._updateBullet(parent);
1119
+ }
1120
+ this._updateCellSizes();
1121
+ }
1122
+ /**
1123
+ * Selects a data item and shows the delete button. If the data item is
1124
+ * already selected, it will unselect it.
1125
+ *
1126
+ * @param dataItem Data item to select
1127
+ */
1128
+ selectDataItem(dataItem) {
1129
+ var _a, _b;
1130
+ if (!((_a = this.gantt) === null || _a === void 0 ? void 0 : _a.get("editable", true))) {
1131
+ return;
1132
+ }
1133
+ if (dataItem === this.get("selectedDataItem")) {
1134
+ this.unselectDataItems();
1135
+ return;
1136
+ }
1137
+ this.unselectDataItems();
1138
+ if (!dataItem) {
1139
+ this.setRaw("selectedDataItem", undefined);
1140
+ return;
1141
+ }
1142
+ const container = dataItem.get("container");
1143
+ if (container) {
1144
+ const bg = container.get("background");
1145
+ if (bg) {
1146
+ bg.set("active", true);
1147
+ }
1148
+ const progressPie = dataItem.get("progressPie");
1149
+ let point = { x: 0, y: 0 };
1150
+ if (progressPie) {
1151
+ point = progressPie.toGlobal(point);
1152
+ point = this.toLocal(point);
1153
+ }
1154
+ this.xButton.setAll({
1155
+ y: point.y,
1156
+ x: point.x
1157
+ });
1158
+ this.setRaw("selectedDataItem", dataItem);
1159
+ if (this._xHideDP) {
1160
+ this._xHideDP.dispose();
1161
+ }
1162
+ (_b = this.gantt) === null || _b === void 0 ? void 0 : _b.colorPickerButton.set("color", dataItem.get("customColor", dataItem.get("color")));
1163
+ this.setTimeout(() => {
1164
+ this._xHideDP = this.events.once("globalpointerup", () => {
1165
+ this.unselectDataItems();
1166
+ });
1167
+ }, 200);
1168
+ if (this._delDp) {
1169
+ this._delDp.dispose();
1170
+ }
1171
+ this._delDp = this.xButton.events.once("click", () => {
1172
+ this.deleteDataItem(dataItem);
1173
+ this.unselectDataItems();
1174
+ });
1175
+ this.xButton.show();
1176
+ }
1177
+ else {
1178
+ this.unselectDataItems();
1179
+ }
1180
+ }
1181
+ /**
1182
+ * Unselects all data items.
1183
+ */
1184
+ unselectDataItems() {
1185
+ this.setRaw("selectedDataItem", undefined);
1186
+ this.xButton.hide(0);
1187
+ $array.each(this.dataItems, (dataItem) => {
1188
+ const container = dataItem.get("container");
1189
+ if (container) {
1190
+ const bg = container.get("background");
1191
+ if (bg) {
1192
+ bg.set("active", false);
1193
+ }
1194
+ }
1195
+ });
1196
+ }
1197
+ /**
1198
+ * @ignore
1199
+ */
1200
+ _disposeXHideDP() {
1201
+ if (this._xHideDP) {
1202
+ this._xHideDP.dispose();
1203
+ this._xHideDP = undefined;
1204
+ }
1205
+ }
1206
+ /**
1207
+ * @ignore
1208
+ * @param dataItem
1209
+ * @returns depth of the data item in the hierarchy
1210
+ */
1211
+ _getItemDepth(dataItem) {
1212
+ let depth = 0;
1213
+ let parent = dataItem.get("parent");
1214
+ while (parent) {
1215
+ depth++;
1216
+ parent = parent.get("parent");
1217
+ }
1218
+ return depth;
1219
+ }
1220
+ /**
1221
+ * @ignore
1222
+ * Overrides original method so that a ghost label is not created.
1223
+ */
1224
+ _createGhostLabel() { }
1225
+ }
1226
+ Object.defineProperty(GanttCategoryAxis, "className", {
1227
+ enumerable: true,
1228
+ configurable: true,
1229
+ writable: true,
1230
+ value: "GanttCategoryAxis"
1231
+ });
1232
+ Object.defineProperty(GanttCategoryAxis, "classNames", {
1233
+ enumerable: true,
1234
+ configurable: true,
1235
+ writable: true,
1236
+ value: CategoryAxis.classNames.concat([GanttCategoryAxis.className])
1237
+ });
1238
+ //# sourceMappingURL=GanttCategoryAxis.js.map