@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.
- package/.internal/charts/funnel/FunnelSeries.d.ts +1 -1
- package/.internal/charts/funnel/FunnelSeries.d.ts.map +1 -1
- package/.internal/charts/funnel/FunnelSeries.js.map +1 -1
- package/.internal/charts/funnel/FunnelSlice.d.ts +1 -1
- package/.internal/charts/funnel/FunnelSlice.d.ts.map +1 -1
- package/.internal/charts/funnel/FunnelSlice.js.map +1 -1
- package/.internal/charts/funnel/PyramidSeries.d.ts.map +1 -1
- package/.internal/charts/funnel/PyramidSeries.js.map +1 -1
- package/.internal/charts/funnel/SlicedChart.d.ts +1 -1
- package/.internal/charts/funnel/SlicedChart.d.ts.map +1 -1
- package/.internal/charts/funnel/SlicedChart.js.map +1 -1
- package/.internal/charts/gantt/Gantt.d.ts +222 -0
- package/.internal/charts/gantt/Gantt.d.ts.map +1 -0
- package/.internal/charts/gantt/Gantt.js +795 -0
- package/.internal/charts/gantt/Gantt.js.map +1 -0
- package/.internal/charts/gantt/GanttCategoryAxis.d.ts +287 -0
- package/.internal/charts/gantt/GanttCategoryAxis.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttCategoryAxis.js +1238 -0
- package/.internal/charts/gantt/GanttCategoryAxis.js.map +1 -0
- package/.internal/charts/gantt/GanttCategoryAxisRenderer.d.ts +98 -0
- package/.internal/charts/gantt/GanttCategoryAxisRenderer.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttCategoryAxisRenderer.js +270 -0
- package/.internal/charts/gantt/GanttCategoryAxisRenderer.js.map +1 -0
- package/.internal/charts/gantt/GanttDateAxis.d.ts +36 -0
- package/.internal/charts/gantt/GanttDateAxis.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttDateAxis.js +35 -0
- package/.internal/charts/gantt/GanttDateAxis.js.map +1 -0
- package/.internal/charts/gantt/GanttDateAxisRenderer.d.ts +19 -0
- package/.internal/charts/gantt/GanttDateAxisRenderer.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttDateAxisRenderer.js +23 -0
- package/.internal/charts/gantt/GanttDateAxisRenderer.js.map +1 -0
- package/.internal/charts/gantt/GanttDefaultTheme.d.ts +8 -0
- package/.internal/charts/gantt/GanttDefaultTheme.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttDefaultTheme.js +769 -0
- package/.internal/charts/gantt/GanttDefaultTheme.js.map +1 -0
- package/.internal/charts/gantt/GanttSeries.d.ts +348 -0
- package/.internal/charts/gantt/GanttSeries.d.ts.map +1 -0
- package/.internal/charts/gantt/GanttSeries.js +1524 -0
- package/.internal/charts/gantt/GanttSeries.js.map +1 -0
- package/.internal/charts/hierarchy/Hierarchy.js.map +1 -1
- package/.internal/charts/hierarchy/HierarchyDefaultTheme.js.map +1 -1
- package/.internal/charts/hierarchy/HierarchyLink.d.ts +1 -1
- package/.internal/charts/hierarchy/HierarchyLink.d.ts.map +1 -1
- package/.internal/charts/hierarchy/HierarchyLink.js.map +1 -1
- package/.internal/charts/hierarchy/LinkedHierarchy.d.ts +2 -2
- package/.internal/charts/hierarchy/LinkedHierarchy.d.ts.map +1 -1
- package/.internal/charts/hierarchy/LinkedHierarchy.js +1 -1
- package/.internal/charts/hierarchy/LinkedHierarchy.js.map +1 -1
- package/.internal/charts/hierarchy/Pack.d.ts.map +1 -1
- package/.internal/charts/hierarchy/Pack.js.map +1 -1
- package/.internal/charts/hierarchy/Partition.d.ts.map +1 -1
- package/.internal/charts/hierarchy/Partition.js.map +1 -1
- package/.internal/charts/hierarchy/Treemap.js.map +1 -1
- package/.internal/charts/hierarchy/VoronoiTreemap.d.ts.map +1 -1
- package/.internal/charts/hierarchy/VoronoiTreemap.js +3 -3
- package/.internal/charts/hierarchy/VoronoiTreemap.js.map +1 -1
- package/.internal/charts/map/MapChart.d.ts.map +1 -1
- package/.internal/charts/map/MapChart.js +1 -3
- package/.internal/charts/map/MapChart.js.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.d.ts +1 -0
- package/.internal/charts/stock/drawing/DrawingSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.js +7 -0
- package/.internal/charts/stock/drawing/DrawingSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalLineSeries.js +2 -1
- package/.internal/charts/stock/drawing/HorizontalLineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalRaySeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/HorizontalRaySeries.js +2 -1
- package/.internal/charts/stock/drawing/HorizontalRaySeries.js.map +1 -1
- package/.internal/charts/stock/drawing/ParallelChannelSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/ParallelChannelSeries.js +2 -1
- package/.internal/charts/stock/drawing/ParallelChannelSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/PolylineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/PolylineSeries.js +3 -1
- package/.internal/charts/stock/drawing/PolylineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.js +2 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/VerticalLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/VerticalLineSeries.js +2 -1
- package/.internal/charts/stock/drawing/VerticalLineSeries.js.map +1 -1
- package/.internal/charts/timeline/AxisRendererCurveX.js.map +1 -1
- package/.internal/charts/timeline/AxisRendererCurveY.js.map +1 -1
- package/.internal/charts/timeline/CurveChart.js.map +1 -1
- package/.internal/charts/timeline/CurveColumnSeries.js.map +1 -1
- package/.internal/charts/timeline/CurveCursor.js +1 -1
- package/.internal/charts/timeline/CurveCursor.js.map +1 -1
- package/.internal/charts/timeline/SerpentineChart.d.ts +1 -1
- package/.internal/charts/timeline/SerpentineChart.d.ts.map +1 -1
- package/.internal/charts/timeline/SerpentineChart.js.map +1 -1
- package/.internal/charts/timeline/SpiralChart.d.ts +1 -1
- package/.internal/charts/timeline/SpiralChart.d.ts.map +1 -1
- package/.internal/charts/timeline/SpiralChart.js.map +1 -1
- package/.internal/charts/wordcloud/WordCloud.js.map +1 -1
- package/.internal/charts/xy/XYChart.d.ts.map +1 -1
- package/.internal/charts/xy/XYChart.js +16 -8
- package/.internal/charts/xy/XYChart.js.map +1 -1
- package/.internal/charts/xy/XYChartDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/xy/XYChartDefaultTheme.js +6 -3
- package/.internal/charts/xy/XYChartDefaultTheme.js.map +1 -1
- package/.internal/charts/xy/axes/Axis.d.ts +17 -1
- package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/Axis.js +46 -26
- package/.internal/charts/xy/axes/Axis.js.map +1 -1
- package/.internal/charts/xy/axes/AxisBullet.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisBullet.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisBullet.js.map +1 -1
- package/.internal/charts/xy/axes/AxisLabel.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisLabel.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisLabel.js.map +1 -1
- package/.internal/charts/xy/axes/AxisLabelRadial.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisLabelRadial.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisLabelRadial.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRenderer.d.ts +5 -5
- package/.internal/charts/xy/axes/AxisRenderer.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRenderer.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.js +9 -5
- package/.internal/charts/xy/axes/AxisRendererX.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.d.ts +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.js +9 -5
- package/.internal/charts/xy/axes/AxisRendererY.js.map +1 -1
- package/.internal/charts/xy/axes/CategoryAxis.d.ts +34 -3
- package/.internal/charts/xy/axes/CategoryAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/CategoryAxis.js +243 -40
- package/.internal/charts/xy/axes/CategoryAxis.js.map +1 -1
- package/.internal/charts/xy/axes/CategoryDateAxis.d.ts +1 -1
- package/.internal/charts/xy/axes/CategoryDateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/CategoryDateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.d.ts +16 -2
- package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.js +20 -5
- package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/EditableAxisLabel.d.ts +21 -0
- package/.internal/charts/xy/axes/EditableAxisLabel.d.ts.map +1 -0
- package/.internal/charts/xy/axes/EditableAxisLabel.js +31 -0
- package/.internal/charts/xy/axes/EditableAxisLabel.js.map +1 -0
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts +2 -2
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.d.ts +2 -2
- package/.internal/charts/xy/axes/ValueAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.js +4 -3
- package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.d.ts +5 -1
- package/.internal/charts/xy/series/BaseColumnSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.js +60 -32
- package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
- package/.internal/charts/xy/series/CandlestickSeries.d.ts +2 -1
- package/.internal/charts/xy/series/CandlestickSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/CandlestickSeries.js +99 -44
- package/.internal/charts/xy/series/CandlestickSeries.js.map +1 -1
- package/.internal/charts/xy/series/ColumnSeries.d.ts +39 -0
- package/.internal/charts/xy/series/ColumnSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/ColumnSeries.js +77 -1
- package/.internal/charts/xy/series/ColumnSeries.js.map +1 -1
- package/.internal/charts/xy/series/LineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/LineSeries.js.map +1 -1
- package/.internal/charts/xy/series/OHLC.d.ts +6 -0
- package/.internal/charts/xy/series/OHLC.d.ts.map +1 -1
- package/.internal/charts/xy/series/OHLC.js +6 -0
- package/.internal/charts/xy/series/OHLC.js.map +1 -1
- package/.internal/charts/xy/series/SmoothedXLineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/SmoothedXLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/SmoothedXYLineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/SmoothedXYLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/SmoothedYLineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/SmoothedYLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/StepLineSeries.d.ts +8 -2
- package/.internal/charts/xy/series/StepLineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/StepLineSeries.js +6 -0
- package/.internal/charts/xy/series/StepLineSeries.js.map +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/XYSeries.js +4 -1
- package/.internal/charts/xy/series/XYSeries.js.map +1 -1
- package/.internal/core/Classes.d.ts +28 -0
- package/.internal/core/Classes.d.ts.map +1 -1
- package/.internal/core/Classes.js.map +1 -1
- package/.internal/core/Registry.js +1 -1
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/Root.d.ts +8 -0
- package/.internal/core/Root.d.ts.map +1 -1
- package/.internal/core/Root.js +26 -19
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/render/Button.d.ts +4 -1
- package/.internal/core/render/Button.d.ts.map +1 -1
- package/.internal/core/render/Button.js.map +1 -1
- package/.internal/core/render/Component.d.ts +8 -0
- package/.internal/core/render/Component.d.ts.map +1 -1
- package/.internal/core/render/Component.js +17 -0
- package/.internal/core/render/Component.js.map +1 -1
- package/.internal/core/render/ConfirmButton.d.ts +30 -0
- package/.internal/core/render/ConfirmButton.d.ts.map +1 -0
- package/.internal/core/render/ConfirmButton.js +84 -0
- package/.internal/core/render/ConfirmButton.js.map +1 -0
- package/.internal/core/render/Container.d.ts +6 -0
- package/.internal/core/render/Container.d.ts.map +1 -1
- package/.internal/core/render/Container.js +49 -2
- package/.internal/core/render/Container.js.map +1 -1
- package/.internal/core/render/EditableLabel.d.ts.map +1 -1
- package/.internal/core/render/EditableLabel.js +6 -6
- package/.internal/core/render/EditableLabel.js.map +1 -1
- package/.internal/core/render/HeatLegend.d.ts +14 -0
- package/.internal/core/render/HeatLegend.d.ts.map +1 -1
- package/.internal/core/render/HeatLegend.js +16 -3
- package/.internal/core/render/HeatLegend.js.map +1 -1
- package/.internal/core/render/Link.d.ts +28 -0
- package/.internal/core/render/Link.d.ts.map +1 -0
- package/.internal/core/render/Link.js +90 -0
- package/.internal/core/render/Link.js.map +1 -0
- package/.internal/core/render/MonotoneXTension.d.ts.map +1 -1
- package/.internal/core/render/MonotoneXTension.js.map +1 -1
- package/.internal/core/render/MonotoneYTension.d.ts.map +1 -1
- package/.internal/core/render/MonotoneYTension.js.map +1 -1
- package/.internal/core/render/NumericStepper.d.ts +27 -0
- package/.internal/core/render/NumericStepper.d.ts.map +1 -0
- package/.internal/core/render/NumericStepper.js +117 -0
- package/.internal/core/render/NumericStepper.js.map +1 -0
- package/.internal/core/render/OrthogonalLine.d.ts +33 -0
- package/.internal/core/render/OrthogonalLine.d.ts.map +1 -0
- package/.internal/core/render/OrthogonalLine.js +97 -0
- package/.internal/core/render/OrthogonalLine.js.map +1 -0
- package/.internal/core/render/ProgressPie.d.ts +32 -0
- package/.internal/core/render/ProgressPie.d.ts.map +1 -0
- package/.internal/core/render/ProgressPie.js +89 -0
- package/.internal/core/render/ProgressPie.js.map +1 -0
- package/.internal/core/render/Series.d.ts +0 -7
- package/.internal/core/render/Series.d.ts.map +1 -1
- package/.internal/core/render/Series.js +24 -27
- package/.internal/core/render/Series.js.map +1 -1
- package/.internal/core/render/Sprite.d.ts +3 -2
- package/.internal/core/render/Sprite.d.ts.map +1 -1
- package/.internal/core/render/Sprite.js +40 -30
- package/.internal/core/render/Sprite.js.map +1 -1
- package/.internal/core/render/patterns/LinePattern.d.ts +8 -0
- package/.internal/core/render/patterns/LinePattern.d.ts.map +1 -1
- package/.internal/core/render/patterns/LinePattern.js +32 -1
- package/.internal/core/render/patterns/LinePattern.js.map +1 -1
- package/.internal/core/util/Entity.d.ts.map +1 -1
- package/.internal/core/util/Entity.js.map +1 -1
- package/.internal/core/util/EventDispatcher.d.ts +32 -3
- package/.internal/core/util/EventDispatcher.d.ts.map +1 -1
- package/.internal/core/util/EventDispatcher.js +51 -5
- package/.internal/core/util/EventDispatcher.js.map +1 -1
- package/.internal/core/util/Language.d.ts +2 -0
- package/.internal/core/util/Language.d.ts.map +1 -1
- package/.internal/core/util/Language.js.map +1 -1
- package/.internal/core/util/Time.d.ts.map +1 -1
- package/.internal/core/util/Time.js +4 -1
- package/.internal/core/util/Time.js.map +1 -1
- package/.internal/plugins/colorPicker/ColorPicker.d.ts +151 -0
- package/.internal/plugins/colorPicker/ColorPicker.d.ts.map +1 -0
- package/.internal/plugins/colorPicker/ColorPicker.js +665 -0
- package/.internal/plugins/colorPicker/ColorPicker.js.map +1 -0
- package/.internal/plugins/colorPicker/ColorPickerButton.d.ts +28 -0
- package/.internal/plugins/colorPicker/ColorPickerButton.d.ts.map +1 -0
- package/.internal/plugins/colorPicker/ColorPickerButton.js +87 -0
- package/.internal/plugins/colorPicker/ColorPickerButton.js.map +1 -0
- package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.d.ts +8 -0
- package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.d.ts.map +1 -0
- package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.js +248 -0
- package/.internal/plugins/colorPicker/ColorPickerDefaultTheme.js.map +1 -0
- package/.internal/plugins/json/Classes-script.d.ts +28 -0
- package/.internal/plugins/json/Classes-script.d.ts.map +1 -1
- package/.internal/plugins/json/Classes-script.js +14 -0
- package/.internal/plugins/json/Classes-script.js.map +1 -1
- package/.internal/plugins/json/Classes.d.ts +28 -0
- package/.internal/plugins/json/Classes.d.ts.map +1 -1
- package/.internal/plugins/json/Classes.js +14 -0
- package/.internal/plugins/json/Classes.js.map +1 -1
- package/.internal/themes/DefaultTheme.d.ts.map +1 -1
- package/.internal/themes/DefaultTheme.js +227 -2
- package/.internal/themes/DefaultTheme.js.map +1 -1
- package/CHANGELOG.md +37 -0
- package/examples/javascript/flow-arc-horizontal/package.json +1 -1
- package/examples/javascript/flow-arc-vertical/package.json +1 -1
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gantt/README.md +6 -0
- package/examples/javascript/gantt/index.css +11 -0
- package/examples/javascript/gantt/index.html +12 -0
- package/examples/javascript/gantt/index.js +228 -0
- package/examples/javascript/gantt/package.json +16 -0
- package/examples/javascript/gantt/webpack.config.js +38 -0
- package/examples/javascript/gantt-multilevel/README.md +6 -0
- package/examples/javascript/gantt-multilevel/index.css +11 -0
- package/examples/javascript/gantt-multilevel/index.html +12 -0
- package/examples/javascript/gantt-multilevel/index.js +90 -0
- package/examples/javascript/gantt-multilevel/package.json +16 -0
- package/examples/javascript/gantt-multilevel/webpack.config.js +38 -0
- package/examples/javascript/gantt-simple/README.md +6 -0
- package/examples/javascript/gantt-simple/index.css +11 -0
- package/examples/javascript/gantt-simple/index.html +12 -0
- package/examples/javascript/gantt-simple/index.js +90 -0
- package/examples/javascript/gantt-simple/package.json +16 -0
- package/examples/javascript/gantt-simple/webpack.config.js +38 -0
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json-pie/package.json +1 -1
- package/examples/javascript/json-xy/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-clustered-points/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/index.js +2 -0
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/index.js +2 -0
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/index.js +2 -0
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/index.js +2 -0
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/index.js +2 -0
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/index.js +1 -0
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/index.js +2 -0
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/timeline-horizontal-serpentine-chart/package.json +1 -1
- package/examples/javascript/timeline-linear-process-diagram/package.json +1 -1
- package/examples/javascript/timeline-serpentine-chart/package.json +1 -1
- package/examples/javascript/timeline-spiral-chart/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/index.js +1 -0
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-arc-horizontal/package.json +1 -1
- package/examples/typescript/flow-arc-vertical/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gantt/README.md +6 -0
- package/examples/typescript/gantt/index.css +11 -0
- package/examples/typescript/gantt/index.html +12 -0
- package/examples/typescript/gantt/index.ts +228 -0
- package/examples/typescript/gantt/package.json +18 -0
- package/examples/typescript/gantt/tsconfig.json +12 -0
- package/examples/typescript/gantt/webpack.config.js +45 -0
- package/examples/typescript/gantt-multilevel/README.md +6 -0
- package/examples/typescript/gantt-multilevel/index.css +11 -0
- package/examples/typescript/gantt-multilevel/index.html +12 -0
- package/examples/typescript/gantt-multilevel/index.ts +90 -0
- package/examples/typescript/gantt-multilevel/package.json +18 -0
- package/examples/typescript/gantt-multilevel/tsconfig.json +12 -0
- package/examples/typescript/gantt-multilevel/webpack.config.js +45 -0
- package/examples/typescript/gantt-simple/README.md +6 -0
- package/examples/typescript/gantt-simple/index.css +11 -0
- package/examples/typescript/gantt-simple/index.html +12 -0
- package/examples/typescript/gantt-simple/index.ts +90 -0
- package/examples/typescript/gantt-simple/package.json +18 -0
- package/examples/typescript/gantt-simple/tsconfig.json +12 -0
- package/examples/typescript/gantt-simple/webpack.config.js +45 -0
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json-pie/package.json +1 -1
- package/examples/typescript/json-xy/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-clustered-points/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/stock-chart/index.ts +2 -0
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/index.ts +2 -0
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/index.ts +2 -0
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/index.ts +2 -0
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/index.ts +2 -0
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-live/index.ts +1 -0
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/index.ts +2 -0
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/timeline-horizontal-serpentine-chart/package.json +1 -1
- package/examples/typescript/timeline-linear-process-diagram/package.json +1 -1
- package/examples/typescript/timeline-serpentine-chart/package.json +1 -1
- package/examples/typescript/timeline-spiral-chart/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/index.ts +1 -0
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/gantt.d.ts +9 -0
- package/gantt.d.ts.map +1 -0
- package/gantt.js +9 -0
- package/gantt.js.map +1 -0
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -1
- package/index.js +5 -0
- package/index.js.map +1 -1
- package/locales/ar.d.ts +4 -0
- package/locales/ar.d.ts.map +1 -1
- package/locales/ar.js +5 -0
- package/locales/ar.js.map +1 -1
- package/locales/bg_BG.d.ts +2 -0
- package/locales/bg_BG.d.ts.map +1 -1
- package/locales/bg_BG.js +3 -1
- package/locales/bg_BG.js.map +1 -1
- package/locales/bs_BA.d.ts +4 -0
- package/locales/bs_BA.d.ts.map +1 -1
- package/locales/bs_BA.js +5 -0
- package/locales/bs_BA.js.map +1 -1
- package/locales/ca_ES.d.ts +4 -0
- package/locales/ca_ES.d.ts.map +1 -1
- package/locales/ca_ES.js +5 -0
- package/locales/ca_ES.js.map +1 -1
- package/locales/cs_CZ.d.ts +4 -0
- package/locales/cs_CZ.d.ts.map +1 -1
- package/locales/cs_CZ.js +5 -0
- package/locales/cs_CZ.js.map +1 -1
- package/locales/da_DK.d.ts +4 -0
- package/locales/da_DK.d.ts.map +1 -1
- package/locales/da_DK.js +5 -0
- package/locales/da_DK.js.map +1 -1
- package/locales/de_CH.d.ts +4 -0
- package/locales/de_CH.d.ts.map +1 -1
- package/locales/de_CH.js +5 -0
- package/locales/de_CH.js.map +1 -1
- package/locales/de_DE.d.ts +4 -0
- package/locales/de_DE.d.ts.map +1 -1
- package/locales/de_DE.js +5 -0
- package/locales/de_DE.js.map +1 -1
- package/locales/el_GR.d.ts +4 -0
- package/locales/el_GR.d.ts.map +1 -1
- package/locales/el_GR.js +5 -0
- package/locales/el_GR.js.map +1 -1
- package/locales/en.d.ts +2 -0
- package/locales/en.d.ts.map +1 -1
- package/locales/en.js +3 -1
- package/locales/en.js.map +1 -1
- package/locales/en_CA.d.ts +4 -0
- package/locales/en_CA.d.ts.map +1 -1
- package/locales/en_CA.js +5 -0
- package/locales/en_CA.js.map +1 -1
- package/locales/en_US.d.ts +4 -0
- package/locales/en_US.d.ts.map +1 -1
- package/locales/en_US.js +5 -0
- package/locales/en_US.js.map +1 -1
- package/locales/es_ES.d.ts +4 -0
- package/locales/es_ES.d.ts.map +1 -1
- package/locales/es_ES.js +6 -1
- package/locales/es_ES.js.map +1 -1
- package/locales/et_EE.d.ts +4 -0
- package/locales/et_EE.d.ts.map +1 -1
- package/locales/et_EE.js +5 -0
- package/locales/et_EE.js.map +1 -1
- package/locales/fi_FI.d.ts +4 -0
- package/locales/fi_FI.d.ts.map +1 -1
- package/locales/fi_FI.js +5 -0
- package/locales/fi_FI.js.map +1 -1
- package/locales/fo_FO.d.ts +2 -0
- package/locales/fo_FO.d.ts.map +1 -1
- package/locales/fo_FO.js +3 -1
- package/locales/fo_FO.js.map +1 -1
- package/locales/fr_FR.d.ts +4 -0
- package/locales/fr_FR.d.ts.map +1 -1
- package/locales/fr_FR.js +5 -0
- package/locales/fr_FR.js.map +1 -1
- package/locales/he_IL.d.ts +4 -0
- package/locales/he_IL.d.ts.map +1 -1
- package/locales/he_IL.js +5 -0
- package/locales/he_IL.js.map +1 -1
- package/locales/hi_IN.d.ts +4 -0
- package/locales/hi_IN.d.ts.map +1 -1
- package/locales/hi_IN.js +5 -0
- package/locales/hi_IN.js.map +1 -1
- package/locales/hr_HR.d.ts +4 -0
- package/locales/hr_HR.d.ts.map +1 -1
- package/locales/hr_HR.js +5 -0
- package/locales/hr_HR.js.map +1 -1
- package/locales/hu_HU.d.ts +4 -0
- package/locales/hu_HU.d.ts.map +1 -1
- package/locales/hu_HU.js +5 -0
- package/locales/hu_HU.js.map +1 -1
- package/locales/id_ID.d.ts +4 -0
- package/locales/id_ID.d.ts.map +1 -1
- package/locales/id_ID.js +5 -0
- package/locales/id_ID.js.map +1 -1
- package/locales/it_IT.d.ts +4 -0
- package/locales/it_IT.d.ts.map +1 -1
- package/locales/it_IT.js +5 -0
- package/locales/it_IT.js.map +1 -1
- package/locales/ja_JP.d.ts +4 -0
- package/locales/ja_JP.d.ts.map +1 -1
- package/locales/ja_JP.js +5 -0
- package/locales/ja_JP.js.map +1 -1
- package/locales/ko_KR.d.ts +4 -0
- package/locales/ko_KR.d.ts.map +1 -1
- package/locales/ko_KR.js +5 -0
- package/locales/ko_KR.js.map +1 -1
- package/locales/lt_LT.d.ts +4 -0
- package/locales/lt_LT.d.ts.map +1 -1
- package/locales/lt_LT.js +5 -0
- package/locales/lt_LT.js.map +1 -1
- package/locales/lv_LV.d.ts +4 -0
- package/locales/lv_LV.d.ts.map +1 -1
- package/locales/lv_LV.js +5 -0
- package/locales/lv_LV.js.map +1 -1
- package/locales/nb_NO.d.ts +4 -0
- package/locales/nb_NO.d.ts.map +1 -1
- package/locales/nb_NO.js +5 -0
- package/locales/nb_NO.js.map +1 -1
- package/locales/nl_NL.d.ts +4 -0
- package/locales/nl_NL.d.ts.map +1 -1
- package/locales/nl_NL.js +5 -0
- package/locales/nl_NL.js.map +1 -1
- package/locales/pl_PL.d.ts +4 -0
- package/locales/pl_PL.d.ts.map +1 -1
- package/locales/pl_PL.js +5 -0
- package/locales/pl_PL.js.map +1 -1
- package/locales/pt_BR.d.ts +4 -0
- package/locales/pt_BR.d.ts.map +1 -1
- package/locales/pt_BR.js +5 -0
- package/locales/pt_BR.js.map +1 -1
- package/locales/pt_PT.d.ts +4 -0
- package/locales/pt_PT.d.ts.map +1 -1
- package/locales/pt_PT.js +5 -0
- package/locales/pt_PT.js.map +1 -1
- package/locales/ro_RO.d.ts +4 -0
- package/locales/ro_RO.d.ts.map +1 -1
- package/locales/ro_RO.js +5 -0
- package/locales/ro_RO.js.map +1 -1
- package/locales/ru_RU.d.ts +4 -0
- package/locales/ru_RU.d.ts.map +1 -1
- package/locales/ru_RU.js +5 -0
- package/locales/ru_RU.js.map +1 -1
- package/locales/sk_SK.d.ts +4 -0
- package/locales/sk_SK.d.ts.map +1 -1
- package/locales/sk_SK.js +5 -0
- package/locales/sk_SK.js.map +1 -1
- package/locales/sl_SL.d.ts +4 -0
- package/locales/sl_SL.d.ts.map +1 -1
- package/locales/sl_SL.js +5 -0
- package/locales/sl_SL.js.map +1 -1
- package/locales/sr_RS.d.ts +4 -0
- package/locales/sr_RS.d.ts.map +1 -1
- package/locales/sr_RS.js +5 -0
- package/locales/sr_RS.js.map +1 -1
- package/locales/sv_SE.d.ts +4 -0
- package/locales/sv_SE.d.ts.map +1 -1
- package/locales/sv_SE.js +5 -0
- package/locales/sv_SE.js.map +1 -1
- package/locales/th_TH.d.ts +4 -0
- package/locales/th_TH.d.ts.map +1 -1
- package/locales/th_TH.js +5 -0
- package/locales/th_TH.js.map +1 -1
- package/locales/tr_TR.d.ts +4 -0
- package/locales/tr_TR.d.ts.map +1 -1
- package/locales/tr_TR.js +5 -0
- package/locales/tr_TR.js.map +1 -1
- package/locales/uk_UA.d.ts +4 -0
- package/locales/uk_UA.d.ts.map +1 -1
- package/locales/uk_UA.js +5 -0
- package/locales/uk_UA.js.map +1 -1
- package/locales/vi_VN.d.ts +4 -0
- package/locales/vi_VN.d.ts.map +1 -1
- package/locales/vi_VN.js +5 -0
- package/locales/vi_VN.js.map +1 -1
- package/locales/zh_Hans.d.ts +4 -0
- package/locales/zh_Hans.d.ts.map +1 -1
- package/locales/zh_Hans.js +5 -0
- package/locales/zh_Hans.js.map +1 -1
- package/locales/zh_Hant.d.ts +4 -0
- package/locales/zh_Hant.d.ts.map +1 -1
- package/locales/zh_Hant.js +5 -0
- package/locales/zh_Hant.js.map +1 -1
- package/package.json +1 -1
- package/plugins/colorPicker.d.ts +3 -0
- package/plugins/colorPicker.d.ts.map +1 -0
- package/plugins/colorPicker.js +3 -0
- package/plugins/colorPicker.js.map +1 -0
- package/xy.d.ts +1 -0
- package/xy.d.ts.map +1 -1
- package/xy.js +1 -0
- 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
|