@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
|
@@ -10,9 +10,9 @@ import { ChartElement, Box } from '../core';
|
|
|
10
10
|
import { VALUE, STRING, MIN_VALUE, MAX_VALUE, OBJECT } from '../common/constants';
|
|
11
11
|
import { convertableToNumber, deepExtend, defined, isNumber, last, setDefaultOptions, sparseArrayLimits } from '../common';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
class CategoricalChart extends ChartElement {
|
|
14
|
+
constructor(plotArea, options) {
|
|
15
|
+
super(options);
|
|
16
16
|
|
|
17
17
|
this.plotArea = plotArea;
|
|
18
18
|
this.chartService = plotArea.chartService;
|
|
@@ -31,42 +31,38 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
31
31
|
this.render();
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
CategoricalChart.prototype = Object.create( ChartElement && ChartElement.prototype );
|
|
36
|
-
CategoricalChart.prototype.constructor = CategoricalChart;
|
|
37
|
-
|
|
38
|
-
CategoricalChart.prototype.render = function render () {
|
|
34
|
+
render() {
|
|
39
35
|
this.traverseDataPoints(this.addValue.bind(this));
|
|
40
|
-
}
|
|
36
|
+
}
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
pointOptions(series, seriesIx) {
|
|
39
|
+
let options = this.seriesOptions[seriesIx];
|
|
44
40
|
if (!options) {
|
|
45
|
-
|
|
41
|
+
const defaults = this.pointType().prototype.defaults;
|
|
46
42
|
this.seriesOptions[seriesIx] = options = deepExtend({ }, defaults, {
|
|
47
43
|
vertical: !this.options.invertAxes
|
|
48
44
|
}, series);
|
|
49
45
|
}
|
|
50
46
|
|
|
51
47
|
return options;
|
|
52
|
-
}
|
|
48
|
+
}
|
|
53
49
|
|
|
54
|
-
|
|
50
|
+
plotValue(point) {
|
|
55
51
|
if (!point) {
|
|
56
52
|
return 0;
|
|
57
53
|
}
|
|
58
54
|
|
|
59
55
|
if (this.options.isStacked100 && isNumber(point.value)) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
const categoryIx = point.categoryIx;
|
|
57
|
+
const categoryPoints = this.categoryPoints[categoryIx];
|
|
58
|
+
const otherValues = [];
|
|
59
|
+
let categorySum = 0;
|
|
64
60
|
|
|
65
|
-
for (
|
|
66
|
-
|
|
61
|
+
for (let i = 0; i < categoryPoints.length; i++) {
|
|
62
|
+
const other = categoryPoints[i];
|
|
67
63
|
if (other) {
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
const stack = point.series.stack;
|
|
65
|
+
const otherStack = other.series.stack;
|
|
70
66
|
|
|
71
67
|
if ((stack && otherStack) && stack.group !== otherStack.group) {
|
|
72
68
|
continue;
|
|
@@ -85,31 +81,28 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
return point.value;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
CategoricalChart.prototype.plotRange = function plotRange (point, startValue) {
|
|
91
|
-
var this$1 = this;
|
|
92
|
-
if ( startValue === void 0 ) startValue = 0;
|
|
84
|
+
}
|
|
93
85
|
|
|
94
|
-
|
|
86
|
+
plotRange(point, startValue = 0) {
|
|
87
|
+
const categoryPoints = this.categoryPoints[point.categoryIx];
|
|
95
88
|
|
|
96
89
|
if (this.options.isStacked) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
90
|
+
let plotValue = this.plotValue(point);
|
|
91
|
+
const positive = plotValue >= 0;
|
|
92
|
+
let prevValue = startValue;
|
|
93
|
+
let isStackedBar = false;
|
|
94
|
+
const stack = defined(point.series.stack) ? point.series.stack : this.options.defaultStack;
|
|
95
|
+
const isNonGroupStack = (stack) => stack === true || typeof stack === OBJECT && !stack.group;
|
|
103
96
|
|
|
104
97
|
if (stack) {
|
|
105
|
-
for (
|
|
106
|
-
|
|
98
|
+
for (let i = 0; i < categoryPoints.length; i++) {
|
|
99
|
+
const other = categoryPoints[i];
|
|
107
100
|
|
|
108
101
|
if (point === other) {
|
|
109
102
|
break;
|
|
110
103
|
}
|
|
111
104
|
|
|
112
|
-
|
|
105
|
+
const otherStack = defined(other.series.stack) ? other.series.stack : this.options.defaultStack;
|
|
113
106
|
|
|
114
107
|
if (!otherStack) {
|
|
115
108
|
continue;
|
|
@@ -127,7 +120,7 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
127
120
|
continue;
|
|
128
121
|
}
|
|
129
122
|
|
|
130
|
-
|
|
123
|
+
const otherValue = this.plotValue(other);
|
|
131
124
|
if ((otherValue >= 0 && positive) ||
|
|
132
125
|
(otherValue < 0 && !positive)) {
|
|
133
126
|
// zero values should be skipped for log axis (startValue !== 0)
|
|
@@ -136,7 +129,7 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
136
129
|
plotValue += otherValue;
|
|
137
130
|
isStackedBar = true;
|
|
138
131
|
|
|
139
|
-
if (this
|
|
132
|
+
if (this.options.isStacked100) {
|
|
140
133
|
plotValue = Math.min(plotValue, 1);
|
|
141
134
|
}
|
|
142
135
|
}
|
|
@@ -151,30 +144,28 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
151
144
|
return [ prevValue, plotValue ];
|
|
152
145
|
}
|
|
153
146
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
147
|
+
const series = point.series;
|
|
148
|
+
const valueAxis = this.seriesValueAxis(series);
|
|
149
|
+
const axisCrossingValue = this.categoryAxisCrossingValue(valueAxis);
|
|
157
150
|
|
|
158
151
|
return [ axisCrossingValue, convertableToNumber(point.value) ? point.value : axisCrossingValue ];
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
CategoricalChart.prototype.stackLimits = function stackLimits (axisName, stackName) {
|
|
162
|
-
var this$1 = this;
|
|
152
|
+
}
|
|
163
153
|
|
|
164
|
-
|
|
165
|
-
|
|
154
|
+
stackLimits(axisName, stackName) {
|
|
155
|
+
let min = MAX_VALUE;
|
|
156
|
+
let max = MIN_VALUE;
|
|
166
157
|
|
|
167
|
-
for (
|
|
168
|
-
|
|
158
|
+
for (let i = 0; i < this.categoryPoints.length; i++) {
|
|
159
|
+
const categoryPoints = this.categoryPoints[i];
|
|
169
160
|
if (!categoryPoints) {
|
|
170
161
|
continue;
|
|
171
162
|
}
|
|
172
163
|
|
|
173
|
-
for (
|
|
174
|
-
|
|
164
|
+
for (let pIx = 0; pIx < categoryPoints.length; pIx++) {
|
|
165
|
+
const point = categoryPoints[pIx];
|
|
175
166
|
if (point) {
|
|
176
167
|
if (point.series.stack === stackName || point.series.axis === axisName) {
|
|
177
|
-
|
|
168
|
+
const to = this.plotRange(point, 0)[1];
|
|
178
169
|
if (defined(to) && isFinite(to)) {
|
|
179
170
|
max = Math.max(max, to);
|
|
180
171
|
min = Math.min(min, to);
|
|
@@ -185,27 +176,23 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
185
176
|
}
|
|
186
177
|
|
|
187
178
|
return { min: min, max: max };
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
CategoricalChart.prototype.updateStackRange = function updateStackRange () {
|
|
191
|
-
var this$1 = this;
|
|
179
|
+
}
|
|
192
180
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
var limitsCache = {};
|
|
181
|
+
updateStackRange() {
|
|
182
|
+
const { isStacked, series: chartSeries } = this.options;
|
|
183
|
+
const limitsCache = {};
|
|
197
184
|
|
|
198
185
|
if (isStacked) {
|
|
199
|
-
for (
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
186
|
+
for (let i = 0; i < chartSeries.length; i++) {
|
|
187
|
+
const series = chartSeries[i];
|
|
188
|
+
const axisName = series.axis;
|
|
189
|
+
const key = axisName + series.stack;
|
|
203
190
|
|
|
204
|
-
|
|
191
|
+
let limits = limitsCache[key];
|
|
205
192
|
if (!limits) {
|
|
206
|
-
limits = this
|
|
193
|
+
limits = this.stackLimits(axisName, series.stack);
|
|
207
194
|
|
|
208
|
-
|
|
195
|
+
const errorTotals = this.errorTotals;
|
|
209
196
|
if (errorTotals) {
|
|
210
197
|
if (errorTotals.negative.length) {
|
|
211
198
|
limits.min = Math.min(limits.min, sparseArrayLimits(errorTotals.negative).min);
|
|
@@ -223,20 +210,18 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
223
210
|
}
|
|
224
211
|
|
|
225
212
|
if (limits) {
|
|
226
|
-
this
|
|
213
|
+
this.valueAxisRanges[axisName] = limits;
|
|
227
214
|
}
|
|
228
215
|
}
|
|
229
216
|
}
|
|
230
|
-
}
|
|
217
|
+
}
|
|
231
218
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
var highValue = data.fields[ERROR_HIGH_FIELD];
|
|
239
|
-
var errorRange;
|
|
219
|
+
addErrorBar(point, data, categoryIx) {
|
|
220
|
+
const { value, series, seriesIx } = point;
|
|
221
|
+
const errorBars = point.options.errorBars;
|
|
222
|
+
const lowValue = data.fields[ERROR_LOW_FIELD];
|
|
223
|
+
const highValue = data.fields[ERROR_HIGH_FIELD];
|
|
224
|
+
let errorRange;
|
|
240
225
|
|
|
241
226
|
if (isNumber(lowValue) && isNumber(highValue)) {
|
|
242
227
|
errorRange = { low: lowValue, high: highValue };
|
|
@@ -253,34 +238,32 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
253
238
|
point.high = errorRange.high;
|
|
254
239
|
this.addPointErrorBar(point, categoryIx);
|
|
255
240
|
}
|
|
256
|
-
}
|
|
241
|
+
}
|
|
257
242
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
var low = point.low;
|
|
263
|
-
var high = point.high;
|
|
243
|
+
addPointErrorBar(point, categoryIx) {
|
|
244
|
+
const isVertical = !this.options.invertAxes;
|
|
245
|
+
const options = point.options.errorBars;
|
|
246
|
+
let { series, low, high } = point;
|
|
264
247
|
|
|
265
248
|
if (this.options.isStacked) {
|
|
266
|
-
|
|
249
|
+
const stackedErrorRange = this.stackedErrorRange(point, categoryIx);
|
|
267
250
|
low = stackedErrorRange.low;
|
|
268
251
|
high = stackedErrorRange.high;
|
|
269
252
|
} else {
|
|
270
|
-
|
|
253
|
+
const fields = { categoryIx: categoryIx, series: series };
|
|
271
254
|
this.updateRange({ value: low }, fields);
|
|
272
255
|
this.updateRange({ value: high }, fields);
|
|
273
256
|
}
|
|
274
257
|
|
|
275
|
-
|
|
258
|
+
const errorBar = new CategoricalErrorBar(low, high, isVertical, this, series, options);
|
|
276
259
|
point.errorBars = [ errorBar ];
|
|
277
260
|
point.append(errorBar);
|
|
278
|
-
}
|
|
261
|
+
}
|
|
279
262
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
263
|
+
stackedErrorRange(point, categoryIx) {
|
|
264
|
+
const plotValue = this.plotRange(point, 0)[1] - point.value;
|
|
265
|
+
const low = point.low + plotValue;
|
|
266
|
+
const high = point.high + plotValue;
|
|
284
267
|
|
|
285
268
|
this.errorTotals = this.errorTotals || { positive: [], negative: [] };
|
|
286
269
|
|
|
@@ -293,24 +276,22 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
293
276
|
}
|
|
294
277
|
|
|
295
278
|
return { low: low, high: high };
|
|
296
|
-
}
|
|
279
|
+
}
|
|
297
280
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
var series = fields.series;
|
|
301
|
-
var seriesIx = fields.seriesIx;
|
|
281
|
+
addValue(data, fields) {
|
|
282
|
+
const { categoryIx, series, seriesIx } = fields;
|
|
302
283
|
|
|
303
|
-
|
|
284
|
+
let categoryPoints = this.categoryPoints[categoryIx];
|
|
304
285
|
if (!categoryPoints) {
|
|
305
286
|
this.categoryPoints[categoryIx] = categoryPoints = [];
|
|
306
287
|
}
|
|
307
288
|
|
|
308
|
-
|
|
289
|
+
let seriesPoints = this.seriesPoints[seriesIx];
|
|
309
290
|
if (!seriesPoints) {
|
|
310
291
|
this.seriesPoints[seriesIx] = seriesPoints = [];
|
|
311
292
|
}
|
|
312
293
|
|
|
313
|
-
|
|
294
|
+
const point = this.createPoint(data, fields);
|
|
314
295
|
if (point) {
|
|
315
296
|
Object.assign(point, fields);
|
|
316
297
|
|
|
@@ -327,14 +308,14 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
327
308
|
categoryPoints.push(point);
|
|
328
309
|
|
|
329
310
|
this.updateRange(data.valueFields, fields);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
evalPointOptions(options, value, fields) {
|
|
314
|
+
const categoryIx = fields.categoryIx;
|
|
315
|
+
const category = fields.category;
|
|
316
|
+
const series = fields.series;
|
|
317
|
+
const seriesIx = fields.seriesIx;
|
|
318
|
+
const state = {
|
|
338
319
|
defaults: series._defaults,
|
|
339
320
|
excluded: [
|
|
340
321
|
"data", "aggregate", "_events", "tooltip", "content", "template",
|
|
@@ -343,12 +324,12 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
343
324
|
]
|
|
344
325
|
};
|
|
345
326
|
|
|
346
|
-
|
|
327
|
+
let doEval = this._evalSeries[seriesIx];
|
|
347
328
|
if (!defined(doEval)) {
|
|
348
329
|
this._evalSeries[seriesIx] = doEval = evalOptions(options, {}, state, true);
|
|
349
330
|
}
|
|
350
331
|
|
|
351
|
-
|
|
332
|
+
let pointOptions = options;
|
|
352
333
|
if (doEval) {
|
|
353
334
|
pointOptions = deepExtend({}, pointOptions);
|
|
354
335
|
evalOptions(pointOptions, {
|
|
@@ -361,12 +342,12 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
361
342
|
}
|
|
362
343
|
|
|
363
344
|
return pointOptions;
|
|
364
|
-
}
|
|
345
|
+
}
|
|
365
346
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
347
|
+
updateRange(data, fields) {
|
|
348
|
+
const axisName = fields.series.axis;
|
|
349
|
+
const value = data.value;
|
|
350
|
+
let axisRange = this.valueAxisRanges[axisName];
|
|
370
351
|
|
|
371
352
|
if (isFinite(value) && value !== null) {
|
|
372
353
|
axisRange = this.valueAxisRanges[axisName] =
|
|
@@ -375,55 +356,52 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
375
356
|
axisRange.min = Math.min(axisRange.min, value);
|
|
376
357
|
axisRange.max = Math.max(axisRange.max, value);
|
|
377
358
|
}
|
|
378
|
-
}
|
|
359
|
+
}
|
|
379
360
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
361
|
+
seriesValueAxis(series) {
|
|
362
|
+
const plotArea = this.plotArea;
|
|
363
|
+
const axisName = series.axis;
|
|
364
|
+
const axis = axisName ? plotArea.namedValueAxes[axisName] : plotArea.valueAxis;
|
|
384
365
|
|
|
385
366
|
if (!axis) {
|
|
386
367
|
throw new Error("Unable to locate value axis with name " + axisName);
|
|
387
368
|
}
|
|
388
369
|
|
|
389
370
|
return axis;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
CategoricalChart.prototype.reflow = function reflow (targetBox) {
|
|
393
|
-
var this$1 = this;
|
|
371
|
+
}
|
|
394
372
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
373
|
+
reflow(targetBox) {
|
|
374
|
+
const categorySlots = this.categorySlots = [];
|
|
375
|
+
const chartPoints = this.points;
|
|
376
|
+
const categoryAxis = this.categoryAxis;
|
|
377
|
+
let pointIx = 0;
|
|
399
378
|
|
|
400
|
-
this.traverseDataPoints(
|
|
401
|
-
|
|
402
|
-
var currentSeries = fields.series;
|
|
379
|
+
this.traverseDataPoints((data, fields) => {
|
|
380
|
+
const { categoryIx, series: currentSeries } = fields;
|
|
403
381
|
|
|
404
|
-
|
|
405
|
-
|
|
382
|
+
const valueAxis = this.seriesValueAxis(currentSeries);
|
|
383
|
+
const point = chartPoints[pointIx++];
|
|
406
384
|
|
|
407
|
-
|
|
385
|
+
let categorySlot = categorySlots[categoryIx];
|
|
408
386
|
if (!categorySlot) {
|
|
409
387
|
categorySlots[categoryIx] = categorySlot =
|
|
410
|
-
this
|
|
388
|
+
this.categorySlot(categoryAxis, categoryIx, valueAxis);
|
|
411
389
|
}
|
|
412
390
|
|
|
413
391
|
if (point) {
|
|
414
|
-
|
|
415
|
-
|
|
392
|
+
const plotRange = this.plotRange(point, valueAxis.startValue());
|
|
393
|
+
const valueSlot = this.valueSlot(valueAxis, plotRange);
|
|
416
394
|
if (valueSlot) {
|
|
417
|
-
|
|
395
|
+
const pointSlot = this.pointSlot(categorySlot, valueSlot);
|
|
418
396
|
|
|
419
|
-
point.aboveAxis = this
|
|
397
|
+
point.aboveAxis = this.aboveAxis(point, valueAxis);
|
|
420
398
|
point.stackValue = plotRange[1];
|
|
421
399
|
|
|
422
|
-
if (this
|
|
423
|
-
point.percentage = this
|
|
400
|
+
if (this.options.isStacked100) {
|
|
401
|
+
point.percentage = this.plotValue(point);
|
|
424
402
|
}
|
|
425
403
|
|
|
426
|
-
this
|
|
404
|
+
this.reflowPoint(point, pointSlot);
|
|
427
405
|
} else {
|
|
428
406
|
point.visible = false;
|
|
429
407
|
}
|
|
@@ -436,105 +414,101 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
436
414
|
}
|
|
437
415
|
|
|
438
416
|
this.box = targetBox;
|
|
439
|
-
}
|
|
417
|
+
}
|
|
440
418
|
|
|
441
|
-
|
|
419
|
+
valueSlot(valueAxis, plotRange) {
|
|
442
420
|
return valueAxis.getSlot(plotRange[0], plotRange[1], !this.options.clip);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
CategoricalChart.prototype.limitPoints = function limitPoints () {
|
|
446
|
-
var this$1 = this;
|
|
421
|
+
}
|
|
447
422
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
423
|
+
limitPoints() {
|
|
424
|
+
const categoryPoints = this.categoryPoints;
|
|
425
|
+
const points = categoryPoints[0].concat(last(categoryPoints));
|
|
426
|
+
for (let idx = 0; idx < points.length; idx++) {
|
|
451
427
|
if (points[idx]) {
|
|
452
|
-
this
|
|
428
|
+
this.limitPoint(points[idx]);
|
|
453
429
|
}
|
|
454
430
|
}
|
|
455
|
-
}
|
|
431
|
+
}
|
|
456
432
|
|
|
457
|
-
|
|
458
|
-
|
|
433
|
+
limitPoint(point) {
|
|
434
|
+
const limitedSlot = this.categoryAxis.limitSlot(point.box);
|
|
459
435
|
if (!limitedSlot.equals(point.box)) {
|
|
460
436
|
point.reflow(limitedSlot);
|
|
461
437
|
}
|
|
462
|
-
}
|
|
438
|
+
}
|
|
463
439
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
440
|
+
aboveAxis(point, valueAxis) {
|
|
441
|
+
const axisCrossingValue = this.categoryAxisCrossingValue(valueAxis);
|
|
442
|
+
const value = point.value;
|
|
467
443
|
|
|
468
444
|
return valueAxis.options.reverse ?
|
|
469
445
|
value < axisCrossingValue : value >= axisCrossingValue;
|
|
470
|
-
}
|
|
446
|
+
}
|
|
471
447
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
448
|
+
categoryAxisCrossingValue(valueAxis) {
|
|
449
|
+
const categoryAxis = this.categoryAxis;
|
|
450
|
+
const options = valueAxis.options;
|
|
451
|
+
const crossingValues = [].concat(
|
|
476
452
|
options.axisCrossingValues || options.axisCrossingValue
|
|
477
453
|
);
|
|
478
454
|
|
|
479
455
|
return crossingValues[categoryAxis.axisIndex || 0] || 0;
|
|
480
|
-
}
|
|
456
|
+
}
|
|
481
457
|
|
|
482
|
-
|
|
458
|
+
reflowPoint(point, pointSlot) {
|
|
483
459
|
point.reflow(pointSlot);
|
|
484
|
-
}
|
|
460
|
+
}
|
|
485
461
|
|
|
486
|
-
|
|
462
|
+
reflowCategories() { }
|
|
487
463
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
464
|
+
pointSlot(categorySlot, valueSlot) {
|
|
465
|
+
const options = this.options;
|
|
466
|
+
const invertAxes = options.invertAxes;
|
|
467
|
+
const slotX = invertAxes ? valueSlot : categorySlot;
|
|
468
|
+
const slotY = invertAxes ? categorySlot : valueSlot;
|
|
493
469
|
|
|
494
470
|
return new Box(slotX.x1, slotY.y1, slotX.x2, slotY.y2);
|
|
495
|
-
}
|
|
471
|
+
}
|
|
496
472
|
|
|
497
|
-
|
|
473
|
+
categorySlot(categoryAxis, categoryIx) {
|
|
498
474
|
return categoryAxis.getSlot(categoryIx);
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
CategoricalChart.prototype.traverseDataPoints = function traverseDataPoints (callback) {
|
|
502
|
-
var this$1 = this;
|
|
475
|
+
}
|
|
503
476
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
477
|
+
traverseDataPoints(callback) {
|
|
478
|
+
const series = this.options.series;
|
|
479
|
+
const count = categoriesCount(series);
|
|
480
|
+
const seriesCount = series.length;
|
|
507
481
|
|
|
508
|
-
for (
|
|
509
|
-
this
|
|
482
|
+
for (let seriesIx = 0; seriesIx < seriesCount; seriesIx++) {
|
|
483
|
+
this._outOfRangeCallback(series[seriesIx], "_outOfRangeMinPoint", seriesIx, callback);
|
|
510
484
|
}
|
|
511
485
|
|
|
512
|
-
for (
|
|
513
|
-
for (
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
486
|
+
for (let categoryIx = 0; categoryIx < count; categoryIx++) {
|
|
487
|
+
for (let seriesIx = 0; seriesIx < seriesCount; seriesIx++) {
|
|
488
|
+
const currentSeries = series[seriesIx];
|
|
489
|
+
const currentCategory = this.categoryAxis.categoryAt(categoryIx);
|
|
490
|
+
const pointData = this.plotArea.bindPoint(currentSeries, categoryIx);
|
|
517
491
|
|
|
518
492
|
callback(pointData, {
|
|
519
493
|
category: currentCategory,
|
|
520
494
|
categoryIx: categoryIx,
|
|
521
495
|
categoriesCount: count,
|
|
522
496
|
series: currentSeries,
|
|
523
|
-
seriesIx: seriesIx
|
|
497
|
+
seriesIx: seriesIx
|
|
524
498
|
});
|
|
525
499
|
}
|
|
526
500
|
}
|
|
527
501
|
|
|
528
|
-
for (
|
|
529
|
-
this
|
|
502
|
+
for (let seriesIx = 0; seriesIx < seriesCount; seriesIx++) {
|
|
503
|
+
this._outOfRangeCallback(series[seriesIx], "_outOfRangeMaxPoint", seriesIx, callback);
|
|
530
504
|
}
|
|
531
|
-
}
|
|
505
|
+
}
|
|
532
506
|
|
|
533
|
-
|
|
534
|
-
|
|
507
|
+
_outOfRangeCallback(series, field, seriesIx, callback) {
|
|
508
|
+
const outOfRangePoint = series[field];
|
|
535
509
|
if (outOfRangePoint) {
|
|
536
|
-
|
|
537
|
-
|
|
510
|
+
const categoryIx = outOfRangePoint.categoryIx;
|
|
511
|
+
const pointData = this.plotArea.bindPoint(series, categoryIx, outOfRangePoint.item);
|
|
538
512
|
|
|
539
513
|
callback(pointData, {
|
|
540
514
|
category: outOfRangePoint.category,
|
|
@@ -544,22 +518,20 @@ var CategoricalChart = (function (ChartElement) {
|
|
|
544
518
|
dataItem: outOfRangePoint.item
|
|
545
519
|
});
|
|
546
520
|
}
|
|
547
|
-
}
|
|
521
|
+
}
|
|
548
522
|
|
|
549
|
-
|
|
523
|
+
formatPointValue(point, format) {
|
|
550
524
|
if (point.value === null) {
|
|
551
525
|
return "";
|
|
552
526
|
}
|
|
553
527
|
|
|
554
528
|
return this.chartService.format.auto(format, point.value);
|
|
555
|
-
}
|
|
529
|
+
}
|
|
556
530
|
|
|
557
|
-
|
|
531
|
+
pointValue(data) {
|
|
558
532
|
return data.valueFields.value;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
return CategoricalChart;
|
|
562
|
-
}(ChartElement));
|
|
533
|
+
}
|
|
534
|
+
}
|
|
563
535
|
|
|
564
536
|
setDefaultOptions(CategoricalChart, {
|
|
565
537
|
series: [],
|