@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
|
@@ -29,21 +29,12 @@ import { BAR, COLUMN, BULLET, VERTICAL_BULLET, LINE, VERTICAL_LINE, AREA, VERTIC
|
|
|
29
29
|
import { DATE, MAX_VALUE } from '../../common/constants';
|
|
30
30
|
import { setDefaultOptions, inArray, deepExtend, defined, eventElement, grep, cycleIndex, hasOwnProperty } from '../../common';
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const AREA_SERIES = [ AREA, VERTICAL_AREA, RANGE_AREA, VERTICAL_RANGE_AREA ];
|
|
33
|
+
const OUT_OF_RANGE_SERIES = [ LINE, VERTICAL_LINE ].concat(AREA_SERIES);
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
function CategoricalPlotArea () {
|
|
37
|
-
PlotAreaBase.apply(this, arguments);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if ( PlotAreaBase ) CategoricalPlotArea.__proto__ = PlotAreaBase;
|
|
41
|
-
CategoricalPlotArea.prototype = Object.create( PlotAreaBase && PlotAreaBase.prototype );
|
|
42
|
-
CategoricalPlotArea.prototype.constructor = CategoricalPlotArea;
|
|
43
|
-
|
|
44
|
-
CategoricalPlotArea.prototype.initFields = function initFields (series) {
|
|
45
|
-
var this$1 = this;
|
|
35
|
+
class CategoricalPlotArea extends PlotAreaBase {
|
|
46
36
|
|
|
37
|
+
initFields(series) {
|
|
47
38
|
this.namedCategoryAxes = {};
|
|
48
39
|
this.namedValueAxes = {};
|
|
49
40
|
this.valueAxisRangeTracker = new AxisGroupRangeTracker();
|
|
@@ -56,20 +47,18 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
56
47
|
RANGE_BAR, HORIZONTAL_WATERFALL, VERTICAL_BOX_PLOT ]
|
|
57
48
|
);
|
|
58
49
|
|
|
59
|
-
for (
|
|
60
|
-
|
|
50
|
+
for (let i = 0; i < series.length; i++) {
|
|
51
|
+
const stack = series[i].stack;
|
|
61
52
|
if (stack && stack.type === "100%") {
|
|
62
|
-
this
|
|
53
|
+
this.stack100 = true;
|
|
63
54
|
break;
|
|
64
55
|
}
|
|
65
56
|
}
|
|
66
57
|
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
CategoricalPlotArea.prototype.render = function render (panes) {
|
|
70
|
-
if ( panes === void 0 ) panes = this.panes;
|
|
58
|
+
}
|
|
71
59
|
|
|
72
|
-
|
|
60
|
+
render(panes = this.panes) {
|
|
61
|
+
this.series = [...this.originalSeries];
|
|
73
62
|
this.createCategoryAxes(panes);
|
|
74
63
|
|
|
75
64
|
this.aggregateCategories(panes);
|
|
@@ -78,12 +67,12 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
78
67
|
this.createCategoryAxesLabels(panes);
|
|
79
68
|
this.createCharts(panes);
|
|
80
69
|
this.createValueAxes(panes);
|
|
81
|
-
}
|
|
70
|
+
}
|
|
82
71
|
|
|
83
|
-
|
|
84
|
-
|
|
72
|
+
removeAxis(axis) {
|
|
73
|
+
const axisName = axis.options.name;
|
|
85
74
|
|
|
86
|
-
|
|
75
|
+
super.removeAxis(axis);
|
|
87
76
|
|
|
88
77
|
if (axis instanceof CategoryAxis) {
|
|
89
78
|
delete this.namedCategoryAxes[axisName];
|
|
@@ -99,16 +88,16 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
99
88
|
if (axis === this.valueAxis) {
|
|
100
89
|
delete this.valueAxis;
|
|
101
90
|
}
|
|
102
|
-
}
|
|
91
|
+
}
|
|
103
92
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
trendlineFactory(options, series) {
|
|
94
|
+
const categoryAxis = this.seriesCategoryAxis(options);
|
|
95
|
+
const seriesValues = this.seriesValues.bind(this, series.index);
|
|
107
96
|
|
|
108
|
-
|
|
109
|
-
options
|
|
110
|
-
categoryAxis
|
|
111
|
-
seriesValues
|
|
97
|
+
const trendline = trendlineFactory(trendlineRegistry, options.type, {
|
|
98
|
+
options,
|
|
99
|
+
categoryAxis,
|
|
100
|
+
seriesValues
|
|
112
101
|
});
|
|
113
102
|
|
|
114
103
|
if (trendline) {
|
|
@@ -120,26 +109,24 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
120
109
|
}
|
|
121
110
|
|
|
122
111
|
return trendline;
|
|
123
|
-
}
|
|
112
|
+
}
|
|
124
113
|
|
|
125
|
-
|
|
114
|
+
trendlineAggregateForecast() {
|
|
126
115
|
return this.series
|
|
127
|
-
.map(
|
|
128
|
-
.filter(
|
|
129
|
-
.reduce(
|
|
116
|
+
.map(series => (series.trendline || {}).forecast)
|
|
117
|
+
.filter(forecast => forecast !== undefined)
|
|
118
|
+
.reduce((result, forecast) => ({
|
|
130
119
|
before: Math.max(result.before, forecast.before || 0),
|
|
131
120
|
after: Math.max(result.after, forecast.after || 0)
|
|
132
|
-
})
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
CategoricalPlotArea.prototype.seriesValues = function seriesValues (seriesIx, range) {
|
|
136
|
-
var this$1 = this;
|
|
121
|
+
}), { before: 0, after: 0 });
|
|
122
|
+
}
|
|
137
123
|
|
|
138
|
-
|
|
124
|
+
seriesValues(seriesIx, range) {
|
|
125
|
+
const result = [];
|
|
139
126
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
127
|
+
let series = this.srcSeries[seriesIx];
|
|
128
|
+
const categoryAxis = this.seriesCategoryAxis(series);
|
|
129
|
+
const dateAxis = equalsIgnoreCase(categoryAxis.options.type, DATE);
|
|
143
130
|
if (dateAxis) {
|
|
144
131
|
this._seriesPointsCache = {};
|
|
145
132
|
this._currentPointsCache = {};
|
|
@@ -147,39 +134,37 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
147
134
|
series = this.aggregateSeries(series, categoryAxis, categoryAxis.totalRangeIndices());
|
|
148
135
|
}
|
|
149
136
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
for (
|
|
153
|
-
|
|
154
|
-
result.push({ categoryIx
|
|
137
|
+
const min = range ? range.min : 0;
|
|
138
|
+
const max = range ? range.max : series.data.length;
|
|
139
|
+
for (let categoryIx = min; categoryIx < max; categoryIx++) {
|
|
140
|
+
const data = this.bindPoint(series, categoryIx);
|
|
141
|
+
result.push({ categoryIx, category: data.fields.category, valueFields: data.valueFields });
|
|
155
142
|
}
|
|
156
143
|
|
|
157
144
|
return result;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
CategoricalPlotArea.prototype.createCharts = function createCharts (panes) {
|
|
161
|
-
var this$1 = this;
|
|
145
|
+
}
|
|
162
146
|
|
|
163
|
-
|
|
147
|
+
createCharts(panes) {
|
|
148
|
+
const seriesByPane = this.groupSeriesByPane();
|
|
164
149
|
|
|
165
|
-
for (
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
this
|
|
150
|
+
for (let i = 0; i < panes.length; i++) {
|
|
151
|
+
const pane = panes[i];
|
|
152
|
+
const paneSeries = seriesByPane[pane.options.name || "default"] || [];
|
|
153
|
+
this.addToLegend(paneSeries);
|
|
169
154
|
|
|
170
|
-
|
|
155
|
+
const visibleSeries = this.filterVisibleSeries(paneSeries);
|
|
171
156
|
if (!visibleSeries) {
|
|
172
157
|
continue;
|
|
173
158
|
}
|
|
174
159
|
|
|
175
|
-
|
|
176
|
-
for (
|
|
177
|
-
this
|
|
160
|
+
const groups = this.groupSeriesByCategoryAxis(visibleSeries);
|
|
161
|
+
for (let groupIx = 0; groupIx < groups.length; groupIx++) {
|
|
162
|
+
this.createChartGroup(groups[groupIx], pane);
|
|
178
163
|
}
|
|
179
164
|
}
|
|
180
|
-
}
|
|
165
|
+
}
|
|
181
166
|
|
|
182
|
-
|
|
167
|
+
createChartGroup(series, pane) {
|
|
183
168
|
this.createAreaChart(
|
|
184
169
|
filterSeriesByType(series, [ AREA, VERTICAL_AREA ]), pane
|
|
185
170
|
);
|
|
@@ -219,28 +204,26 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
219
204
|
this.createLineChart(
|
|
220
205
|
filterSeriesByType(series, [ LINE, VERTICAL_LINE ]), pane
|
|
221
206
|
);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
CategoricalPlotArea.prototype.aggregateCategories = function aggregateCategories (panes) {
|
|
225
|
-
var this$1 = this;
|
|
207
|
+
}
|
|
226
208
|
|
|
227
|
-
|
|
228
|
-
|
|
209
|
+
aggregateCategories(panes) {
|
|
210
|
+
const series = [...this.series];
|
|
211
|
+
const processedSeries = [];
|
|
229
212
|
this._currentPointsCache = {};
|
|
230
213
|
this._seriesPointsCache = this._seriesPointsCache || {};
|
|
231
214
|
|
|
232
|
-
for (
|
|
233
|
-
|
|
215
|
+
for (let i = 0; i < series.length; i++) {
|
|
216
|
+
let currentSeries = series[i];
|
|
234
217
|
|
|
235
|
-
if (!this
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
218
|
+
if (!this.isTrendline(currentSeries)) {
|
|
219
|
+
const categoryAxis = this.seriesCategoryAxis(currentSeries);
|
|
220
|
+
const axisPane = this.findPane(categoryAxis.options.pane);
|
|
221
|
+
const dateAxis = equalsIgnoreCase(categoryAxis.options.type, DATE);
|
|
239
222
|
|
|
240
223
|
if ((dateAxis || currentSeries.categoryField) && inArray(axisPane, panes)) {
|
|
241
|
-
currentSeries = this
|
|
224
|
+
currentSeries = this.aggregateSeries(currentSeries, categoryAxis, categoryAxis.currentRangeIndices());
|
|
242
225
|
} else {
|
|
243
|
-
currentSeries = this
|
|
226
|
+
currentSeries = this.filterSeries(currentSeries, categoryAxis);
|
|
244
227
|
}
|
|
245
228
|
}
|
|
246
229
|
|
|
@@ -252,59 +235,57 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
252
235
|
|
|
253
236
|
this.srcSeries = series;
|
|
254
237
|
this.series = processedSeries;
|
|
255
|
-
}
|
|
238
|
+
}
|
|
256
239
|
|
|
257
|
-
|
|
258
|
-
|
|
240
|
+
filterSeries(series, categoryAxis) {
|
|
241
|
+
const dataLength = (series.data || {}).length;
|
|
259
242
|
categoryAxis._seriesMax = Math.max(categoryAxis._seriesMax || 0, dataLength);
|
|
260
243
|
|
|
261
244
|
if (!(defined(categoryAxis.options.min) || defined(categoryAxis.options.max))) {
|
|
262
245
|
return series;
|
|
263
246
|
}
|
|
264
247
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
248
|
+
const range = categoryAxis.currentRangeIndices();
|
|
249
|
+
const outOfRangePoints = inArray(series.type, OUT_OF_RANGE_SERIES);
|
|
250
|
+
const currentSeries = deepExtend({}, series);
|
|
268
251
|
|
|
269
252
|
currentSeries.data = (currentSeries.data || []).slice(range.min, range.max + 1);
|
|
270
253
|
|
|
271
254
|
if (outOfRangePoints) {
|
|
272
|
-
createOutOfRangePoints(currentSeries, range, dataLength,
|
|
255
|
+
createOutOfRangePoints(currentSeries, range, dataLength, (idx) => ({
|
|
273
256
|
item: series.data[idx],
|
|
274
257
|
category: categoryAxis.categoryAt(idx, true),
|
|
275
258
|
categoryIx: idx - range.min
|
|
276
|
-
})
|
|
259
|
+
}), (idx) => defined(series.data[idx]));
|
|
277
260
|
}
|
|
278
261
|
|
|
279
262
|
return currentSeries;
|
|
280
|
-
}
|
|
263
|
+
}
|
|
281
264
|
|
|
282
|
-
|
|
265
|
+
clearSeriesPointsCache() {
|
|
283
266
|
this._seriesPointsCache = {};
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
CategoricalPlotArea.prototype.seriesSourcePoints = function seriesSourcePoints (series, categoryAxis) {
|
|
287
|
-
var this$1 = this;
|
|
267
|
+
}
|
|
288
268
|
|
|
289
|
-
|
|
269
|
+
seriesSourcePoints(series, categoryAxis) {
|
|
270
|
+
const key = `${ series.index };${ categoryAxis.categoriesHash() }`;
|
|
290
271
|
if (this._seriesPointsCache && this._seriesPointsCache[key]) {
|
|
291
272
|
this._currentPointsCache[key] = this._seriesPointsCache[key];
|
|
292
273
|
return this._seriesPointsCache[key];
|
|
293
274
|
}
|
|
294
275
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
276
|
+
const axisOptions = categoryAxis.options;
|
|
277
|
+
const srcCategories = axisOptions.srcCategories;
|
|
278
|
+
const dateAxis = equalsIgnoreCase(axisOptions.type, DATE);
|
|
279
|
+
const srcData = series.data;
|
|
280
|
+
const result = [];
|
|
300
281
|
if (!dateAxis) {
|
|
301
282
|
categoryAxis.indexCategories();
|
|
302
283
|
}
|
|
303
284
|
|
|
304
|
-
for (
|
|
305
|
-
|
|
285
|
+
for (let idx = 0; idx < srcData.length; idx++) {
|
|
286
|
+
let category = SeriesBinder.current.bindPoint(series, idx).fields.category;
|
|
306
287
|
if (dateAxis) {
|
|
307
|
-
category = parseDateCategory(category, srcData[idx], this
|
|
288
|
+
category = parseDateCategory(category, srcData[idx], this.chartService.intl);
|
|
308
289
|
}
|
|
309
290
|
|
|
310
291
|
if (!defined(category)) {
|
|
@@ -312,7 +293,7 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
312
293
|
}
|
|
313
294
|
|
|
314
295
|
if (defined(category) && category !== null) {
|
|
315
|
-
|
|
296
|
+
const categoryIx = categoryAxis.totalIndex(category);
|
|
316
297
|
result[categoryIx] = result[categoryIx] || { items: [], category: category };
|
|
317
298
|
result[categoryIx].items.push(idx);
|
|
318
299
|
}
|
|
@@ -321,24 +302,24 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
321
302
|
this._currentPointsCache[key] = result;
|
|
322
303
|
|
|
323
304
|
return result;
|
|
324
|
-
}
|
|
305
|
+
}
|
|
325
306
|
|
|
326
|
-
|
|
327
|
-
|
|
307
|
+
aggregateSeries(series, categoryAxis, range) {
|
|
308
|
+
const srcData = series.data;
|
|
328
309
|
if (!srcData.length) {
|
|
329
310
|
return series;
|
|
330
311
|
}
|
|
331
312
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
313
|
+
const srcPoints = this.seriesSourcePoints(series, categoryAxis);
|
|
314
|
+
const result = deepExtend({}, series);
|
|
315
|
+
const aggregator = new SeriesAggregator(deepExtend({}, series), SeriesBinder.current, DefaultAggregates.current);
|
|
316
|
+
const data = result.data = [];
|
|
336
317
|
|
|
337
|
-
|
|
318
|
+
const dataItems = categoryAxis.options.dataItems || [];
|
|
338
319
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
320
|
+
const categoryItem = (idx) => {
|
|
321
|
+
const categoryIdx = idx - range.min;
|
|
322
|
+
let point = srcPoints[idx];
|
|
342
323
|
if (!point) {
|
|
343
324
|
point = srcPoints[idx] = {};
|
|
344
325
|
}
|
|
@@ -346,7 +327,7 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
346
327
|
point.categoryIx = categoryIdx;
|
|
347
328
|
|
|
348
329
|
if (!point.item) {
|
|
349
|
-
|
|
330
|
+
const category = categoryAxis.categoryAt(idx, true);
|
|
350
331
|
point.category = category;
|
|
351
332
|
point.item = aggregator.aggregatePoints(point.items, category);
|
|
352
333
|
}
|
|
@@ -354,8 +335,8 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
354
335
|
return point;
|
|
355
336
|
};
|
|
356
337
|
|
|
357
|
-
for (
|
|
358
|
-
|
|
338
|
+
for (let idx = range.min; idx <= range.max; idx++) {
|
|
339
|
+
const point = categoryItem(idx);
|
|
359
340
|
data[point.categoryIx] = point.item;
|
|
360
341
|
|
|
361
342
|
if (point.items && point.items.length) {
|
|
@@ -364,19 +345,19 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
364
345
|
}
|
|
365
346
|
|
|
366
347
|
if (inArray(result.type, OUT_OF_RANGE_SERIES)) {
|
|
367
|
-
createOutOfRangePoints(result, range, categoryAxis.totalCount(), categoryItem,
|
|
348
|
+
createOutOfRangePoints(result, range, categoryAxis.totalCount(), categoryItem, (idx) => srcPoints[idx]);
|
|
368
349
|
}
|
|
369
350
|
|
|
370
351
|
categoryAxis.options.dataItems = dataItems;
|
|
371
352
|
|
|
372
353
|
return result;
|
|
373
|
-
}
|
|
354
|
+
}
|
|
374
355
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
356
|
+
appendChart(chart, pane) {
|
|
357
|
+
const series = chart.options.series;
|
|
358
|
+
const categoryAxis = this.seriesCategoryAxis(series[0]);
|
|
359
|
+
let categories = categoryAxis.options.categories;
|
|
360
|
+
let categoriesToAdd = Math.max(0, categoriesCount(series) - categories.length);
|
|
380
361
|
|
|
381
362
|
if (categoriesToAdd > 0) {//consider setting an option to axis instead of adding fake categories
|
|
382
363
|
categories = categoryAxis.options.categories = categoryAxis.options.categories.slice(0);
|
|
@@ -387,37 +368,37 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
387
368
|
|
|
388
369
|
this.valueAxisRangeTracker.update(chart.valueAxisRanges);
|
|
389
370
|
|
|
390
|
-
|
|
391
|
-
}
|
|
371
|
+
super.appendChart(chart, pane);
|
|
372
|
+
}
|
|
392
373
|
|
|
393
374
|
// TODO: Refactor, optionally use series.pane option
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
375
|
+
seriesPaneName(series) {
|
|
376
|
+
const options = this.options;
|
|
377
|
+
const axisName = series.axis;
|
|
378
|
+
const axisOptions = [].concat(options.valueAxis);
|
|
379
|
+
const axis = grep(axisOptions, function(a) { return a.name === axisName; })[0];
|
|
380
|
+
const panes = options.panes || [ {} ];
|
|
381
|
+
const defaultPaneName = (panes[0] || {}).name || "default";
|
|
382
|
+
const paneName = (axis || {}).pane || defaultPaneName;
|
|
402
383
|
|
|
403
384
|
return paneName;
|
|
404
|
-
}
|
|
385
|
+
}
|
|
405
386
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
387
|
+
seriesCategoryAxis(series) {
|
|
388
|
+
const axisName = series.categoryAxis;
|
|
389
|
+
const axis = axisName ? this.namedCategoryAxes[axisName] : this.categoryAxis;
|
|
409
390
|
|
|
410
391
|
if (!axis) {
|
|
411
392
|
throw new Error("Unable to locate category axis with name " + axisName);
|
|
412
393
|
}
|
|
413
394
|
|
|
414
395
|
return axis;
|
|
415
|
-
}
|
|
396
|
+
}
|
|
416
397
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
398
|
+
stackableChartOptions(series, pane) {
|
|
399
|
+
const anyStackedSeries = series.some(s => s.stack);
|
|
400
|
+
const isStacked100 = series.some(s => s.stack && s.stack.type === "100%");
|
|
401
|
+
const clip = pane.options.clip;
|
|
421
402
|
|
|
422
403
|
return {
|
|
423
404
|
defaultStack: series[0].stack,
|
|
@@ -425,23 +406,23 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
425
406
|
isStacked100: isStacked100,
|
|
426
407
|
clip: clip
|
|
427
408
|
};
|
|
428
|
-
}
|
|
409
|
+
}
|
|
429
410
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
for (
|
|
434
|
-
|
|
411
|
+
groupSeriesByCategoryAxis(series) {
|
|
412
|
+
const categoryAxes = [];
|
|
413
|
+
const unique = {};
|
|
414
|
+
for (let idx = 0; idx < series.length; idx++) {
|
|
415
|
+
const name = series[idx].categoryAxis || "$$default$$";
|
|
435
416
|
if (!hasOwnProperty(unique, name)) {
|
|
436
417
|
unique[name] = true;
|
|
437
418
|
categoryAxes.push(name);
|
|
438
419
|
}
|
|
439
420
|
}
|
|
440
421
|
|
|
441
|
-
|
|
442
|
-
for (
|
|
443
|
-
|
|
444
|
-
|
|
422
|
+
const groups = [];
|
|
423
|
+
for (let axisIx = 0; axisIx < categoryAxes.length; axisIx++) {
|
|
424
|
+
const axis = categoryAxes[axisIx];
|
|
425
|
+
const axisSeries = groupSeries(series, axis, axisIx);
|
|
445
426
|
if (axisSeries.length === 0) {
|
|
446
427
|
continue;
|
|
447
428
|
}
|
|
@@ -450,15 +431,15 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
450
431
|
}
|
|
451
432
|
|
|
452
433
|
return groups;
|
|
453
|
-
}
|
|
434
|
+
}
|
|
454
435
|
|
|
455
|
-
|
|
436
|
+
createBarChart(series, pane) {
|
|
456
437
|
if (series.length === 0) {
|
|
457
438
|
return;
|
|
458
439
|
}
|
|
459
440
|
|
|
460
|
-
|
|
461
|
-
|
|
441
|
+
const firstSeries = series[0];
|
|
442
|
+
const barChart = new BarChart(this, Object.assign({
|
|
462
443
|
series: series,
|
|
463
444
|
invertAxes: this.invertAxes,
|
|
464
445
|
gap: firstSeries.gap,
|
|
@@ -466,15 +447,15 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
466
447
|
}, this.stackableChartOptions(series, pane)));
|
|
467
448
|
|
|
468
449
|
this.appendChart(barChart, pane);
|
|
469
|
-
}
|
|
450
|
+
}
|
|
470
451
|
|
|
471
|
-
|
|
452
|
+
createRangeBarChart(series, pane) {
|
|
472
453
|
if (series.length === 0) {
|
|
473
454
|
return;
|
|
474
455
|
}
|
|
475
456
|
|
|
476
|
-
|
|
477
|
-
|
|
457
|
+
const firstSeries = series[0];
|
|
458
|
+
const rangeColumnChart = new RangeBarChart(this, {
|
|
478
459
|
series: series,
|
|
479
460
|
invertAxes: this.invertAxes,
|
|
480
461
|
gap: firstSeries.gap,
|
|
@@ -482,15 +463,15 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
482
463
|
});
|
|
483
464
|
|
|
484
465
|
this.appendChart(rangeColumnChart, pane);
|
|
485
|
-
}
|
|
466
|
+
}
|
|
486
467
|
|
|
487
|
-
|
|
468
|
+
createBulletChart(series, pane) {
|
|
488
469
|
if (series.length === 0) {
|
|
489
470
|
return;
|
|
490
471
|
}
|
|
491
472
|
|
|
492
|
-
|
|
493
|
-
|
|
473
|
+
const firstSeries = series[0];
|
|
474
|
+
const bulletChart = new BulletChart(this, {
|
|
494
475
|
series: series,
|
|
495
476
|
invertAxes: this.invertAxes,
|
|
496
477
|
gap: firstSeries.gap,
|
|
@@ -499,55 +480,55 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
499
480
|
});
|
|
500
481
|
|
|
501
482
|
this.appendChart(bulletChart, pane);
|
|
502
|
-
}
|
|
483
|
+
}
|
|
503
484
|
|
|
504
|
-
|
|
485
|
+
createLineChart(series, pane) {
|
|
505
486
|
if (series.length === 0) {
|
|
506
487
|
return;
|
|
507
488
|
}
|
|
508
489
|
|
|
509
|
-
|
|
490
|
+
const lineChart = new LineChart(this, Object.assign({
|
|
510
491
|
invertAxes: this.invertAxes,
|
|
511
492
|
series: series
|
|
512
493
|
}, this.stackableChartOptions(series, pane)));
|
|
513
494
|
|
|
514
495
|
this.appendChart(lineChart, pane);
|
|
515
|
-
}
|
|
496
|
+
}
|
|
516
497
|
|
|
517
|
-
|
|
498
|
+
createAreaChart(series, pane) {
|
|
518
499
|
if (series.length === 0) {
|
|
519
500
|
return;
|
|
520
501
|
}
|
|
521
502
|
|
|
522
|
-
|
|
503
|
+
const areaChart = new AreaChart(this, Object.assign({
|
|
523
504
|
invertAxes: this.invertAxes,
|
|
524
505
|
series: series
|
|
525
506
|
}, this.stackableChartOptions(series, pane)));
|
|
526
507
|
|
|
527
508
|
this.appendChart(areaChart, pane);
|
|
528
|
-
}
|
|
509
|
+
}
|
|
529
510
|
|
|
530
|
-
|
|
511
|
+
createRangeAreaChart(series, pane) {
|
|
531
512
|
if (series.length === 0) {
|
|
532
513
|
return;
|
|
533
514
|
}
|
|
534
515
|
|
|
535
|
-
|
|
516
|
+
const rangeAreaChart = new RangeAreaChart(this, {
|
|
536
517
|
invertAxes: this.invertAxes,
|
|
537
518
|
series: series,
|
|
538
519
|
clip: pane.options.clip
|
|
539
520
|
});
|
|
540
521
|
|
|
541
522
|
this.appendChart(rangeAreaChart, pane);
|
|
542
|
-
}
|
|
523
|
+
}
|
|
543
524
|
|
|
544
|
-
|
|
525
|
+
createOHLCChart(series, pane) {
|
|
545
526
|
if (series.length === 0) {
|
|
546
527
|
return;
|
|
547
528
|
}
|
|
548
529
|
|
|
549
|
-
|
|
550
|
-
|
|
530
|
+
const firstSeries = series[0];
|
|
531
|
+
const chart = new OHLCChart(this, {
|
|
551
532
|
invertAxes: this.invertAxes,
|
|
552
533
|
gap: firstSeries.gap,
|
|
553
534
|
series: series,
|
|
@@ -556,15 +537,15 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
556
537
|
});
|
|
557
538
|
|
|
558
539
|
this.appendChart(chart, pane);
|
|
559
|
-
}
|
|
540
|
+
}
|
|
560
541
|
|
|
561
|
-
|
|
542
|
+
createCandlestickChart(series, pane) {
|
|
562
543
|
if (series.length === 0) {
|
|
563
544
|
return;
|
|
564
545
|
}
|
|
565
546
|
|
|
566
|
-
|
|
567
|
-
|
|
547
|
+
const firstSeries = series[0];
|
|
548
|
+
const chart = new CandlestickChart(this, {
|
|
568
549
|
invertAxes: this.invertAxes,
|
|
569
550
|
gap: firstSeries.gap,
|
|
570
551
|
series: series,
|
|
@@ -573,15 +554,15 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
573
554
|
});
|
|
574
555
|
|
|
575
556
|
this.appendChart(chart, pane);
|
|
576
|
-
}
|
|
557
|
+
}
|
|
577
558
|
|
|
578
|
-
|
|
559
|
+
createBoxPlotChart(series, pane) {
|
|
579
560
|
if (series.length === 0) {
|
|
580
561
|
return;
|
|
581
562
|
}
|
|
582
563
|
|
|
583
|
-
|
|
584
|
-
|
|
564
|
+
const firstSeries = series[0];
|
|
565
|
+
const chart = new BoxPlotChart(this, {
|
|
585
566
|
invertAxes: this.invertAxes,
|
|
586
567
|
gap: firstSeries.gap,
|
|
587
568
|
series: series,
|
|
@@ -590,15 +571,15 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
590
571
|
});
|
|
591
572
|
|
|
592
573
|
this.appendChart(chart, pane);
|
|
593
|
-
}
|
|
574
|
+
}
|
|
594
575
|
|
|
595
|
-
|
|
576
|
+
createWaterfallChart(series, pane) {
|
|
596
577
|
if (series.length === 0) {
|
|
597
578
|
return;
|
|
598
579
|
}
|
|
599
580
|
|
|
600
|
-
|
|
601
|
-
|
|
581
|
+
const firstSeries = series[0];
|
|
582
|
+
const waterfallChart = new WaterfallChart(this, {
|
|
602
583
|
series: series,
|
|
603
584
|
invertAxes: this.invertAxes,
|
|
604
585
|
gap: firstSeries.gap,
|
|
@@ -606,104 +587,99 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
606
587
|
});
|
|
607
588
|
|
|
608
589
|
this.appendChart(waterfallChart, pane);
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
CategoricalPlotArea.prototype.axisRequiresRounding = function axisRequiresRounding (categoryAxisName, categoryAxisIndex) {
|
|
612
|
-
var this$1 = this;
|
|
590
|
+
}
|
|
613
591
|
|
|
614
|
-
|
|
592
|
+
axisRequiresRounding(categoryAxisName, categoryAxisIndex) {
|
|
593
|
+
const centeredSeries = filterSeriesByType(this.series, EQUALLY_SPACED_SERIES);
|
|
615
594
|
|
|
616
|
-
for (
|
|
617
|
-
|
|
595
|
+
for (let seriesIx = 0; seriesIx < this.series.length; seriesIx++) {
|
|
596
|
+
const currentSeries = this.series[seriesIx];
|
|
618
597
|
if (inArray(currentSeries.type, AREA_SERIES)) {
|
|
619
|
-
|
|
598
|
+
const line = currentSeries.line;
|
|
620
599
|
if (line && line.style === STEP) {
|
|
621
600
|
centeredSeries.push(currentSeries);
|
|
622
601
|
}
|
|
623
602
|
}
|
|
624
603
|
}
|
|
625
604
|
|
|
626
|
-
for (
|
|
627
|
-
|
|
605
|
+
for (let seriesIx = 0; seriesIx < centeredSeries.length; seriesIx++) {
|
|
606
|
+
const seriesAxis = centeredSeries[seriesIx].categoryAxis || "";
|
|
628
607
|
if (seriesAxis === categoryAxisName || (!seriesAxis && categoryAxisIndex === 0)) {
|
|
629
608
|
return true;
|
|
630
609
|
}
|
|
631
610
|
}
|
|
632
|
-
}
|
|
611
|
+
}
|
|
633
612
|
|
|
634
|
-
|
|
635
|
-
|
|
613
|
+
aggregatedAxis(categoryAxisName, categoryAxisIndex) {
|
|
614
|
+
const series = this.series;
|
|
636
615
|
|
|
637
|
-
for (
|
|
638
|
-
|
|
616
|
+
for (let seriesIx = 0; seriesIx < series.length; seriesIx++) {
|
|
617
|
+
const seriesAxis = series[seriesIx].categoryAxis || "";
|
|
639
618
|
if ((seriesAxis === categoryAxisName || (!seriesAxis && categoryAxisIndex === 0)) && series[seriesIx].categoryField) {
|
|
640
619
|
return true;
|
|
641
620
|
}
|
|
642
621
|
}
|
|
643
|
-
}
|
|
622
|
+
}
|
|
644
623
|
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
for (
|
|
624
|
+
createCategoryAxesLabels() {
|
|
625
|
+
const axes = this.axes;
|
|
626
|
+
for (let i = 0; i < axes.length; i++) {
|
|
648
627
|
if (axes[i] instanceof CategoryAxis) {
|
|
649
628
|
axes[i].createLabels();
|
|
650
629
|
}
|
|
651
630
|
}
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
CategoricalPlotArea.prototype.createCategoryAxes = function createCategoryAxes (panes) {
|
|
655
|
-
var this$1 = this;
|
|
631
|
+
}
|
|
656
632
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
633
|
+
createCategoryAxes(panes) {
|
|
634
|
+
const invertAxes = this.invertAxes;
|
|
635
|
+
const definitions = [].concat(this.options.categoryAxis);
|
|
636
|
+
const axes = [];
|
|
660
637
|
|
|
661
|
-
for (
|
|
662
|
-
|
|
663
|
-
|
|
638
|
+
for (let i = 0; i < definitions.length; i++) {
|
|
639
|
+
let axisOptions = definitions[i];
|
|
640
|
+
const axisPane = this.findPane(axisOptions.pane);
|
|
664
641
|
|
|
665
642
|
if (inArray(axisPane, panes)) {
|
|
666
|
-
|
|
667
|
-
var categories = axisOptions.categories; if ( categories === void 0 ) categories = [];
|
|
643
|
+
const { name, categories = [] } = axisOptions;
|
|
668
644
|
axisOptions = deepExtend({
|
|
669
645
|
vertical: invertAxes,
|
|
670
|
-
reverse: !invertAxes && this
|
|
646
|
+
reverse: !invertAxes && this.chartService.rtl,
|
|
671
647
|
axisCrossingValue: invertAxes ? MAX_VALUE : 0
|
|
672
648
|
}, axisOptions);
|
|
673
649
|
|
|
674
650
|
if (!defined(axisOptions.justified)) {
|
|
675
|
-
axisOptions.justified = this
|
|
651
|
+
axisOptions.justified = this.isJustified();
|
|
676
652
|
}
|
|
677
653
|
|
|
678
|
-
if (this
|
|
654
|
+
if (this.axisRequiresRounding(name, i)) {
|
|
679
655
|
axisOptions.justified = false;
|
|
680
656
|
}
|
|
681
657
|
|
|
682
|
-
|
|
658
|
+
let categoryAxis;
|
|
683
659
|
|
|
684
660
|
if (isDateAxis(axisOptions, categories[0])) {
|
|
685
|
-
axisOptions._forecast = this
|
|
686
|
-
categoryAxis = new DateCategoryAxis(axisOptions, this
|
|
661
|
+
axisOptions._forecast = this.trendlineAggregateForecast();
|
|
662
|
+
categoryAxis = new DateCategoryAxis(axisOptions, this.chartService);
|
|
687
663
|
} else {
|
|
688
|
-
categoryAxis = new CategoryAxis(axisOptions, this
|
|
664
|
+
categoryAxis = new CategoryAxis(axisOptions, this.chartService);
|
|
689
665
|
}
|
|
690
666
|
|
|
691
667
|
definitions[i].categories = categoryAxis.options.srcCategories;
|
|
692
668
|
|
|
693
669
|
if (name) {
|
|
694
|
-
if (this
|
|
695
|
-
throw new Error(
|
|
670
|
+
if (this.namedCategoryAxes[name]) {
|
|
671
|
+
throw new Error(`Category axis with name ${ name } is already defined`);
|
|
696
672
|
}
|
|
697
|
-
this
|
|
673
|
+
this.namedCategoryAxes[name] = categoryAxis;
|
|
698
674
|
}
|
|
699
675
|
|
|
700
676
|
categoryAxis.axisIndex = i;
|
|
701
677
|
axes.push(categoryAxis);
|
|
702
|
-
this
|
|
678
|
+
this.appendAxis(categoryAxis);
|
|
703
679
|
}
|
|
704
680
|
}
|
|
705
681
|
|
|
706
|
-
|
|
682
|
+
const primaryAxis = this.categoryAxis || axes[0];
|
|
707
683
|
this.categoryAxis = primaryAxis;
|
|
708
684
|
|
|
709
685
|
if (invertAxes) {
|
|
@@ -711,76 +687,74 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
711
687
|
} else {
|
|
712
688
|
this.axisX = primaryAxis;
|
|
713
689
|
}
|
|
714
|
-
}
|
|
690
|
+
}
|
|
715
691
|
|
|
716
|
-
|
|
717
|
-
|
|
692
|
+
isJustified() {
|
|
693
|
+
const series = this.series;
|
|
718
694
|
|
|
719
|
-
for (
|
|
720
|
-
|
|
695
|
+
for (let i = 0; i < series.length; i++) {
|
|
696
|
+
const currentSeries = series[i];
|
|
721
697
|
if (!inArray(currentSeries.type, AREA_SERIES)) {
|
|
722
698
|
return false;
|
|
723
699
|
}
|
|
724
700
|
}
|
|
725
701
|
|
|
726
702
|
return true;
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
CategoricalPlotArea.prototype.createValueAxes = function createValueAxes (panes) {
|
|
730
|
-
var this$1 = this;
|
|
703
|
+
}
|
|
731
704
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
705
|
+
createValueAxes(panes) {
|
|
706
|
+
const tracker = this.valueAxisRangeTracker;
|
|
707
|
+
const defaultRange = tracker.query();
|
|
708
|
+
const definitions = [].concat(this.options.valueAxis);
|
|
709
|
+
const invertAxes = this.invertAxes;
|
|
710
|
+
const baseOptions = { vertical: !invertAxes, reverse: invertAxes && this.chartService.rtl };
|
|
711
|
+
const axes = [];
|
|
738
712
|
|
|
739
713
|
if (this.stack100) {
|
|
740
714
|
baseOptions.roundToMajorUnit = false;
|
|
741
715
|
baseOptions.labels = { format: "P0" };
|
|
742
716
|
}
|
|
743
717
|
|
|
744
|
-
for (
|
|
745
|
-
|
|
746
|
-
|
|
718
|
+
for (let i = 0; i < definitions.length; i++) {
|
|
719
|
+
const axisOptions = definitions[i];
|
|
720
|
+
const axisPane = this.findPane(axisOptions.pane);
|
|
747
721
|
|
|
748
722
|
if (inArray(axisPane, panes)) {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
723
|
+
const name = axisOptions.name;
|
|
724
|
+
const defaultAxisRange = equalsIgnoreCase(axisOptions.type, LOGARITHMIC) ? { min: 0.1, max: 1 } : { min: 0, max: 1 };
|
|
725
|
+
const range = tracker.query(name) || defaultRange || defaultAxisRange;
|
|
752
726
|
|
|
753
727
|
if (i === 0 && range && defaultRange) {
|
|
754
728
|
range.min = Math.min(range.min, defaultRange.min);
|
|
755
729
|
range.max = Math.max(range.max, defaultRange.max);
|
|
756
730
|
}
|
|
757
731
|
|
|
758
|
-
|
|
732
|
+
let axisType;
|
|
759
733
|
if (equalsIgnoreCase(axisOptions.type, LOGARITHMIC)) {
|
|
760
734
|
axisType = LogarithmicAxis;
|
|
761
735
|
} else {
|
|
762
736
|
axisType = NumericAxis;
|
|
763
737
|
}
|
|
764
738
|
|
|
765
|
-
|
|
739
|
+
const valueAxis = new axisType(range.min, range.max,
|
|
766
740
|
deepExtend({}, baseOptions, axisOptions),
|
|
767
|
-
this
|
|
741
|
+
this.chartService
|
|
768
742
|
);
|
|
769
743
|
|
|
770
744
|
if (name) {
|
|
771
|
-
if (this
|
|
772
|
-
throw new Error(
|
|
745
|
+
if (this.namedValueAxes[name]) {
|
|
746
|
+
throw new Error(`Value axis with name ${ name } is already defined`);
|
|
773
747
|
}
|
|
774
|
-
this
|
|
748
|
+
this.namedValueAxes[name] = valueAxis;
|
|
775
749
|
}
|
|
776
750
|
valueAxis.axisIndex = i;
|
|
777
751
|
|
|
778
752
|
axes.push(valueAxis);
|
|
779
|
-
this
|
|
753
|
+
this.appendAxis(valueAxis);
|
|
780
754
|
}
|
|
781
755
|
}
|
|
782
756
|
|
|
783
|
-
|
|
757
|
+
const primaryAxis = this.valueAxis || axes[0];
|
|
784
758
|
this.valueAxis = primaryAxis;
|
|
785
759
|
|
|
786
760
|
if (invertAxes) {
|
|
@@ -788,22 +762,22 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
788
762
|
} else {
|
|
789
763
|
this.axisY = primaryAxis;
|
|
790
764
|
}
|
|
791
|
-
}
|
|
765
|
+
}
|
|
792
766
|
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
767
|
+
_dispatchEvent(chart, e, eventType) {
|
|
768
|
+
const coords = chart._eventCoordinates(e);
|
|
769
|
+
const point = new Point(coords.x, coords.y);
|
|
770
|
+
const pane = this.pointPane(point);
|
|
771
|
+
const categories = [];
|
|
772
|
+
const values = [];
|
|
799
773
|
|
|
800
774
|
if (!pane) {
|
|
801
775
|
return;
|
|
802
776
|
}
|
|
803
777
|
|
|
804
|
-
|
|
805
|
-
for (
|
|
806
|
-
|
|
778
|
+
const allAxes = pane.axes;
|
|
779
|
+
for (let i = 0; i < allAxes.length; i++) {
|
|
780
|
+
const axis = allAxes[i];
|
|
807
781
|
if (axis.getValue) {
|
|
808
782
|
appendIfNotNull(values, axis.getValue(point));
|
|
809
783
|
} else {
|
|
@@ -823,103 +797,96 @@ var CategoricalPlotArea = (function (PlotAreaBase) {
|
|
|
823
797
|
value: singleItemOrArray(values)
|
|
824
798
|
});
|
|
825
799
|
}
|
|
826
|
-
}
|
|
800
|
+
}
|
|
827
801
|
|
|
828
|
-
|
|
829
|
-
|
|
802
|
+
pointPane(point) {
|
|
803
|
+
const panes = this.panes;
|
|
830
804
|
|
|
831
|
-
for (
|
|
832
|
-
|
|
805
|
+
for (let i = 0; i < panes.length; i++) {
|
|
806
|
+
const currentPane = panes[i];
|
|
833
807
|
if (currentPane.contentBox.containsPoint(point)) {
|
|
834
808
|
return currentPane;
|
|
835
809
|
}
|
|
836
810
|
}
|
|
837
|
-
}
|
|
811
|
+
}
|
|
838
812
|
|
|
839
|
-
|
|
813
|
+
updateAxisOptions(axis, options) {
|
|
840
814
|
updateAxisOptions(this.options, axis, options);
|
|
841
815
|
updateAxisOptions(this.originalOptions, axis, options);
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
CategoricalPlotArea.prototype._pointsByVertical = function _pointsByVertical (basePoint, offset) {
|
|
845
|
-
if ( offset === void 0 ) offset = 0;
|
|
816
|
+
}
|
|
846
817
|
|
|
818
|
+
_pointsByVertical(basePoint, offset = 0) {
|
|
847
819
|
if (this.invertAxes) {
|
|
848
820
|
return this._siblingsBySeriesIndex(basePoint.series.index, offset);
|
|
849
821
|
}
|
|
850
822
|
|
|
851
823
|
return this._siblingsByPointIndex(basePoint.getIndex());
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
CategoricalPlotArea.prototype._pointsByHorizontal = function _pointsByHorizontal (basePoint, offset) {
|
|
855
|
-
if ( offset === void 0 ) offset = 0;
|
|
824
|
+
}
|
|
856
825
|
|
|
826
|
+
_pointsByHorizontal(basePoint, offset = 0) {
|
|
857
827
|
if (this.invertAxes) {
|
|
858
828
|
return this._siblingsByPointIndex(basePoint.getIndex());
|
|
859
829
|
}
|
|
860
830
|
|
|
861
|
-
|
|
831
|
+
const siblings = this._siblingsBySeriesIndex(basePoint.series.index, offset);
|
|
862
832
|
|
|
863
833
|
if (this.chartService.rtl) {
|
|
864
834
|
return siblings.reverse();
|
|
865
835
|
}
|
|
866
836
|
|
|
867
837
|
return siblings;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
CategoricalPlotArea.prototype._siblingsByPointIndex = function _siblingsByPointIndex (pointIndex) {
|
|
871
|
-
var this$1 = this;
|
|
838
|
+
}
|
|
872
839
|
|
|
873
|
-
|
|
874
|
-
|
|
840
|
+
_siblingsByPointIndex(pointIndex) {
|
|
841
|
+
const charts = this.charts;
|
|
842
|
+
const result = [];
|
|
875
843
|
|
|
876
|
-
for (
|
|
877
|
-
|
|
844
|
+
for (let i = 0; i < charts.length; i++) {
|
|
845
|
+
let chart = charts[i];
|
|
878
846
|
|
|
879
847
|
if (chart.pane && chart.pane.options.name === "_navigator") {
|
|
880
848
|
continue;
|
|
881
849
|
}
|
|
882
850
|
|
|
883
|
-
|
|
884
|
-
.filter(
|
|
851
|
+
let chartPoints = chart.points
|
|
852
|
+
.filter(point =>
|
|
853
|
+
point && point.visible !== false && point.getIndex() === pointIndex
|
|
885
854
|
);
|
|
886
855
|
|
|
887
|
-
result.push
|
|
856
|
+
result.push(...chartPoints.sort(this._getSeriesCompareFn(chartPoints[0])));
|
|
888
857
|
}
|
|
889
858
|
|
|
890
859
|
return result;
|
|
891
|
-
}
|
|
860
|
+
}
|
|
892
861
|
|
|
893
|
-
|
|
894
|
-
|
|
862
|
+
_siblingsBySeriesIndex(seriesIndex, offset) {
|
|
863
|
+
const index = cycleIndex(seriesIndex + offset, this.series.length);
|
|
895
864
|
|
|
896
865
|
return this.pointsBySeriesIndex(index);
|
|
897
|
-
}
|
|
866
|
+
}
|
|
898
867
|
|
|
899
|
-
|
|
900
|
-
|
|
868
|
+
_getSeriesCompareFn(point) {
|
|
869
|
+
const isStacked = this._isInStackedSeries(point);
|
|
901
870
|
|
|
902
871
|
if (isStacked && this.invertAxes || !isStacked && !this.invertAxes) {
|
|
903
|
-
return
|
|
872
|
+
return (a, b) => a.box.center().x - b.box.center().x;
|
|
904
873
|
}
|
|
905
874
|
|
|
906
|
-
return
|
|
907
|
-
}
|
|
875
|
+
return (a, b) => a.box.center().y - b.box.center().y;
|
|
876
|
+
}
|
|
908
877
|
|
|
909
|
-
|
|
910
|
-
|
|
878
|
+
_isInStackedSeries(point) {
|
|
879
|
+
const sortableSeries = inArray(point.series.type,
|
|
911
880
|
[ AREA, VERTICAL_AREA, RANGE_AREA, VERTICAL_RANGE_AREA, LINE, VERTICAL_LINE, RADAR_LINE, RADAR_AREA]);
|
|
912
881
|
|
|
913
|
-
|
|
882
|
+
const stackableSeries = inArray(point.series.type, [ COLUMN, BAR]);
|
|
914
883
|
|
|
915
884
|
return sortableSeries || stackableSeries && point.options.isStacked;
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
return CategoricalPlotArea;
|
|
919
|
-
}(PlotAreaBase));
|
|
885
|
+
}
|
|
886
|
+
}
|
|
920
887
|
|
|
921
888
|
function updateAxisOptions(targetOptions, axis, options) {
|
|
922
|
-
|
|
889
|
+
const axesOptions = axis instanceof CategoryAxis ? [].concat(targetOptions.categoryAxis) : [].concat(targetOptions.valueAxis);
|
|
923
890
|
deepExtend(axesOptions[axis.axisIndex], options);
|
|
924
891
|
}
|
|
925
892
|
|