@progress/kendo-charts 2.7.2-dev.202502101310 → 2.7.2-develop.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/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/barcode/barcode-validator.js +10 -12
- package/dist/es/barcode/barcode.js +84 -96
- package/dist/es/barcode/encodings/code11.js +41 -57
- package/dist/es/barcode/encodings/code128.js +222 -354
- package/dist/es/barcode/encodings/code39-extended.js +20 -34
- package/dist/es/barcode/encodings/code39.js +49 -75
- package/dist/es/barcode/encodings/code93-extended.js +12 -24
- package/dist/es/barcode/encodings/code93.js +52 -70
- package/dist/es/barcode/encodings/ean13.js +28 -42
- package/dist/es/barcode/encodings/ean8.js +8 -18
- package/dist/es/barcode/encodings/encoding.js +18 -24
- package/dist/es/barcode/encodings/main.js +13 -10
- package/dist/es/barcode/encodings/msi.js +56 -112
- package/dist/es/barcode/encodings/postnet.js +31 -45
- package/dist/es/barcode/surface-size.js +2 -2
- package/dist/es/chart/aggregates/aggregates.js +23 -23
- package/dist/es/chart/aggregates/default-aggregates.js +10 -18
- package/dist/es/chart/aggregates/series-aggregator.js +42 -54
- package/dist/es/chart/animations/bar-chart-animation.js +15 -26
- package/dist/es/chart/animations/bubble-animation.js +7 -17
- package/dist/es/chart/animations/clip-animation.js +13 -23
- package/dist/es/chart/animations/fade-in-animation.js +6 -16
- package/dist/es/chart/animations/pie-animation.js +6 -16
- package/dist/es/chart/api-elements/chart-axis.js +14 -22
- package/dist/es/chart/api-elements/chart-pane.js +10 -8
- package/dist/es/chart/api-elements/chart-plotarea.js +4 -10
- package/dist/es/chart/api-elements/find-axis-by-name.js +1 -1
- package/dist/es/chart/area-chart/area-chart.js +46 -60
- package/dist/es/chart/area-chart/area-segment.js +46 -52
- package/dist/es/chart/area-chart/spline-area-segment.js +12 -21
- package/dist/es/chart/area-chart/step-area-segment.js +6 -15
- package/dist/es/chart/axis-group-range-tracker.js +14 -20
- package/dist/es/chart/bar-chart/bar-chart.js +65 -80
- package/dist/es/chart/bar-chart/bar-label.js +25 -32
- package/dist/es/chart/bar-chart/bar.js +76 -91
- package/dist/es/chart/box-plot-chart/box-plot-chart.js +33 -48
- package/dist/es/chart/box-plot-chart/box-plot.js +55 -68
- package/dist/es/chart/box-plot-chart/vertical-box-plot.js +13 -23
- package/dist/es/chart/bubble-chart/bubble-chart.js +51 -64
- package/dist/es/chart/bubble-chart/bubble.js +21 -27
- package/dist/es/chart/bullet-chart/bullet-chart.js +45 -57
- package/dist/es/chart/bullet-chart/bullet.js +48 -57
- package/dist/es/chart/bullet-chart/target.js +1 -11
- package/dist/es/chart/candlestick-chart/candlestick-chart.js +41 -55
- package/dist/es/chart/candlestick-chart/candlestick.js +60 -69
- package/dist/es/chart/categorical-chart.js +178 -206
- package/dist/es/chart/chart-container.js +30 -39
- package/dist/es/chart/chart.js +641 -701
- package/dist/es/chart/constants.js +103 -103
- package/dist/es/chart/crosshair/crosshair-tooltip.js +22 -34
- package/dist/es/chart/crosshair/crosshair.js +39 -47
- package/dist/es/chart/donut-chart/donut-chart.js +36 -48
- package/dist/es/chart/donut-chart/donut-segment.js +12 -24
- package/dist/es/chart/error-bars/categorical-error-bar.js +5 -15
- package/dist/es/chart/error-bars/error-bar-base.js +37 -49
- package/dist/es/chart/error-bars/error-range-calculator.js +46 -56
- package/dist/es/chart/error-bars/scatter-error-bar.js +6 -16
- package/dist/es/chart/funnel-chart/funnel-chart.js +86 -103
- package/dist/es/chart/funnel-chart/funnel-segment.js +46 -54
- package/dist/es/chart/funnel-chart/pyramid-chart.js +5 -11
- package/dist/es/chart/heatmap-chart/color-scale.js +7 -9
- package/dist/es/chart/heatmap-chart/heatmap-chart.js +87 -110
- package/dist/es/chart/heatmap-chart/heatmap-point.js +72 -78
- package/dist/es/chart/highlight.js +26 -36
- package/dist/es/chart/layout/cluster-layout.js +16 -25
- package/dist/es/chart/layout/radar-cluster-layout.js +15 -24
- package/dist/es/chart/layout/radar-stack-layout.js +10 -22
- package/dist/es/chart/layout/stack-wrap.js +12 -24
- package/dist/es/chart/layout/utils.js +2 -2
- package/dist/es/chart/legend/legend-item-line-area.js +8 -19
- package/dist/es/chart/legend/legend-item-line.js +21 -31
- package/dist/es/chart/legend/legend-item-marker.js +18 -28
- package/dist/es/chart/legend/legend-item-square.js +8 -18
- package/dist/es/chart/legend/legend-item.js +91 -105
- package/dist/es/chart/legend/legend-layout.js +18 -25
- package/dist/es/chart/legend/legend.js +68 -92
- package/dist/es/chart/line-chart/line-chart.js +35 -48
- package/dist/es/chart/line-chart/line-point.js +90 -103
- package/dist/es/chart/line-chart/line-segment.js +23 -34
- package/dist/es/chart/line-chart/spline-segment.js +10 -20
- package/dist/es/chart/line-chart/step-line-mixin.js +14 -17
- package/dist/es/chart/line-chart/step-line-segment.js +4 -14
- package/dist/es/chart/mixins/accessibility-attributes-mixin.js +7 -7
- package/dist/es/chart/mixins/clip-animation-mixin.js +7 -7
- package/dist/es/chart/mixins/line-chart-mixin.js +27 -31
- package/dist/es/chart/mixins/note-mixin.js +3 -3
- package/dist/es/chart/mixins/pie-chart-mixin.js +9 -9
- package/dist/es/chart/mixins/plotarea-events-mixin.js +1 -1
- package/dist/es/chart/mixins/point-events-mixin.js +1 -1
- package/dist/es/chart/ohlc-chart/ohlc-chart.js +4 -14
- package/dist/es/chart/ohlc-chart/ohlc-point.js +15 -28
- package/dist/es/chart/pan-and-zoom/accept-key.js +3 -3
- package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +25 -33
- package/dist/es/chart/pan-and-zoom/pannable.js +29 -37
- package/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js +3 -3
- package/dist/es/chart/pan-and-zoom/zoom-selection.js +61 -70
- package/dist/es/chart/pane.js +71 -79
- package/dist/es/chart/pie-chart/pie-chart.js +153 -183
- package/dist/es/chart/pie-chart/pie-segment.js +82 -98
- package/dist/es/chart/plotarea/categorical-plotarea.js +285 -318
- package/dist/es/chart/plotarea/donut-plotarea.js +12 -22
- package/dist/es/chart/plotarea/funnel-plotarea.js +17 -27
- package/dist/es/chart/plotarea/heatmap-plotarea.js +139 -167
- package/dist/es/chart/plotarea/pie-plotarea.js +15 -25
- package/dist/es/chart/plotarea/plotarea-base.js +423 -462
- package/dist/es/chart/plotarea/plotarea-factory.js +15 -20
- package/dist/es/chart/plotarea/polar-plotarea-base.js +37 -51
- package/dist/es/chart/plotarea/polar-plotarea.js +39 -49
- package/dist/es/chart/plotarea/radar-plotarea.js +55 -65
- package/dist/es/chart/plotarea/xy-plotarea.js +111 -128
- package/dist/es/chart/polar-area-chart/polar-area-chart.js +22 -36
- package/dist/es/chart/polar-area-chart/polar-area-segment.js +7 -17
- package/dist/es/chart/polar-area-chart/spline-polar-area-segment.js +15 -25
- package/dist/es/chart/polar-line-chart/polar-line-chart.js +2 -11
- package/dist/es/chart/polar-scatter-chart/polar-scatter-chart.js +6 -16
- package/dist/es/chart/radar-area-chart/radar-area-chart.js +11 -21
- package/dist/es/chart/radar-area-chart/radar-area-segment.js +3 -13
- package/dist/es/chart/radar-area-chart/spline-radar-area-segment.js +3 -13
- package/dist/es/chart/radar-bar-chart/radar-bar-chart.js +19 -29
- package/dist/es/chart/radar-bar-chart/radar-segment.js +6 -12
- package/dist/es/chart/radar-line-chart/radar-line-chart.js +26 -35
- package/dist/es/chart/range-area-chart/range-area-chart.js +46 -58
- package/dist/es/chart/range-area-chart/range-area-point.js +55 -66
- package/dist/es/chart/range-area-chart/range-area-segment.js +19 -28
- package/dist/es/chart/range-area-chart/range-line-point.js +4 -14
- package/dist/es/chart/range-area-chart/spline-range-area-segment.js +11 -18
- package/dist/es/chart/range-area-chart/step-range-area-segment.js +7 -16
- package/dist/es/chart/range-bar-chart/range-bar-chart.js +18 -29
- package/dist/es/chart/range-bar-chart/range-bar.js +10 -23
- package/dist/es/chart/register-charts.js +20 -16
- package/dist/es/chart/scatter-charts/scatter-chart.js +100 -122
- package/dist/es/chart/scatter-charts/scatter-line-chart.js +15 -25
- package/dist/es/chart/selection.js +176 -201
- package/dist/es/chart/series-binder.js +55 -66
- package/dist/es/chart/theme/base-theme.js +75 -79
- package/dist/es/chart/theme/load-theme.js +52 -52
- package/dist/es/chart/tooltip/base-tooltip.js +17 -24
- package/dist/es/chart/tooltip/shared-tooltip.js +25 -31
- package/dist/es/chart/tooltip/tooltip.js +10 -20
- package/dist/es/chart/trendlines/calculate-moving-average.js +11 -13
- package/dist/es/chart/trendlines/calculate-polynomial.js +24 -26
- package/dist/es/chart/trendlines/calculate-slope.js +12 -14
- package/dist/es/chart/trendlines/check-all-positive.js +2 -5
- package/dist/es/chart/trendlines/exponential-trendline.js +15 -24
- package/dist/es/chart/trendlines/get-scatter-trendline-data.js +6 -7
- package/dist/es/chart/trendlines/get-trendline-data.js +6 -6
- package/dist/es/chart/trendlines/linear-trendline.js +12 -21
- package/dist/es/chart/trendlines/logarithmic-trendline.js +14 -23
- package/dist/es/chart/trendlines/moving-average.js +15 -26
- package/dist/es/chart/trendlines/polynomial-trendline.js +13 -21
- package/dist/es/chart/trendlines/power-trendline.js +15 -24
- package/dist/es/chart/trendlines/scatter-exponential-trendline.js +15 -24
- package/dist/es/chart/trendlines/scatter-linear-trendline.js +10 -16
- package/dist/es/chart/trendlines/scatter-logarithmic-trendline.js +17 -27
- package/dist/es/chart/trendlines/scatter-moving-average.js +7 -10
- package/dist/es/chart/trendlines/scatter-polynomial-trendline.js +11 -16
- package/dist/es/chart/trendlines/scatter-power-trendline.js +15 -22
- package/dist/es/chart/trendlines/scatter-trendline-registry.js +1 -1
- package/dist/es/chart/trendlines/scatter-value-getter.js +2 -5
- package/dist/es/chart/trendlines/trendline-factory.js +1 -1
- package/dist/es/chart/trendlines/trendline-registry.js +1 -1
- package/dist/es/chart/trendlines/x-value-limits.js +6 -8
- package/dist/es/chart/utils/any-has-z-index.js +1 -1
- package/dist/es/chart/utils/bind-segments.js +8 -8
- package/dist/es/chart/utils/categories-count.js +3 -3
- package/dist/es/chart/utils/count-numbers.js +4 -4
- package/dist/es/chart/utils/create-out-of-range-points.js +13 -22
- package/dist/es/chart/utils/eval-options.js +7 -10
- package/dist/es/chart/utils/filter-series-by-type.js +4 -4
- package/dist/es/chart/utils/get-field.js +1 -1
- package/dist/es/chart/utils/has-gradient-overlay.js +1 -1
- package/dist/es/chart/utils/is-date-axis.js +2 -2
- package/dist/es/chart/utils/parse-date-category.js +2 -2
- package/dist/es/chart/utils/segment-visible.js +2 -2
- package/dist/es/chart/waterfall-chart/waterfall-chart.js +41 -55
- package/dist/es/chart/waterfall-chart/waterfall-segment.js +16 -24
- package/dist/es/chart-wizard/get-wizard-data-from-data-rows.js +5 -6
- package/dist/es/chart-wizard/messages.js +1 -1
- package/dist/es/chart-wizard/state.js +145 -137
- package/dist/es/chart-wizard.js +12 -12
- package/dist/es/common/add-class.js +3 -3
- package/dist/es/common/align-path-to-pixel.js +2 -2
- package/dist/es/common/auto-text-color.js +1 -1
- package/dist/es/common/constants.js +53 -53
- package/dist/es/common/create-hash-set.js +59 -65
- package/dist/es/common/cycleDown.js +1 -1
- package/dist/es/common/deep-extend.js +10 -12
- package/dist/es/common/element-scale.js +9 -9
- package/dist/es/common/element-styles.js +8 -8
- package/dist/es/common/event-map.js +4 -4
- package/dist/es/common/event-utils.js +13 -13
- package/dist/es/common/find.js +2 -2
- package/dist/es/common/font-loader.js +42 -44
- package/dist/es/common/get-aria-template.js +2 -4
- package/dist/es/common/get-spacing.js +2 -4
- package/dist/es/common/get-supported-features.js +7 -7
- package/dist/es/common/get-template.js +2 -4
- package/dist/es/common/getter.js +5 -5
- package/dist/es/common/grep.js +3 -3
- package/dist/es/common/has-classes.js +2 -2
- package/dist/es/common/hash-map.js +11 -11
- package/dist/es/common/instance-observer.js +28 -33
- package/dist/es/common/keys.js +1 -1
- package/dist/es/common/map.js +4 -4
- package/dist/es/common/matrix.js +142 -150
- package/dist/es/common/mousewheel-delta.js +2 -2
- package/dist/es/common/observable.js +40 -52
- package/dist/es/common/remove-class.js +1 -1
- package/dist/es/common/render-icon.js +50 -60
- package/dist/es/common/set-default-options.js +1 -1
- package/dist/es/common/sparse-array-limits.js +4 -4
- package/dist/es/common/user-events.js +124 -150
- package/dist/es/core/axis-label.js +38 -43
- package/dist/es/core/axis.js +293 -345
- package/dist/es/core/box-element.js +36 -46
- package/dist/es/core/box.js +75 -83
- package/dist/es/core/category-axis.js +265 -314
- package/dist/es/core/chart-element.js +98 -109
- package/dist/es/core/constants.js +3 -3
- package/dist/es/core/curve-processor.js +86 -93
- package/dist/es/core/date-category-axis.js +381 -413
- package/dist/es/core/date-value-axis.js +108 -118
- package/dist/es/core/float-element.js +54 -78
- package/dist/es/core/gradients.js +3 -3
- package/dist/es/core/logarithmic-axis.js +134 -186
- package/dist/es/core/mixins/grid-lines-mixin.js +18 -20
- package/dist/es/core/mixins/radar-numeric-axis-mixin.js +46 -51
- package/dist/es/core/note.js +58 -73
- package/dist/es/core/numeric-axis.js +111 -133
- package/dist/es/core/pattern.js +4 -8
- package/dist/es/core/point.js +25 -34
- package/dist/es/core/polar-axis.js +73 -91
- package/dist/es/core/radar-category-axis.js +90 -114
- package/dist/es/core/radar-logarithmic-axis.js +10 -20
- package/dist/es/core/radar-numeric-axis.js +10 -20
- package/dist/es/core/ring.js +61 -68
- package/dist/es/core/root-element.js +40 -48
- package/dist/es/core/sector.js +11 -17
- package/dist/es/core/shape-builder.js +13 -23
- package/dist/es/core/shape-element.js +27 -37
- package/dist/es/core/text-box.js +50 -59
- package/dist/es/core/text.js +13 -24
- package/dist/es/core/title.js +19 -25
- package/dist/es/core/utils/auto-axis-max.js +3 -3
- package/dist/es/core/utils/auto-axis-min.js +3 -3
- package/dist/es/core/utils/auto-major-unit.js +4 -4
- package/dist/es/core/utils/box-diff.js +9 -9
- package/dist/es/core/utils/create-axis-grid-line.js +2 -4
- package/dist/es/core/utils/create-axis-tick.js +2 -4
- package/dist/es/core/utils/guid.js +3 -3
- package/dist/es/core/utils/rect-to-box.js +2 -2
- package/dist/es/date-utils/absolute-date-diff.js +2 -2
- package/dist/es/date-utils/add-duration.js +5 -5
- package/dist/es/date-utils/ceil-date.js +1 -1
- package/dist/es/date-utils/constants.js +17 -17
- package/dist/es/date-utils/date-index.js +3 -3
- package/dist/es/date-utils/duration.js +1 -1
- package/dist/es/date-utils/lte-date-index.js +4 -4
- package/dist/es/date-utils/parse-date.js +1 -1
- package/dist/es/date-utils/parse-dates.js +2 -2
- package/dist/es/date-utils/start-of-week.js +3 -5
- package/dist/es/date-utils/to-date.js +1 -1
- package/dist/es/date-utils/to-time.js +2 -2
- package/dist/es/drawing-utils.js +18 -17
- package/dist/es/gauges/arc/arc-gauge.js +29 -38
- package/dist/es/gauges/arc/arc-scale.js +16 -29
- package/dist/es/gauges/arc/range-pointer-animation.js +16 -25
- package/dist/es/gauges/arc/range-pointer.js +25 -46
- package/dist/es/gauges/circular/circular-gauge.js +7 -17
- package/dist/es/gauges/constants.js +14 -14
- package/dist/es/gauges/gauge.js +84 -96
- package/dist/es/gauges/linear/arrow-linear-pointer-animation.js +13 -25
- package/dist/es/gauges/linear/arrow-linear-pointer.js +23 -35
- package/dist/es/gauges/linear/bar-linear-pointer-animation.js +15 -24
- package/dist/es/gauges/linear/bar-linear-pointer.js +38 -51
- package/dist/es/gauges/linear/linear-gauge.js +61 -83
- package/dist/es/gauges/linear/linear-pointer.js +25 -39
- package/dist/es/gauges/linear/linear-scale.js +57 -74
- package/dist/es/gauges/pointer.js +11 -21
- package/dist/es/gauges/radial/radial-gauge.js +58 -81
- package/dist/es/gauges/radial/radial-pointer-animation.js +9 -15
- package/dist/es/gauges/radial/radial-pointer.js +33 -48
- package/dist/es/gauges/radial/radial-scale.js +154 -186
- package/dist/es/gauges/utils/build-label-element.js +10 -12
- package/dist/es/gauges/utils/get-range.js +2 -2
- package/dist/es/gauges/utils/pad.js +3 -3
- package/dist/es/gauges/utils/unpad.js +1 -1
- package/dist/es/map/attribution.js +42 -52
- package/dist/es/map/constants.js +5 -5
- package/dist/es/map/crs.js +68 -112
- package/dist/es/map/datums.js +3 -3
- package/dist/es/map/extent.js +40 -54
- package/dist/es/map/layers/bubble.js +52 -70
- package/dist/es/map/layers/layer.js +50 -56
- package/dist/es/map/layers/marker.js +109 -129
- package/dist/es/map/layers/shape.js +111 -133
- package/dist/es/map/layers/tile.js +144 -170
- package/dist/es/map/location.js +70 -78
- package/dist/es/map/map.js +261 -291
- package/dist/es/map/navigator.js +33 -39
- package/dist/es/map/scroller/draggable.js +98 -134
- package/dist/es/map/scroller/fx.js +39 -46
- package/dist/es/map/scroller/scroller.js +144 -174
- package/dist/es/map/tooltip/tooltip.js +15 -25
- package/dist/es/map/utils.js +25 -26
- package/dist/es/map/zoom.js +30 -36
- package/dist/es/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +14 -26
- package/dist/es/qrcode/encodings/data-modes/byte-data-mode.js +15 -25
- package/dist/es/qrcode/encodings/data-modes/data-mode-instances.js +8 -7
- package/dist/es/qrcode/encodings/data-modes/numeric-data-mode.js +14 -24
- package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +15 -21
- package/dist/es/qrcode/encodings/encoders/iso-encoder.js +6 -16
- package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +28 -36
- package/dist/es/qrcode/encodings/encoding-result.js +4 -10
- package/dist/es/qrcode/encodings/encoding.js +68 -192
- package/dist/es/qrcode/encodings/free-cell-visitor.js +16 -24
- package/dist/es/qrcode/encodings/utils/choose-mode.js +44 -0
- package/dist/es/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
- package/dist/es/qrcode/encodings/utils/get-data-string.js +13 -0
- package/dist/es/qrcode/encodings/utils/get-modes.js +35 -0
- package/dist/es/qrcode/encodings/utils/get-version.js +23 -0
- package/dist/es/qrcode/encodings/utils/index.js +5 -0
- package/dist/es/qrcode/encodings/version-codewords.js +1 -1
- package/dist/es/qrcode/qrcode-validator.js +3 -5
- package/dist/es/qrcode/qrcode.js +104 -114
- package/dist/es/qrcode/utils.js +4 -4
- package/dist/es/sankey/calculation.js +286 -307
- package/dist/es/sankey/element.js +15 -23
- package/dist/es/sankey/label.js +29 -44
- package/dist/es/sankey/legend.js +15 -29
- package/dist/es/sankey/link.js +80 -98
- package/dist/es/sankey/node.js +26 -37
- package/dist/es/sankey/sankey.js +318 -385
- package/dist/es/sankey/title.js +9 -20
- package/dist/es/sankey/utils.js +18 -23
- package/dist/es/services/chart-service.js +24 -28
- package/dist/es/services/dom-events-builder.js +15 -15
- package/dist/es/services/format-service.js +30 -35
- package/dist/es/services/intl-service.js +14 -18
- package/dist/es/services/map-service.js +11 -11
- package/dist/es/services/template-service.js +9 -9
- package/dist/es/sparkline/shared-tooltip.js +11 -21
- package/dist/es/sparkline/sparkline.js +50 -60
- package/dist/es/stock/constants.js +3 -3
- package/dist/es/stock/fade-out-animation.js +12 -21
- package/dist/es/stock/navigator-hint.js +37 -49
- package/dist/es/stock/navigator.js +130 -161
- package/dist/es/stock/stock-chart.js +58 -67
- package/dist/es2015/chart/legend/legend-item.js +1 -1
- package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -1
- package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -1
- package/dist/es2015/qrcode/encodings/encoding.js +3 -127
- package/dist/es2015/qrcode/encodings/utils/choose-mode.js +44 -0
- package/dist/es2015/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
- package/dist/es2015/qrcode/encodings/utils/get-data-string.js +13 -0
- package/dist/es2015/qrcode/encodings/utils/get-modes.js +35 -0
- package/dist/es2015/qrcode/encodings/utils/get-version.js +23 -0
- package/dist/es2015/qrcode/encodings/utils/index.js +5 -0
- package/dist/npm/main.js +3222 -3589
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +19 -57
|
@@ -6,17 +6,15 @@ import { addDuration, parseDate, toDate, toTime } from '../date-utils';
|
|
|
6
6
|
import { Class, deepExtend, defined, getTemplate, InstanceObserver, last, limitValue, valueOrDefault } from '../common';
|
|
7
7
|
import { NAVIGATOR_AXIS, NAVIGATOR_PANE, DEFAULT_PANE } from './constants';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const ZOOM_ACCELERATION = 3;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Class.call(this);
|
|
11
|
+
class Navigator extends Class {
|
|
12
|
+
constructor(chart) {
|
|
13
|
+
super();
|
|
16
14
|
|
|
17
15
|
this.chart = chart;
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const options = this.options = deepExtend({}, this.options, chart.options.navigator);
|
|
17
|
+
const select = options.select;
|
|
20
18
|
if (select) {
|
|
21
19
|
select.from = this.parseDate(select.from);
|
|
22
20
|
select.to = this.parseDate(select.to);
|
|
@@ -26,19 +24,20 @@ var Navigator = (function (Class) {
|
|
|
26
24
|
options.hint.visible = options.visible;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
this.chartObserver = new InstanceObserver(this,
|
|
27
|
+
this.chartObserver = new InstanceObserver(this, {
|
|
28
|
+
[DRAG]: '_drag',
|
|
29
|
+
[DRAG_END]: '_dragEnd',
|
|
30
|
+
[ZOOM]: '_zoom',
|
|
31
|
+
[ZOOM_END]: '_zoomEnd'
|
|
32
|
+
});
|
|
30
33
|
chart.addObserver(this.chartObserver);
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
Navigator.prototype = Object.create( Class && Class.prototype );
|
|
35
|
-
Navigator.prototype.constructor = Navigator;
|
|
36
|
-
|
|
37
|
-
Navigator.prototype.parseDate = function parseDate$1 (value) {
|
|
36
|
+
parseDate(value) {
|
|
38
37
|
return parseDate(this.chart.chartService.intl, value);
|
|
39
|
-
}
|
|
38
|
+
}
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
clean() {
|
|
42
41
|
if (this.selection) {
|
|
43
42
|
this.selection.destroy();
|
|
44
43
|
this.selection = null;
|
|
@@ -48,35 +47,28 @@ var Navigator = (function (Class) {
|
|
|
48
47
|
this.hint.destroy();
|
|
49
48
|
this.hint = null;
|
|
50
49
|
}
|
|
51
|
-
}
|
|
50
|
+
}
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
destroy() {
|
|
54
53
|
if (this.chart) {
|
|
55
54
|
this.chart.removeObserver(this.chartObserver);
|
|
56
55
|
delete this.chart;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
this.clean();
|
|
60
|
-
}
|
|
59
|
+
}
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
redraw() {
|
|
63
62
|
this._redrawSelf();
|
|
64
63
|
this.initSelection();
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
var min = ref$1.min;
|
|
74
|
-
var max = ref$1.max;
|
|
75
|
-
var ref$2 = options.select;
|
|
76
|
-
var from = ref$2.from;
|
|
77
|
-
var to = ref$2.to;
|
|
78
|
-
var mousewheel = ref$2.mousewheel;
|
|
79
|
-
var axisClone = clone(axis);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
initSelection() {
|
|
67
|
+
const { chart, options } = this;
|
|
68
|
+
const axis = this.mainAxis();
|
|
69
|
+
const { min, max } = axis.roundedRange();
|
|
70
|
+
const { from, to, mousewheel } = options.select;
|
|
71
|
+
const axisClone = clone(axis);
|
|
80
72
|
|
|
81
73
|
if (axis.categoriesCount() === 0) {
|
|
82
74
|
return;
|
|
@@ -108,23 +100,21 @@ var Navigator = (function (Class) {
|
|
|
108
100
|
format: options.hint.format
|
|
109
101
|
});
|
|
110
102
|
}
|
|
111
|
-
}
|
|
103
|
+
}
|
|
112
104
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
105
|
+
setRange() {
|
|
106
|
+
const plotArea = this.chart._createPlotArea(true);
|
|
107
|
+
const axis = plotArea.namedCategoryAxes[NAVIGATOR_AXIS];
|
|
116
108
|
|
|
117
|
-
|
|
118
|
-
var min = ref.min;
|
|
119
|
-
var max = ref.max;
|
|
109
|
+
const { min, max } = axis.roundedRange();
|
|
120
110
|
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
const select = this.options.select || {};
|
|
112
|
+
let from = select.from || min;
|
|
123
113
|
if (from < min) {
|
|
124
114
|
from = min;
|
|
125
115
|
}
|
|
126
116
|
|
|
127
|
-
|
|
117
|
+
let to = select.to || max;
|
|
128
118
|
if (to > max) {
|
|
129
119
|
to = max;
|
|
130
120
|
}
|
|
@@ -135,20 +125,20 @@ var Navigator = (function (Class) {
|
|
|
135
125
|
});
|
|
136
126
|
|
|
137
127
|
this.filterAxes();
|
|
138
|
-
}
|
|
128
|
+
}
|
|
139
129
|
|
|
140
|
-
|
|
141
|
-
|
|
130
|
+
_redrawSelf(silent) {
|
|
131
|
+
const plotArea = this.chart._plotArea;
|
|
142
132
|
|
|
143
133
|
if (plotArea) {
|
|
144
134
|
plotArea.redraw(last(plotArea.panes), silent);
|
|
145
135
|
}
|
|
146
|
-
}
|
|
136
|
+
}
|
|
147
137
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
138
|
+
redrawSlaves() {
|
|
139
|
+
const chart = this.chart;
|
|
140
|
+
const plotArea = chart._plotArea;
|
|
141
|
+
const slavePanes = plotArea.panes.filter(pane => pane.options.name !== NAVIGATOR_PANE);
|
|
152
142
|
|
|
153
143
|
// Update the original series and categoryAxis before partial refresh.
|
|
154
144
|
plotArea.srcSeries = chart.options.series;
|
|
@@ -156,20 +146,18 @@ var Navigator = (function (Class) {
|
|
|
156
146
|
plotArea.clearSeriesPointsCache();
|
|
157
147
|
|
|
158
148
|
plotArea.redraw(slavePanes);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
var select = this.options.select;
|
|
172
|
-
var duration;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
_drag(e) {
|
|
152
|
+
const { chart, selection } = this;
|
|
153
|
+
const coords = chart._eventCoordinates(e.originalEvent);
|
|
154
|
+
const navigatorAxis = this.mainAxis();
|
|
155
|
+
const naviRange = navigatorAxis.roundedRange();
|
|
156
|
+
const inNavigator = navigatorAxis.pane.box.containsPoint(coords);
|
|
157
|
+
const axis = chart._plotArea.categoryAxis;
|
|
158
|
+
const range = e.axisRanges[axis.options.name];
|
|
159
|
+
const select = this.options.select;
|
|
160
|
+
let duration;
|
|
173
161
|
|
|
174
162
|
if (!range || inNavigator || !selection) {
|
|
175
163
|
return;
|
|
@@ -181,12 +169,12 @@ var Navigator = (function (Class) {
|
|
|
181
169
|
duration = toTime(selection.options.to) - toTime(selection.options.from);
|
|
182
170
|
}
|
|
183
171
|
|
|
184
|
-
|
|
172
|
+
const from = toDate(limitValue(
|
|
185
173
|
toTime(range.min),
|
|
186
174
|
naviRange.min, toTime(naviRange.max) - duration
|
|
187
175
|
));
|
|
188
176
|
|
|
189
|
-
|
|
177
|
+
const to = toDate(limitValue(
|
|
190
178
|
toTime(from) + duration,
|
|
191
179
|
toTime(naviRange.min) + duration, naviRange.max
|
|
192
180
|
));
|
|
@@ -201,9 +189,9 @@ var Navigator = (function (Class) {
|
|
|
201
189
|
selection.set(from, to);
|
|
202
190
|
|
|
203
191
|
this.showHint(from, to);
|
|
204
|
-
}
|
|
192
|
+
}
|
|
205
193
|
|
|
206
|
-
|
|
194
|
+
_dragEnd() {
|
|
207
195
|
this.filterAxes();
|
|
208
196
|
this.filter();
|
|
209
197
|
this.redrawSlaves();
|
|
@@ -211,53 +199,44 @@ var Navigator = (function (Class) {
|
|
|
211
199
|
if (this.hint) {
|
|
212
200
|
this.hint.hide();
|
|
213
201
|
}
|
|
214
|
-
}
|
|
202
|
+
}
|
|
215
203
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
var ref_selection_options = ref.selection.options;
|
|
219
|
-
var from = ref_selection_options.from;
|
|
220
|
-
var to = ref_selection_options.to;
|
|
221
|
-
var select = ref.options.select;
|
|
204
|
+
readSelection() {
|
|
205
|
+
const { selection: { options: { from, to } }, options: { select } } = this;
|
|
222
206
|
|
|
223
207
|
select.from = from;
|
|
224
208
|
select.to = to;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
for (var idx = 0; idx < allAxes.length; idx++) {
|
|
236
|
-
var axis = allAxes[idx];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
filterAxes() {
|
|
212
|
+
const { options: { select = { } }, chart } = this;
|
|
213
|
+
const allAxes = chart.options.categoryAxis;
|
|
214
|
+
const { from, to } = select;
|
|
215
|
+
|
|
216
|
+
for (let idx = 0; idx < allAxes.length; idx++) {
|
|
217
|
+
const axis = allAxes[idx];
|
|
237
218
|
if (axis.pane !== NAVIGATOR_PANE) {
|
|
238
219
|
axis.min = from;
|
|
239
220
|
axis.max = to;
|
|
240
221
|
}
|
|
241
222
|
}
|
|
242
|
-
}
|
|
223
|
+
}
|
|
243
224
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
var chart = ref.chart;
|
|
247
|
-
var select = ref.options.select;
|
|
225
|
+
filter() {
|
|
226
|
+
const { chart, options: { select } } = this;
|
|
248
227
|
|
|
249
228
|
if (!chart.requiresHandlers([ "navigatorFilter" ])) {
|
|
250
229
|
return;
|
|
251
230
|
}
|
|
252
231
|
|
|
253
|
-
|
|
254
|
-
|
|
232
|
+
const mainAxis = this.mainAxis();
|
|
233
|
+
const args = {
|
|
255
234
|
from: select.from,
|
|
256
235
|
to: select.to
|
|
257
236
|
};
|
|
258
237
|
|
|
259
238
|
if (mainAxis.options.type !== 'category') {
|
|
260
|
-
|
|
239
|
+
const axisOptions = new DateCategoryAxis(deepExtend({
|
|
261
240
|
baseUnit: "fit"
|
|
262
241
|
}, chart.options.categoryAxis[0], {
|
|
263
242
|
categories: [ select.from, select.to ]
|
|
@@ -268,25 +247,20 @@ var Navigator = (function (Class) {
|
|
|
268
247
|
}
|
|
269
248
|
|
|
270
249
|
this.chart.trigger("navigatorFilter", args);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
var ref_options = ref.options;
|
|
278
|
-
var select = ref_options.select;
|
|
279
|
-
var liveDrag = ref_options.liveDrag;
|
|
280
|
-
var mainAxis = this.mainAxis();
|
|
281
|
-
var delta = e.delta;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
_zoom(e) {
|
|
253
|
+
const { chart: { _plotArea: { categoryAxis: axis } }, selection, options: { select, liveDrag } } = this;
|
|
254
|
+
const mainAxis = this.mainAxis();
|
|
255
|
+
let delta = e.delta;
|
|
282
256
|
|
|
283
257
|
if (!selection) {
|
|
284
258
|
return;
|
|
285
259
|
}
|
|
286
260
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
261
|
+
const fromIx = mainAxis.categoryIndex(selection.options.from);
|
|
262
|
+
const toIx = mainAxis.categoryIndex(selection.options.to);
|
|
263
|
+
const coords = this.chart._eventCoordinates(e.originalEvent);
|
|
290
264
|
|
|
291
265
|
e.originalEvent.preventDefault();
|
|
292
266
|
|
|
@@ -310,31 +284,31 @@ var Navigator = (function (Class) {
|
|
|
310
284
|
selection.set(select.from, select.to);
|
|
311
285
|
|
|
312
286
|
this.showHint(this.options.select.from, this.options.select.to);
|
|
313
|
-
}
|
|
287
|
+
}
|
|
314
288
|
|
|
315
|
-
|
|
289
|
+
_zoomEnd(e) {
|
|
316
290
|
this._dragEnd(e);
|
|
317
|
-
}
|
|
291
|
+
}
|
|
318
292
|
|
|
319
|
-
|
|
320
|
-
|
|
293
|
+
showHint(from, to) {
|
|
294
|
+
const plotArea = this.chart._plotArea;
|
|
321
295
|
|
|
322
296
|
if (this.hint) {
|
|
323
297
|
this.hint.show(from, to, plotArea.backgroundBox());
|
|
324
298
|
}
|
|
325
|
-
}
|
|
299
|
+
}
|
|
326
300
|
|
|
327
|
-
|
|
301
|
+
_selectStart(e) {
|
|
328
302
|
return this.chart._selectStart(e);
|
|
329
|
-
}
|
|
303
|
+
}
|
|
330
304
|
|
|
331
|
-
|
|
305
|
+
_select(e) {
|
|
332
306
|
this.showHint(e.from, e.to);
|
|
333
307
|
|
|
334
308
|
return this.chart._select(e);
|
|
335
|
-
}
|
|
309
|
+
}
|
|
336
310
|
|
|
337
|
-
|
|
311
|
+
_selectEnd(e) {
|
|
338
312
|
if (this.hint) {
|
|
339
313
|
this.hint.hide();
|
|
340
314
|
}
|
|
@@ -345,18 +319,18 @@ var Navigator = (function (Class) {
|
|
|
345
319
|
this.redrawSlaves();
|
|
346
320
|
|
|
347
321
|
return this.chart._selectEnd(e);
|
|
348
|
-
}
|
|
322
|
+
}
|
|
349
323
|
|
|
350
|
-
|
|
351
|
-
|
|
324
|
+
mainAxis() {
|
|
325
|
+
const plotArea = this.chart._plotArea;
|
|
352
326
|
|
|
353
327
|
if (plotArea) {
|
|
354
328
|
return plotArea.namedCategoryAxes[NAVIGATOR_AXIS];
|
|
355
329
|
}
|
|
356
|
-
}
|
|
330
|
+
}
|
|
357
331
|
|
|
358
|
-
|
|
359
|
-
|
|
332
|
+
select(from, to) {
|
|
333
|
+
const select = this.options.select;
|
|
360
334
|
|
|
361
335
|
if (from && to) {
|
|
362
336
|
select.from = this.parseDate(from);
|
|
@@ -373,20 +347,17 @@ var Navigator = (function (Class) {
|
|
|
373
347
|
from: select.from,
|
|
374
348
|
to: select.to
|
|
375
349
|
};
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
Navigator.setup = function setup (options, themeOptions) {
|
|
379
|
-
if ( options === void 0 ) options = {};
|
|
380
|
-
if ( themeOptions === void 0 ) themeOptions = {};
|
|
350
|
+
}
|
|
381
351
|
|
|
352
|
+
static setup(options = {}, themeOptions = {}) {
|
|
382
353
|
if (options.__navi) {
|
|
383
354
|
return;
|
|
384
355
|
}
|
|
385
356
|
options.__navi = true;
|
|
386
357
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
358
|
+
const naviOptions = deepExtend({}, themeOptions.navigator, options.navigator);
|
|
359
|
+
const panes = options.panes = [].concat(options.panes);
|
|
360
|
+
const paneOptions = deepExtend({}, naviOptions.pane, { name: NAVIGATOR_PANE });
|
|
390
361
|
|
|
391
362
|
if (!naviOptions.visible) {
|
|
392
363
|
paneOptions.visible = false;
|
|
@@ -399,27 +370,27 @@ var Navigator = (function (Class) {
|
|
|
399
370
|
panes.unshift(paneOptions);
|
|
400
371
|
}
|
|
401
372
|
|
|
402
|
-
panes.forEach(
|
|
373
|
+
panes.forEach(pane => {
|
|
403
374
|
pane.name = pane.name || DEFAULT_PANE;
|
|
404
375
|
});
|
|
405
376
|
|
|
406
377
|
Navigator.attachAxes(options, naviOptions);
|
|
407
378
|
Navigator.attachSeries(options, naviOptions, themeOptions);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
allAxes.forEach(
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
static attachAxes(options, naviOptions) {
|
|
382
|
+
const series = naviOptions.series || [];
|
|
383
|
+
const categoryAxes = options.categoryAxis = [].concat(options.categoryAxis);
|
|
384
|
+
const valueAxes = options.valueAxis = [].concat(options.valueAxis);
|
|
385
|
+
const allAxes = categoryAxes.concat(valueAxes);
|
|
386
|
+
allAxes.forEach(axis => {
|
|
416
387
|
axis.pane = axis.pane || DEFAULT_PANE;
|
|
417
388
|
});
|
|
418
389
|
|
|
419
|
-
|
|
420
|
-
|
|
390
|
+
const equallySpacedSeries = filterSeriesByType(series, EQUALLY_SPACED_SERIES);
|
|
391
|
+
const justifyAxis = equallySpacedSeries.length === 0;
|
|
421
392
|
|
|
422
|
-
|
|
393
|
+
const base = deepExtend({
|
|
423
394
|
type: "date",
|
|
424
395
|
pane: NAVIGATOR_PANE,
|
|
425
396
|
roundToBaseUnit: !justifyAxis,
|
|
@@ -438,7 +409,7 @@ var Navigator = (function (Class) {
|
|
|
438
409
|
years: [ 1 ]
|
|
439
410
|
}
|
|
440
411
|
});
|
|
441
|
-
|
|
412
|
+
const user = naviOptions.categoryAxis;
|
|
442
413
|
|
|
443
414
|
categoryAxes.push(
|
|
444
415
|
deepExtend({}, base, {
|
|
@@ -481,15 +452,15 @@ var Navigator = (function (Class) {
|
|
|
481
452
|
},
|
|
482
453
|
visible: false
|
|
483
454
|
}, naviOptions.valueAxis));
|
|
484
|
-
}
|
|
455
|
+
}
|
|
485
456
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
457
|
+
static attachSeries(options, naviOptions, themeOptions) {
|
|
458
|
+
const series = options.series = options.series || [];
|
|
459
|
+
const navigatorSeries = [].concat(naviOptions.series || []);
|
|
460
|
+
const seriesColors = themeOptions.seriesColors;
|
|
461
|
+
const defaults = naviOptions.seriesDefaults;
|
|
491
462
|
|
|
492
|
-
for (
|
|
463
|
+
for (let idx = 0; idx < navigatorSeries.length; idx++) {
|
|
493
464
|
series.push(
|
|
494
465
|
deepExtend({
|
|
495
466
|
color: seriesColors[idx % seriesColors.length],
|
|
@@ -505,10 +476,8 @@ var Navigator = (function (Class) {
|
|
|
505
476
|
})
|
|
506
477
|
);
|
|
507
478
|
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
return Navigator;
|
|
511
|
-
}(Class));
|
|
479
|
+
}
|
|
480
|
+
}
|
|
512
481
|
|
|
513
482
|
function ClonedObject() { }
|
|
514
483
|
function clone(obj) {
|