@amcharts/amcharts5 5.13.6 → 5.14.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 (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 +222 -0
  13. package/.internal/charts/gantt/Gantt.d.ts.map +1 -0
  14. package/.internal/charts/gantt/Gantt.js +795 -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 +769 -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 +37 -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 +228 -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 +90 -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 +90 -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 +228 -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 +90 -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 +90 -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,795 @@
1
+ import { Button } from "../../core/render/Button";
2
+ import { ConfirmButton } from "../../core/render/ConfirmButton";
3
+ import { Graphics } from "../../core/render/Graphics";
4
+ import { percent } from "../../core/util/Percent";
5
+ import { GanttDateAxis } from "./GanttDateAxis";
6
+ import { XYChart } from "../xy/XYChart";
7
+ import { GanttDefaultTheme } from "./GanttDefaultTheme";
8
+ import { GanttSeries } from "./GanttSeries";
9
+ import { color, Container, Rectangle, Scrollbar, Tooltip } from "../../..";
10
+ import { GanttCategoryAxis } from "./GanttCategoryAxis";
11
+ import { GanttCategoryAxisRenderer } from "./GanttCategoryAxisRenderer";
12
+ import { GanttDateAxisRenderer } from "./GanttDateAxisRenderer";
13
+ import { XYCursor } from "../xy/XYCursor";
14
+ import { ColorPicker } from "../../plugins/colorPicker/ColorPicker";
15
+ import { ColorPickerButton } from "../../plugins/colorPicker/ColorPickerButton";
16
+ import { registry } from "../../core/Registry";
17
+ import * as $utils from "../../core/util/Utils";
18
+ import * as $array from "../../core/util/Array";
19
+ import * as $time from "../../core/util/Time";
20
+ /**
21
+ * Creates a [[Gantt]] chart.
22
+ *
23
+ * @see {@link https://www.amcharts.com/docs/v5/charts/gantt/} for more info
24
+ * @important
25
+ * @since 5.14.0
26
+ */
27
+ export class Gantt extends Container {
28
+ constructor() {
29
+ super(...arguments);
30
+ /**
31
+ * A scrollbar for horizontal scrolling.
32
+ */
33
+ Object.defineProperty(this, "scrollbarX", {
34
+ enumerable: true,
35
+ configurable: true,
36
+ writable: true,
37
+ value: Scrollbar.new(this._root, {
38
+ orientation: "horizontal"
39
+ })
40
+ });
41
+ /**
42
+ * A scrollbar for vertical scrolling.
43
+ */
44
+ Object.defineProperty(this, "scrollbarY", {
45
+ enumerable: true,
46
+ configurable: true,
47
+ writable: true,
48
+ value: Scrollbar.new(this._root, {
49
+ orientation: "vertical"
50
+ })
51
+ });
52
+ /**
53
+ * A reference to the [[XYChart]] that holds the Gantt chart.
54
+ */
55
+ Object.defineProperty(this, "xyChart", {
56
+ enumerable: true,
57
+ configurable: true,
58
+ writable: true,
59
+ value: void 0
60
+ });
61
+ /**
62
+ * A reference to the [[GanttSeries]] that shows the Gantt tasks bars.
63
+ */
64
+ Object.defineProperty(this, "series", {
65
+ enumerable: true,
66
+ configurable: true,
67
+ writable: true,
68
+ value: void 0
69
+ });
70
+ /**
71
+ * A reference to the [[GanttDateAxis]] used as the main X-axis.
72
+ */
73
+ Object.defineProperty(this, "xAxis", {
74
+ enumerable: true,
75
+ configurable: true,
76
+ writable: true,
77
+ value: void 0
78
+ });
79
+ /**
80
+ * A reference to the [[GanttDateAxis]] used as the secondary X-axis.
81
+ */
82
+ Object.defineProperty(this, "xAxisMinor", {
83
+ enumerable: true,
84
+ configurable: true,
85
+ writable: true,
86
+ value: void 0
87
+ });
88
+ /**
89
+ * A reference to the [[GanttCategoryAxis]] used as the Y-axis.
90
+ */
91
+ Object.defineProperty(this, "yAxis", {
92
+ enumerable: true,
93
+ configurable: true,
94
+ writable: true,
95
+ value: void 0
96
+ });
97
+ /**
98
+ * Controls (add, color picker, expand, collaps, clear buttons) container.
99
+ */
100
+ Object.defineProperty(this, "controls", {
101
+ enumerable: true,
102
+ configurable: true,
103
+ writable: true,
104
+ value: Container.new(this._root, {
105
+ themeTags: ["controls"],
106
+ layout: this._root.horizontalLayout,
107
+ })
108
+ });
109
+ Object.defineProperty(this, "zoomControls", {
110
+ enumerable: true,
111
+ configurable: true,
112
+ writable: true,
113
+ value: Container.new(this._root, {
114
+ themeTagsSelf: ["zoomcontrols"]
115
+ })
116
+ });
117
+ /**
118
+ * The [[Button]] element to add new tasks.
119
+ */
120
+ Object.defineProperty(this, "addButton", {
121
+ enumerable: true,
122
+ configurable: true,
123
+ writable: true,
124
+ value: this.controls.children.push(Button.new(this._root, {
125
+ themeTags: ["add", "plus"],
126
+ tooltip: this.root.systemTooltip,
127
+ icon: Graphics.new(this._root, { themeTags: ["icon"] })
128
+ }))
129
+ });
130
+ /**
131
+ * The [[ColorPickerButton]] element to select colors for tasks.
132
+ */
133
+ Object.defineProperty(this, "colorPickerButton", {
134
+ enumerable: true,
135
+ configurable: true,
136
+ writable: true,
137
+ value: this.controls.children.push(ColorPickerButton.new(this._root, {
138
+ disableOpacity: true,
139
+ tooltip: this.root.systemTooltip
140
+ }))
141
+ });
142
+ /**
143
+ * The [[Button]] elements to expand and collapse all tasks.
144
+ */
145
+ Object.defineProperty(this, "expandButton", {
146
+ enumerable: true,
147
+ configurable: true,
148
+ writable: true,
149
+ value: this.controls.children.push(Button.new(this._root, {
150
+ themeTags: ["expand", "secondary", "fixedwidth"],
151
+ icon: Graphics.new(this._root, { themeTags: ["icon"] }),
152
+ tooltip: this.root.systemTooltip
153
+ }))
154
+ });
155
+ /**
156
+ * The [[Button]] elements to collapse all tasks.
157
+ */
158
+ Object.defineProperty(this, "collapseButton", {
159
+ enumerable: true,
160
+ configurable: true,
161
+ writable: true,
162
+ value: this.controls.children.push(Button.new(this._root, {
163
+ themeTags: ["collapse", "secondary", "fixedwidth"],
164
+ icon: Graphics.new(this._root, { themeTags: ["icon"] }),
165
+ tooltip: this.root.systemTooltip
166
+ }))
167
+ });
168
+ /**
169
+ * The [[Button]] element to toggle `linkNewTasks` setting.
170
+ */
171
+ Object.defineProperty(this, "linkButton", {
172
+ enumerable: true,
173
+ configurable: true,
174
+ writable: true,
175
+ value: this.controls.children.push(Button.new(this._root, {
176
+ themeTags: ["link", "secondary", "fixedwidth"],
177
+ icon: Graphics.new(this._root, { themeTags: ["icon"] }),
178
+ tooltip: this.root.systemTooltip
179
+ }))
180
+ });
181
+ /**
182
+ * The [[Button]] element to horizontally fit visible tasks into a view.
183
+ */
184
+ Object.defineProperty(this, "fitButton", {
185
+ enumerable: true,
186
+ configurable: true,
187
+ writable: true,
188
+ value: this.zoomControls.children.push(Button.new(this._root, {
189
+ themeTags: ["fit", "secondary", "zoombutton"],
190
+ icon: Graphics.new(this._root, { themeTags: ["icon"] }),
191
+ tooltip: this.root.systemTooltip
192
+ }))
193
+ });
194
+ /**
195
+ * The [[Button]] element to zoom out the X axis.
196
+ */
197
+ Object.defineProperty(this, "zoomOutButton", {
198
+ enumerable: true,
199
+ configurable: true,
200
+ writable: true,
201
+ value: this.zoomControls.children.push(Button.new(this._root, {
202
+ themeTags: ["zoomout", "secondary", "zoombutton"],
203
+ icon: Graphics.new(this._root, { themeTags: ["icon"] }),
204
+ tooltip: this.root.systemTooltip
205
+ }))
206
+ });
207
+ /**
208
+ * The [[Button]] element to toggle edit mode.
209
+ *
210
+ * @since 5.14.1
211
+ */
212
+ Object.defineProperty(this, "editButton", {
213
+ enumerable: true,
214
+ configurable: true,
215
+ writable: true,
216
+ value: this.controls.children.push(Button.new(this._root, {
217
+ themeTags: ["edit", "secondary", "fixedwidth"],
218
+ icon: Graphics.new(this._root, { themeTags: ["icon"] }),
219
+ tooltip: this.root.systemTooltip
220
+ }))
221
+ });
222
+ /**
223
+ * The [[Button]] element to clear all tasks.
224
+ */
225
+ Object.defineProperty(this, "clearButton", {
226
+ enumerable: true,
227
+ configurable: true,
228
+ writable: true,
229
+ value: this.controls.children.push(ConfirmButton.new(this._root, {
230
+ themeTags: ["clear", "secondary", "confirm"],
231
+ icon: Graphics.new(this._root, { themeTags: ["icon"] }),
232
+ tooltip: this.root.systemTooltip,
233
+ active: false
234
+ }))
235
+ });
236
+ /**
237
+ * The [[ColorPicker]] element to select colors for tasks.
238
+ */
239
+ Object.defineProperty(this, "colorPicker", {
240
+ enumerable: true,
241
+ configurable: true,
242
+ writable: true,
243
+ value: this.children.push(ColorPicker.new(this._root, { visible: false }))
244
+ });
245
+ Object.defineProperty(this, "_customColor", {
246
+ enumerable: true,
247
+ configurable: true,
248
+ writable: true,
249
+ value: void 0
250
+ });
251
+ }
252
+ _afterNew() {
253
+ this.addTag("gantt");
254
+ this._defaultThemes.push(GanttDefaultTheme.new(this._root));
255
+ super._afterNew();
256
+ const root = this._root;
257
+ this.colorPickerButton.events.on("click", () => {
258
+ this.yAxis.xButton.hide(0);
259
+ this.colorPicker.setAll({
260
+ colorButton: this.colorPickerButton
261
+ });
262
+ this.children.moveValue(this.colorPicker, this.children.length - 1);
263
+ this.yAxis._disposeXHideDP();
264
+ });
265
+ this.colorPicker.events.on("colorchanged", () => {
266
+ this._customColor = this.colorPicker.get("color");
267
+ this.yAxis.unselectDataItems();
268
+ });
269
+ this.addButton.events.on("click", () => {
270
+ this.addNewTask();
271
+ });
272
+ const chart = this.children.push(XYChart.new(root, {}));
273
+ chart.plotContainer.children.push(this.zoomControls);
274
+ chart.zoomOutButton.set("forceHidden", true);
275
+ chart.children.push(this.controls);
276
+ chart.set("cursor", XYCursor.new(root, {
277
+ xAxis: this.xAxis,
278
+ yAxis: this.yAxis
279
+ }));
280
+ const yRenderer = GanttCategoryAxisRenderer.new(root, {});
281
+ // to prevent moving horizontally while dragging
282
+ yRenderer.containers.template.adapters.add("x", () => {
283
+ return 0;
284
+ });
285
+ // can't set fields in theme, as data is set before theme is applied
286
+ const yAxis = chart.yAxes.push(GanttCategoryAxis.new(root, {
287
+ categoryField: "id",
288
+ cellSizeField: "cellSize",
289
+ collapsedField: "collapsed",
290
+ parentIdField: "parentId",
291
+ colorField: "color",
292
+ idField: "id",
293
+ nameField: "name",
294
+ renderer: yRenderer
295
+ }));
296
+ yAxis.gantt = this;
297
+ // update widht of scrollbar and controls container
298
+ yAxis.events.on("boundschanged", () => {
299
+ this._updateScrollbar();
300
+ });
301
+ chart.plotContainer.events.on("boundschanged", () => {
302
+ this._updateScrollbar();
303
+ });
304
+ this.on("visible", () => {
305
+ this.root.events.once("frameended", () => {
306
+ this._updateScrollbar();
307
+ });
308
+ });
309
+ // minor x axis
310
+ const ganttAxisRenderrerMinor = GanttDateAxisRenderer.new(root, { themeTags: ["minor"] });
311
+ // so that grid would be hidden if axis range is added
312
+ ganttAxisRenderrerMinor.grid.template.adapters.add("forceHidden", (forceHidden, target) => {
313
+ const dataItem = target.dataItem;
314
+ if (dataItem && dataItem.get("active")) {
315
+ return true;
316
+ }
317
+ return forceHidden;
318
+ });
319
+ const xAxisMinor = chart.xAxes.push(GanttDateAxis.new(root, {
320
+ themeTags: ["minor"],
321
+ baseInterval: { timeUnit: "day", count: 1 },
322
+ renderer: ganttAxisRenderrerMinor,
323
+ background: Rectangle.new(root, {
324
+ fill: color(0xfff),
325
+ fillOpacity: 0
326
+ })
327
+ }));
328
+ xAxisMinor.gantt = this;
329
+ // return default color for grid lines
330
+ xAxisMinor.events.on("pointerout", () => {
331
+ ganttAxisRenderrerMinor.grid.each((grid) => {
332
+ grid.unhover();
333
+ });
334
+ });
335
+ // add axis range on click
336
+ xAxisMinor.events.on("click", () => {
337
+ if (closestGrid) {
338
+ const dataItem = closestGrid.dataItem;
339
+ if (dataItem) {
340
+ const value = dataItem.get("endValue");
341
+ if (value !== undefined) {
342
+ let found = false;
343
+ xAxisMinor.axisRanges.each((axisRange) => {
344
+ // remove axis range if already exists
345
+ if (axisRange.get("value") === value) {
346
+ this.unmarkDate(value);
347
+ found = true;
348
+ }
349
+ });
350
+ // add axis range if not exists
351
+ if (!found) {
352
+ dataItem.set("active", true);
353
+ this.markDate(value);
354
+ }
355
+ }
356
+ }
357
+ }
358
+ });
359
+ // find closest grid line on hover
360
+ let closestGrid;
361
+ xAxisMinor.events.on("globalpointermove", (ev) => {
362
+ if (xAxisMinor.isHover()) {
363
+ // find most close grid line
364
+ const point = xAxisMinor.toLocal({ x: ev.point.x, y: ev.point.y });
365
+ let minX = Infinity;
366
+ ganttAxisRenderrerMinor.grid.each((grid) => {
367
+ if (grid.isVisible()) {
368
+ const dataItem = grid.dataItem;
369
+ if (dataItem) {
370
+ if (!dataItem.get("isRange")) {
371
+ let distance = Math.abs(grid.x() - point.x);
372
+ if (!grid.get("active")) {
373
+ grid.unhover();
374
+ }
375
+ if (distance < minX) {
376
+ minX = distance;
377
+ closestGrid = grid;
378
+ }
379
+ }
380
+ }
381
+ }
382
+ });
383
+ if (closestGrid) {
384
+ closestGrid.hover();
385
+ }
386
+ }
387
+ });
388
+ const ganttAxisRenderrer = GanttDateAxisRenderer.new(root, {});
389
+ const xAxis = chart.xAxes.push(GanttDateAxis.new(root, {
390
+ baseInterval: { timeUnit: "day", count: 1 },
391
+ renderer: ganttAxisRenderrer,
392
+ tooltip: Tooltip.new(root, {})
393
+ }));
394
+ xAxis.gantt = this;
395
+ // sync minor x axis with main x axis
396
+ xAxis.onPrivate("min", (value) => {
397
+ xAxisMinor.setPrivate("min", value);
398
+ });
399
+ xAxis.onPrivate("max", (value) => {
400
+ xAxisMinor.setPrivate("max", value);
401
+ });
402
+ // sync minor x axis with main x axis
403
+ xAxis.on("start", (value) => {
404
+ xAxisMinor.set("start", value);
405
+ });
406
+ xAxis.on("end", (value) => {
407
+ xAxisMinor.set("end", value);
408
+ });
409
+ // set min max if not set
410
+ const baseDuration = xAxis.baseDuration();
411
+ if (xAxis.getPrivate("min") === undefined) {
412
+ xAxis.setPrivate("min", new Date().getTime());
413
+ }
414
+ if (xAxis.getPrivate("max") === undefined) {
415
+ xAxis.setPrivate("max", new Date().getTime() + baseDuration * 3);
416
+ }
417
+ // set grid interval
418
+ xAxis.onPrivate("gridInterval", (value) => {
419
+ const gridIntervals = this.get("gridIntervals");
420
+ if (gridIntervals && gridIntervals[value.timeUnit]) {
421
+ xAxisMinor.set("gridIntervals", gridIntervals[value.timeUnit]);
422
+ }
423
+ });
424
+ // Add series
425
+ // https://www.amcharts.com/docs/v5/charts/xy-chart/series/
426
+ var series = chart.series.push(GanttSeries.new(root, {
427
+ xAxis: xAxis,
428
+ yAxis: yAxis,
429
+ baseAxis: yAxis,
430
+ openValueXField: "start",
431
+ valueXField: "end",
432
+ progressField: "progress",
433
+ durationField: "duration",
434
+ linkToField: "linkTo",
435
+ categoryYField: "id",
436
+ idField: "id"
437
+ }));
438
+ series.gantt = this;
439
+ // Add scrollbars
440
+ this.scrollbarX = chart.set("scrollbarX", this.scrollbarX);
441
+ this.scrollbarY = chart.set("scrollbarY", this.scrollbarY);
442
+ this.scrollbarY.startGrip.set("forceHidden", true);
443
+ this.scrollbarY.endGrip.set("forceHidden", true);
444
+ this.children.push(this.scrollbarX);
445
+ this.xyChart = chart;
446
+ this.series = series;
447
+ this.xAxis = xAxis;
448
+ this.yAxis = yAxis;
449
+ this.xAxisMinor = xAxisMinor;
450
+ const eventType = "valueschanged";
451
+ this.series.events.on(eventType, () => {
452
+ if (this.get("editable")) {
453
+ if (this.events.isEnabled(eventType)) {
454
+ this.events.dispatch(eventType, { type: eventType, target: this });
455
+ }
456
+ }
457
+ });
458
+ // ad dbehavior to buttons
459
+ this.expandButton.events.on("click", () => {
460
+ this.yAxis.expandAll();
461
+ });
462
+ this.collapseButton.events.on("click", () => {
463
+ this.yAxis.collapseAll();
464
+ });
465
+ this.clearButton.events.on("confirmed", () => {
466
+ this.clearAll();
467
+ });
468
+ this.linkButton.on("active", (active) => {
469
+ this.set("linkNewTasks", active);
470
+ });
471
+ this.colorPicker.on("color", (c) => {
472
+ this.yAxis.setDataItemColor(this.yAxis.get("selectedDataItem"), c);
473
+ });
474
+ this.editButton.on("active", (active) => {
475
+ this.set("editable", active);
476
+ });
477
+ this.fitButton.events.on("click", () => {
478
+ let min = series.getPrivate("selectionMinX", 0);
479
+ let max = series.getPrivate("selectionMaxX", 0);
480
+ const extraMin = xAxis.get("extraMin", 0.1);
481
+ const extraMax = xAxis.get("extraMax", 0.1);
482
+ xAxis.zoomToValues(min - (max - min) * extraMin, max + (max - min) * extraMax);
483
+ /*
484
+ xAxis.setAll({
485
+ "strictMinMax": false,
486
+ "strictMinMaxSelection": false,
487
+ "autoZoom": true,
488
+ })
489
+
490
+
491
+ else {
492
+ xAxis.setAll({
493
+ "strictMinMax": true,
494
+ "strictMinMaxSelection": true,
495
+ "autoZoom": false
496
+ })
497
+
498
+ xAxis.setPrivate("selectionMin", undefined);
499
+ xAxis.setPrivate("selectionMax", undefined);
500
+ }*/
501
+ });
502
+ this.zoomOutButton.events.on("click", () => {
503
+ xAxis.zoom(0, 1);
504
+ });
505
+ let license = false;
506
+ for (let i = 0; i < registry.licenses.length; i++) {
507
+ if (registry.licenses[i].match(/^AM5G.{5,}/i)) {
508
+ license = true;
509
+ }
510
+ }
511
+ if (!license) {
512
+ this._root._showBranding();
513
+ }
514
+ else {
515
+ this._root._licenseApplied();
516
+ }
517
+ }
518
+ // end _afterNew()
519
+ _prepareChildren() {
520
+ super._prepareChildren();
521
+ if (this.isDirty("editable")) {
522
+ this._toggleEditable(this.get("editable", true));
523
+ }
524
+ }
525
+ clearAll() {
526
+ var _a;
527
+ this.yAxis.deleteAll();
528
+ this._customColor = undefined;
529
+ (_a = this.get("colors")) === null || _a === void 0 ? void 0 : _a.reset();
530
+ this.colorPickerButton.set("color", undefined);
531
+ this._nextColor();
532
+ const today = new Date();
533
+ today.setHours(0, 0, 0, 0);
534
+ this.xAxis.setPrivate("min", today.getTime());
535
+ this.xAxis.setPrivate("max", today.getTime() + this.xAxis.baseDuration() * 5);
536
+ for (let i = this.xAxisMinor.axisRanges.length - 1; i >= 0; i--) {
537
+ const axisRange = this.xAxisMinor.axisRanges.getIndex(i);
538
+ if (axisRange) {
539
+ this.unmarkDate(axisRange.get("value"));
540
+ }
541
+ }
542
+ ;
543
+ }
544
+ _updateChildren() {
545
+ super._updateChildren();
546
+ if (this.isDirty("linkNewTasks")) {
547
+ this.linkButton.set("active", this.get("linkNewTasks", false));
548
+ }
549
+ if (this.isDirty("editable")) {
550
+ this.editButton.set("active", this.get("editable", true));
551
+ }
552
+ if (this._sizeDirty || this.isDirty("sidebarWidth")) {
553
+ let width = $utils.relativeToValue(this.get("sidebarWidth", percent(20)), this.innerWidth());
554
+ width = Math.max(width, this.yAxis.get("minWidth", 100));
555
+ this.yAxis.labelsContainer.set("width", width);
556
+ this._updateScrollbar();
557
+ }
558
+ if (this.isDirty("durationUnit")) {
559
+ const durationUnit = this.get("durationUnit");
560
+ if (durationUnit) {
561
+ this.xAxis.set("baseInterval", { timeUnit: durationUnit, count: 1 });
562
+ this.xAxisMinor.set("baseInterval", { timeUnit: durationUnit, count: 1 });
563
+ }
564
+ }
565
+ if (this.colorPickerButton.getPrivate("color") === undefined) {
566
+ this._nextColor();
567
+ }
568
+ }
569
+ _updateScrollbar() {
570
+ const point = this.xyChart.plotContainer.toGlobal({ x: 0, y: 0 });
571
+ this.scrollbarX.setAll({
572
+ x: point.x,
573
+ width: this.xyChart.plotContainer.width()
574
+ });
575
+ }
576
+ /**
577
+ * Adds a new task to the Gantt chart.
578
+ *
579
+ * @param category The category name for the task. If not provided, will be auto-generated.
580
+ * @param start The start time of the task in milliseconds. If not provided, will be determined based on context.
581
+ * @param duration The duration of the task. If not provided, defaults to 1.
582
+ * @param parentId The parent category if this is a subtask.
583
+ * @param progress The initial progress of the task (0-1). Defaults to 0.
584
+ * @param linkToPrevious Should the task automatically link to the previous one?
585
+ */
586
+ addNewTask(name, start, duration = 1, parentId, progress = 0, linkToPrevious) {
587
+ // Generate a unique ID for the new task
588
+ let len = this.series.dataItems.length;
589
+ let c = this.yAxis.dataItems.length;
590
+ $array.each(this.yAxis.dataItems, (dataItem) => {
591
+ if (dataItem.get("id") == "gantt_" + c) {
592
+ c++;
593
+ }
594
+ });
595
+ const uid = "gantt_" + c;
596
+ if (!name) {
597
+ name = "New Task";
598
+ }
599
+ if (linkToPrevious === undefined) {
600
+ linkToPrevious = this.get("linkNewTasks", false);
601
+ }
602
+ let parentDataItem;
603
+ // Find parent data item either by specified category or selected item
604
+ if (parentId != undefined) {
605
+ parentDataItem = this.yAxis.getDataItemById(parentId);
606
+ }
607
+ else {
608
+ parentDataItem = this.yAxis.get("selectedDataItem");
609
+ }
610
+ let childCount = 0;
611
+ // Handle parent-child relationship if a parent exists
612
+ if (parentDataItem) {
613
+ parentId = parentDataItem.get("id");
614
+ if (parentId) {
615
+ // If start time not specified, try to use parent's start time
616
+ if (start === undefined) {
617
+ const seriesDataItem = this.series.getDataItemById(parentId);
618
+ if (seriesDataItem) {
619
+ start = seriesDataItem.get("valueX", new Date().getTime());
620
+ }
621
+ }
622
+ }
623
+ // Initialize or get the children array for the parent
624
+ let children = parentDataItem.get("children");
625
+ if (!children) {
626
+ children = parentDataItem.set("children", []);
627
+ }
628
+ childCount = children.length;
629
+ }
630
+ // Determine start time if not specified
631
+ if (start === undefined) {
632
+ start = $time.roun(this.xAxis.getPrivate("min", 0), this.get("durationUnit", "day"), 1, this.root);
633
+ if (this.series.dataItems.length > 0) {
634
+ start = this.series.dataItems[len - 1].get("valueX", new Date().getTime());
635
+ }
636
+ }
637
+ const dataObject = {
638
+ name: name,
639
+ id: uid
640
+ };
641
+ if (parentId) {
642
+ dataObject["parentId"] = parentId;
643
+ }
644
+ // Add the category data
645
+ let index = 0;
646
+ let previousDataItem;
647
+ if (parentDataItem) {
648
+ index = this.yAxis.dataItems.indexOf(parentDataItem) + 1 + childCount;
649
+ const children = parentDataItem.get("children", []);
650
+ let len = this.yAxis.dataItems.length;
651
+ if (index >= len) {
652
+ if (children.length > 0) {
653
+ previousDataItem = children[children.length - 1];
654
+ }
655
+ this.yAxis.data.push(dataObject);
656
+ }
657
+ else {
658
+ if (children.length > 0) {
659
+ previousDataItem = this.yAxis.dataItems[index - 1];
660
+ }
661
+ this.yAxis.data.insertIndex(index, dataObject);
662
+ }
663
+ index++;
664
+ }
665
+ else {
666
+ // go backwards and find the first item that has no parent
667
+ for (let i = this.yAxis.dataItems.length - 1; i >= 0; i--) {
668
+ const dataItem = this.yAxis.dataItems[i];
669
+ if (!dataItem.get("parentId")) {
670
+ previousDataItem = dataItem;
671
+ break;
672
+ }
673
+ }
674
+ this.yAxis.data.push(dataObject);
675
+ index = this.yAxis.dataItems.length;
676
+ }
677
+ // Add the task data with slightly offset start time to avoid overlapping
678
+ const baseDuration = this.xAxis.baseDuration();
679
+ const seriesDataObject = {
680
+ start: start,
681
+ end: start + 1,
682
+ duration: duration,
683
+ progress: progress,
684
+ id: uid,
685
+ name: name
686
+ };
687
+ // create link to previous task if needed
688
+ if (linkToPrevious && previousDataItem) {
689
+ const seriesDataItem = this.series.getDataItemById(previousDataItem.get("id"));
690
+ if (seriesDataItem) {
691
+ const linkTo = seriesDataItem.get("linkTo", []);
692
+ if (!linkTo.includes(uid)) {
693
+ linkTo.push(uid);
694
+ seriesDataItem.set("linkTo", linkTo);
695
+ }
696
+ }
697
+ }
698
+ this.series.data.moveValue(seriesDataObject, index - 1);
699
+ const newSeriesDataItem = this.series.dataItems[index - 1];
700
+ newSeriesDataItem.animate({ key: "valueX", to: start + baseDuration * duration, duration: this.series.get("interpolationDuration", 0), easing: this.series.get("interpolationEasing") });
701
+ this.yAxis._disposeXHideDP();
702
+ this.yAxis.xButton.hide(0);
703
+ const maxZoomCount = this.yAxis.get("maxZoomCount", 20);
704
+ let startIndex = Math.max(0, Math.round(index - maxZoomCount / 2));
705
+ let endIndex = startIndex + maxZoomCount;
706
+ len = this.yAxis.dataItems.length;
707
+ if (endIndex > len) {
708
+ endIndex = len;
709
+ startIndex = Math.max(0, endIndex - maxZoomCount);
710
+ }
711
+ this.yAxis.zoomToIndexes(startIndex, endIndex);
712
+ this.yAxis.adjustZoom();
713
+ }
714
+ // Get next color from the color set
715
+ _nextColor() {
716
+ var _a;
717
+ if (this._customColor) {
718
+ return this._customColor;
719
+ }
720
+ const fill = (_a = this.get("colors")) === null || _a === void 0 ? void 0 : _a.next();
721
+ this.colorPickerButton.setPrivate("color", fill);
722
+ return fill;
723
+ }
724
+ /**
725
+ * Marks a date on the minor date axis.
726
+ *
727
+ * @param date Date to be marked
728
+ */
729
+ markDate(date) {
730
+ const xAxisMinor = this.xAxisMinor;
731
+ const dataItem = xAxisMinor.createAxisRange(xAxisMinor.makeDataItem({
732
+ value: date
733
+ }));
734
+ const eventType = "datemarked";
735
+ if (this.events.isEnabled(eventType)) {
736
+ this.events.dispatch(eventType, { type: eventType, target: this, dataItem: dataItem, date: date });
737
+ }
738
+ }
739
+ /**
740
+ * Unmarks a date on the minor date axis.
741
+ *
742
+ * @param date Date to be unmarked
743
+ */
744
+ unmarkDate(date) {
745
+ const xAxisMinor = this.xAxisMinor;
746
+ let dataItem = undefined;
747
+ xAxisMinor.axisRanges.each((axisRange) => {
748
+ // remove axis range if already exists
749
+ if (axisRange && axisRange.get("value") === date) {
750
+ xAxisMinor.axisRanges.removeValue(axisRange);
751
+ dataItem = axisRange;
752
+ }
753
+ });
754
+ const eventType = "dateunmarked";
755
+ if (this.events.isEnabled(eventType)) {
756
+ this.events.dispatch(eventType, { type: eventType, target: this, dataItem: dataItem, date: date });
757
+ }
758
+ }
759
+ _toggleEditable(value) {
760
+ const forceHidden = "forceHidden";
761
+ const forceInactive = "forceInactive";
762
+ const draggable = "draggable";
763
+ this.series.markDirtyValues();
764
+ this.addButton.set(forceHidden, !value);
765
+ this.colorPickerButton.set(forceHidden, !value);
766
+ this.clearButton.set(forceHidden, !value);
767
+ this.linkButton.set(forceHidden, !value);
768
+ const renderer = this.yAxis.get("renderer");
769
+ renderer.labels.template.set(forceInactive, !value);
770
+ renderer.grips.template.set(forceHidden, !value);
771
+ renderer.containers.template.set(draggable, value);
772
+ renderer.controlsContainers.template.set(forceInactive, !value);
773
+ this.series.columns.template.set(draggable, value);
774
+ this.series.startGrips.template.set(forceHidden, !value);
775
+ this.series.endGrips.template.set(forceHidden, !value);
776
+ this.series.progressGrips.template.set(forceHidden, !value);
777
+ this.series.startBullets.template.set(forceHidden, !value);
778
+ this.series.endBullets.template.set(forceHidden, !value);
779
+ this.series.links.template.set(forceInactive, !value);
780
+ this.xAxisMinor.set(forceInactive, !value);
781
+ }
782
+ }
783
+ Object.defineProperty(Gantt, "className", {
784
+ enumerable: true,
785
+ configurable: true,
786
+ writable: true,
787
+ value: "Gantt"
788
+ });
789
+ Object.defineProperty(Gantt, "classNames", {
790
+ enumerable: true,
791
+ configurable: true,
792
+ writable: true,
793
+ value: Container.classNames.concat([Gantt.className])
794
+ });
795
+ //# sourceMappingURL=Gantt.js.map