@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
|
@@ -12,50 +12,39 @@ import anyHasZIndex from '../utils/any-has-z-index';
|
|
|
12
12
|
import { OBJECT, STRING, X, Y } from '../../common/constants';
|
|
13
13
|
import { defined, isFunction, setDefaultOptions } from '../../common';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
function BarChart () {
|
|
17
|
-
CategoricalChart.apply(this, arguments);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if ( CategoricalChart ) BarChart.__proto__ = CategoricalChart;
|
|
21
|
-
BarChart.prototype = Object.create( CategoricalChart && CategoricalChart.prototype );
|
|
22
|
-
BarChart.prototype.constructor = BarChart;
|
|
15
|
+
class BarChart extends CategoricalChart {
|
|
23
16
|
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
render() {
|
|
18
|
+
super.render();
|
|
26
19
|
this.updateStackRange();
|
|
27
|
-
}
|
|
20
|
+
}
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
pointType() {
|
|
30
23
|
return Bar;
|
|
31
|
-
}
|
|
24
|
+
}
|
|
32
25
|
|
|
33
|
-
|
|
26
|
+
clusterType() {
|
|
34
27
|
return ClusterLayout;
|
|
35
|
-
}
|
|
28
|
+
}
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
stackType() {
|
|
38
31
|
return StackWrap;
|
|
39
|
-
}
|
|
32
|
+
}
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
stackLimits(axisName, stackName) {
|
|
35
|
+
const limits = super.stackLimits(axisName, stackName);
|
|
43
36
|
|
|
44
37
|
return limits;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var value = this.pointValue(data);
|
|
56
|
-
var pointOptions = this.pointOptions(series, seriesIx);
|
|
57
|
-
|
|
58
|
-
var labelOptions = pointOptions.labels;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
createPoint(data, fields) {
|
|
41
|
+
const { categoryIx, series, seriesIx } = fields;
|
|
42
|
+
const { options, children } = this;
|
|
43
|
+
const stackOrDefault = defined(series.stack) ? series.stack : options.defaultStack;
|
|
44
|
+
const value = this.pointValue(data);
|
|
45
|
+
let pointOptions = this.pointOptions(series, seriesIx);
|
|
46
|
+
|
|
47
|
+
const labelOptions = pointOptions.labels;
|
|
59
48
|
if (stackOrDefault) {
|
|
60
49
|
if (labelOptions.position === OUTSIDE_END) {
|
|
61
50
|
labelOptions.position = INSIDE_END;
|
|
@@ -64,7 +53,7 @@ var BarChart = (function (CategoricalChart) {
|
|
|
64
53
|
|
|
65
54
|
pointOptions.isStacked = stackOrDefault;
|
|
66
55
|
|
|
67
|
-
|
|
56
|
+
let color = data.fields.color || series.color;
|
|
68
57
|
if (value < 0 && pointOptions.negativeColor) {
|
|
69
58
|
color = pointOptions.negativeColor;
|
|
70
59
|
}
|
|
@@ -74,13 +63,13 @@ var BarChart = (function (CategoricalChart) {
|
|
|
74
63
|
color = pointOptions.color;
|
|
75
64
|
}
|
|
76
65
|
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
const pointType = this.pointType();
|
|
67
|
+
const point = new pointType(value, pointOptions);
|
|
79
68
|
point.color = color;
|
|
80
69
|
|
|
81
|
-
|
|
70
|
+
let cluster = children[categoryIx];
|
|
82
71
|
if (!cluster) {
|
|
83
|
-
|
|
72
|
+
const clusterType = this.clusterType();
|
|
84
73
|
cluster = new clusterType({
|
|
85
74
|
vertical: options.invertAxes,
|
|
86
75
|
gap: options.gap,
|
|
@@ -91,22 +80,22 @@ var BarChart = (function (CategoricalChart) {
|
|
|
91
80
|
}
|
|
92
81
|
|
|
93
82
|
if (options.isStacked) {
|
|
94
|
-
|
|
83
|
+
const stackWrap = this.getStackWrap(stackOrDefault, cluster);
|
|
95
84
|
stackWrap.append(point);
|
|
96
85
|
} else {
|
|
97
86
|
cluster.append(point);
|
|
98
87
|
}
|
|
99
88
|
|
|
100
89
|
return point;
|
|
101
|
-
}
|
|
90
|
+
}
|
|
102
91
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
92
|
+
getStackWrap(stack, cluster) {
|
|
93
|
+
const stackGroup = (typeof stack === OBJECT) ? (stack.group || true) : stack;
|
|
94
|
+
const wraps = cluster.children;
|
|
95
|
+
let stackWrap;
|
|
107
96
|
|
|
108
97
|
if (typeof stackGroup === STRING || stackGroup === true) {
|
|
109
|
-
for (
|
|
98
|
+
for (let i = 0; i < wraps.length; i++) {
|
|
110
99
|
if (wraps[i]._stackGroup === stackGroup) {
|
|
111
100
|
stackWrap = wraps[i];
|
|
112
101
|
break;
|
|
@@ -115,7 +104,7 @@ var BarChart = (function (CategoricalChart) {
|
|
|
115
104
|
}
|
|
116
105
|
|
|
117
106
|
if (!stackWrap) {
|
|
118
|
-
|
|
107
|
+
const stackType = this.stackType();
|
|
119
108
|
stackWrap = new stackType({
|
|
120
109
|
vertical: !this.options.invertAxes
|
|
121
110
|
});
|
|
@@ -124,62 +113,60 @@ var BarChart = (function (CategoricalChart) {
|
|
|
124
113
|
}
|
|
125
114
|
|
|
126
115
|
return stackWrap;
|
|
127
|
-
}
|
|
116
|
+
}
|
|
128
117
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
118
|
+
categorySlot(categoryAxis, categoryIx, valueAxis) {
|
|
119
|
+
const options = this.options;
|
|
120
|
+
const categorySlot = categoryAxis.getSlot(categoryIx);
|
|
121
|
+
const startValue = valueAxis.startValue();
|
|
133
122
|
|
|
134
123
|
if (options.isStacked) {
|
|
135
|
-
|
|
136
|
-
|
|
124
|
+
const zeroSlot = valueAxis.getSlot(startValue, startValue, true);
|
|
125
|
+
const stackAxis = options.invertAxes ? X : Y;
|
|
137
126
|
categorySlot[stackAxis + 1] = categorySlot[stackAxis + 2] = zeroSlot[stackAxis + 1];
|
|
138
127
|
}
|
|
139
128
|
|
|
140
129
|
return categorySlot;
|
|
141
|
-
}
|
|
130
|
+
}
|
|
142
131
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
132
|
+
reflowCategories(categorySlots) {
|
|
133
|
+
const children = this.children;
|
|
134
|
+
const childrenLength = children.length;
|
|
146
135
|
|
|
147
|
-
for (
|
|
136
|
+
for (let i = 0; i < childrenLength; i++) {
|
|
148
137
|
children[i].reflow(categorySlots[i]);
|
|
149
138
|
}
|
|
150
|
-
}
|
|
139
|
+
}
|
|
151
140
|
|
|
152
|
-
|
|
141
|
+
createAnimation() {
|
|
153
142
|
this._setAnimationOptions();
|
|
154
|
-
|
|
143
|
+
super.createAnimation();
|
|
155
144
|
|
|
156
145
|
if (anyHasZIndex(this.options.series)) {
|
|
157
146
|
this._setChildrenAnimation();
|
|
158
147
|
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
BarChart.prototype._setChildrenAnimation = function _setChildrenAnimation () {
|
|
162
|
-
var this$1 = this;
|
|
148
|
+
}
|
|
163
149
|
|
|
164
|
-
|
|
150
|
+
_setChildrenAnimation() {
|
|
151
|
+
const points = this.points;
|
|
165
152
|
|
|
166
|
-
for (
|
|
167
|
-
|
|
168
|
-
|
|
153
|
+
for (let idx = 0; idx < points.length; idx++) {
|
|
154
|
+
const point = points[idx];
|
|
155
|
+
const pointVisual = point.visual;
|
|
169
156
|
if (pointVisual && defined(pointVisual.options.zIndex)) {
|
|
170
|
-
point.options.animation = this
|
|
157
|
+
point.options.animation = this.options.animation;
|
|
171
158
|
point.createAnimation();
|
|
172
159
|
}
|
|
173
160
|
}
|
|
174
|
-
}
|
|
161
|
+
}
|
|
175
162
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
163
|
+
_setAnimationOptions() {
|
|
164
|
+
const options = this.options;
|
|
165
|
+
const animation = options.animation || {};
|
|
166
|
+
let origin;
|
|
180
167
|
|
|
181
168
|
if (options.isStacked) {
|
|
182
|
-
|
|
169
|
+
const valueAxis = this.seriesValueAxis(options.series[0]);
|
|
183
170
|
origin = valueAxis.getSlot(valueAxis.startValue());
|
|
184
171
|
} else {
|
|
185
172
|
origin = this.categoryAxis.getSlot(0);
|
|
@@ -187,10 +174,8 @@ var BarChart = (function (CategoricalChart) {
|
|
|
187
174
|
|
|
188
175
|
animation.origin = new geom.Point(origin.x1, origin.y1);
|
|
189
176
|
animation.vertical = !options.invertAxes;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
return BarChart;
|
|
193
|
-
}(CategoricalChart));
|
|
177
|
+
}
|
|
178
|
+
}
|
|
194
179
|
|
|
195
180
|
setDefaultOptions(BarChart, {
|
|
196
181
|
animation: {
|
|
@@ -4,31 +4,26 @@ import { FADEIN, INITIAL_ANIMATION_DURATION, INSIDE_END, INSIDE_BASE, OUTSIDE_EN
|
|
|
4
4
|
import { CENTER, TOP, BOTTOM, LEFT, RIGHT, X, Y, BLACK } from '../../common/constants';
|
|
5
5
|
import { getSpacing, setDefaultOptions } from '../../common';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
class BarLabel extends ChartElement {
|
|
8
|
+
constructor(content, options, pointData) {
|
|
9
|
+
super(options);
|
|
10
10
|
|
|
11
11
|
this.textBox = new TextBox(content, this.options, pointData);
|
|
12
12
|
this.append(this.textBox);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
BarLabel.prototype = Object.create( ChartElement && ChartElement.prototype );
|
|
17
|
-
BarLabel.prototype.constructor = BarLabel;
|
|
18
|
-
|
|
19
|
-
BarLabel.prototype.createVisual = function createVisual () {
|
|
15
|
+
createVisual() {
|
|
20
16
|
this.textBox.options.noclip = this.options.noclip;
|
|
21
|
-
}
|
|
17
|
+
}
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var labelBox = targetBox;
|
|
19
|
+
reflow(targetBox) {
|
|
20
|
+
const options = this.options;
|
|
21
|
+
const { vertical, aboveAxis } = options;
|
|
22
|
+
const text = this.children[0];
|
|
23
|
+
const textOptions = text.options;
|
|
24
|
+
const box = text.box;
|
|
25
|
+
const padding = text.options.padding;
|
|
26
|
+
let labelBox = targetBox;
|
|
32
27
|
|
|
33
28
|
textOptions.align = vertical ? CENTER : LEFT;
|
|
34
29
|
textOptions.vAlign = vertical ? TOP : CENTER;
|
|
@@ -55,7 +50,7 @@ var BarLabel = (function (ChartElement) {
|
|
|
55
50
|
} else if (options.position === OUTSIDE_END) {
|
|
56
51
|
if (vertical) {
|
|
57
52
|
if (aboveAxis) {
|
|
58
|
-
|
|
53
|
+
const boxesDiff = (box.width() - targetBox.width() - padding.left - padding.right) / 2;
|
|
59
54
|
labelBox = new Box(
|
|
60
55
|
targetBox.x1 - boxesDiff, targetBox.y1 - box.height(),
|
|
61
56
|
targetBox.x2 + boxesDiff, targetBox.y1
|
|
@@ -93,27 +88,25 @@ var BarLabel = (function (ChartElement) {
|
|
|
93
88
|
}
|
|
94
89
|
|
|
95
90
|
text.reflow(labelBox);
|
|
96
|
-
}
|
|
91
|
+
}
|
|
97
92
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
alignToClipBox(clipBox) {
|
|
94
|
+
const vertical = this.options.vertical;
|
|
95
|
+
const field = vertical ? Y : X;
|
|
96
|
+
const start = field + "1";
|
|
97
|
+
const end = field + "2";
|
|
98
|
+
const text = this.children[0];
|
|
99
|
+
const parentBox = this.parent.box;
|
|
105
100
|
|
|
106
101
|
if (parentBox[start] < clipBox[start] || clipBox[end] < parentBox[end]) {
|
|
107
|
-
|
|
102
|
+
const targetBox = text.paddingBox.clone();
|
|
108
103
|
targetBox[start] = Math.max(parentBox[start], clipBox[start]);
|
|
109
104
|
targetBox[end] = Math.min(parentBox[end], clipBox[end]);
|
|
110
105
|
|
|
111
106
|
this.reflow(targetBox);
|
|
112
107
|
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return BarLabel;
|
|
116
|
-
}(ChartElement));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
117
110
|
|
|
118
111
|
setDefaultOptions(BarLabel, {
|
|
119
112
|
position: OUTSIDE_END,
|
|
@@ -15,11 +15,11 @@ import AccessibilityAttributesMixin from '../mixins/accessibility-attributes-mix
|
|
|
15
15
|
import { WHITE, LEFT, RIGHT, BOTTOM, TOP } from '../../common/constants';
|
|
16
16
|
import { alignPathToPixel, deepExtend, defined, getTemplate, valueOrDefault } from '../../common';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const BAR_ALIGN_MIN_WIDTH = 6;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
class Bar extends ChartElement {
|
|
21
|
+
constructor(value, options) {
|
|
22
|
+
super();
|
|
23
23
|
|
|
24
24
|
this.options = options;
|
|
25
25
|
this.color = options.color || WHITE;
|
|
@@ -27,11 +27,7 @@ var Bar = (function (ChartElement) {
|
|
|
27
27
|
this.value = value;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
Bar.prototype = Object.create( ChartElement && ChartElement.prototype );
|
|
32
|
-
Bar.prototype.constructor = Bar;
|
|
33
|
-
|
|
34
|
-
Bar.prototype.render = function render () {
|
|
30
|
+
render() {
|
|
35
31
|
if (this._rendered) {
|
|
36
32
|
return;
|
|
37
33
|
}
|
|
@@ -44,47 +40,45 @@ var Bar = (function (ChartElement) {
|
|
|
44
40
|
if (this.errorBar) {
|
|
45
41
|
this.append(this.errorBar);
|
|
46
42
|
}
|
|
47
|
-
}
|
|
43
|
+
}
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
createLabel() {
|
|
46
|
+
const options = this.options;
|
|
47
|
+
const labels = options.labels;
|
|
52
48
|
|
|
53
49
|
if (labels.visible) {
|
|
54
50
|
this.label = this.createLabelElement(labels);
|
|
55
51
|
this.append(this.label);
|
|
56
52
|
}
|
|
57
|
-
}
|
|
53
|
+
}
|
|
58
54
|
|
|
59
|
-
|
|
55
|
+
createLabelElement(options) {
|
|
60
56
|
return new BarLabel(this.getLabelText(options),
|
|
61
57
|
deepExtend({
|
|
62
58
|
vertical: this.options.vertical
|
|
63
59
|
},
|
|
64
60
|
options
|
|
65
61
|
), this.pointData());
|
|
66
|
-
}
|
|
62
|
+
}
|
|
67
63
|
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
getLabelText(options) {
|
|
65
|
+
let labelTemplate = getTemplate(options);
|
|
70
66
|
|
|
71
67
|
if (labelTemplate) {
|
|
72
68
|
return labelTemplate(this.pointData());
|
|
73
69
|
}
|
|
74
70
|
|
|
75
71
|
return this.formatValue(options.format);
|
|
76
|
-
}
|
|
72
|
+
}
|
|
77
73
|
|
|
78
|
-
|
|
74
|
+
formatValue(format) {
|
|
79
75
|
return this.owner.formatPointValue(this, format);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
Bar.prototype.reflow = function reflow (targetBox) {
|
|
83
|
-
var this$1 = this;
|
|
76
|
+
}
|
|
84
77
|
|
|
78
|
+
reflow(targetBox) {
|
|
85
79
|
this.render();
|
|
86
80
|
|
|
87
|
-
|
|
81
|
+
const label = this.label;
|
|
88
82
|
|
|
89
83
|
this.box = targetBox;
|
|
90
84
|
|
|
@@ -98,27 +92,23 @@ var Bar = (function (ChartElement) {
|
|
|
98
92
|
}
|
|
99
93
|
|
|
100
94
|
if (this.errorBars) {
|
|
101
|
-
for (
|
|
102
|
-
this
|
|
95
|
+
for (let i = 0; i < this.errorBars.length; i++) {
|
|
96
|
+
this.errorBars[i].reflow(targetBox);
|
|
103
97
|
}
|
|
104
98
|
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
Bar.prototype.createVisual = function createVisual () {
|
|
108
|
-
var this$1 = this;
|
|
99
|
+
}
|
|
109
100
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
var customVisual = options.visual;
|
|
101
|
+
createVisual() {
|
|
102
|
+
const { box, options } = this;
|
|
103
|
+
const customVisual = options.visual;
|
|
114
104
|
|
|
115
105
|
if (this.visible !== false) {
|
|
116
|
-
|
|
106
|
+
super.createVisual();
|
|
117
107
|
|
|
118
108
|
this.addAccessibilityAttributesToVisual();
|
|
119
109
|
|
|
120
110
|
if (customVisual) {
|
|
121
|
-
|
|
111
|
+
const visual = this.rectVisual = customVisual({
|
|
122
112
|
category: this.category,
|
|
123
113
|
dataItem: this.dataItem,
|
|
124
114
|
value: this.value,
|
|
@@ -129,9 +119,9 @@ var Bar = (function (ChartElement) {
|
|
|
129
119
|
runningTotal: this.runningTotal,
|
|
130
120
|
total: this.total,
|
|
131
121
|
rect: box.toRect(),
|
|
132
|
-
createVisual:
|
|
133
|
-
|
|
134
|
-
this
|
|
122
|
+
createVisual: () => {
|
|
123
|
+
const group = new draw.Group();
|
|
124
|
+
this.createRect(group);
|
|
135
125
|
return group;
|
|
136
126
|
},
|
|
137
127
|
options: options
|
|
@@ -144,17 +134,17 @@ var Bar = (function (ChartElement) {
|
|
|
144
134
|
this.createRect(this.visual);
|
|
145
135
|
}
|
|
146
136
|
}
|
|
147
|
-
}
|
|
137
|
+
}
|
|
148
138
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
139
|
+
createRect(visual) {
|
|
140
|
+
const options = this.options;
|
|
141
|
+
const border = options.border;
|
|
142
|
+
const strokeOpacity = defined(border.opacity) ? border.opacity : options.opacity;
|
|
143
|
+
const rect = this.box.toRect();
|
|
154
144
|
|
|
155
145
|
rect.size.width = Math.round(rect.size.width);
|
|
156
146
|
|
|
157
|
-
|
|
147
|
+
const path = this.rectVisual = draw.Path.fromRect(rect, {
|
|
158
148
|
fill: createPatternFill(options.pattern, {
|
|
159
149
|
color: this.color,
|
|
160
150
|
opacity: options.opacity
|
|
@@ -167,10 +157,10 @@ var Bar = (function (ChartElement) {
|
|
|
167
157
|
}
|
|
168
158
|
});
|
|
169
159
|
|
|
170
|
-
|
|
171
|
-
|
|
160
|
+
const width = this.box.width();
|
|
161
|
+
const height = this.box.height();
|
|
172
162
|
|
|
173
|
-
|
|
163
|
+
const size = options.vertical ? width : height;
|
|
174
164
|
|
|
175
165
|
if (size > BAR_ALIGN_MIN_WIDTH) {
|
|
176
166
|
alignPathToPixel(path);
|
|
@@ -184,61 +174,58 @@ var Bar = (function (ChartElement) {
|
|
|
184
174
|
visual.append(path);
|
|
185
175
|
|
|
186
176
|
if (hasGradientOverlay(options)) {
|
|
187
|
-
|
|
177
|
+
const overlay = this.createGradientOverlay(path, { baseColor: this.color }, deepExtend({
|
|
188
178
|
end: !options.vertical ? [ 0, 1 ] : undefined
|
|
189
179
|
}, options.overlay));
|
|
190
180
|
|
|
191
181
|
visual.append(overlay);
|
|
192
182
|
}
|
|
193
|
-
}
|
|
183
|
+
}
|
|
194
184
|
|
|
195
|
-
|
|
196
|
-
|
|
185
|
+
createHighlight(style) {
|
|
186
|
+
const highlight = draw.Path.fromRect(this.box.toRect(), style);
|
|
197
187
|
|
|
198
188
|
return alignPathToPixel(highlight);
|
|
199
|
-
}
|
|
189
|
+
}
|
|
200
190
|
|
|
201
|
-
|
|
191
|
+
highlightVisual() {
|
|
202
192
|
return this.rectVisual;
|
|
203
|
-
}
|
|
193
|
+
}
|
|
204
194
|
|
|
205
|
-
|
|
195
|
+
highlightVisualArgs() {
|
|
206
196
|
return {
|
|
207
197
|
options: this.options,
|
|
208
198
|
rect: this.box.toRect(),
|
|
209
199
|
visual: this.rectVisual
|
|
210
200
|
};
|
|
211
|
-
}
|
|
201
|
+
}
|
|
212
202
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
203
|
+
createFocusHighlight(style) {
|
|
204
|
+
const borderWidth = this.options.focusHighlight.border.width;
|
|
205
|
+
const highlight = draw.Path.fromRect(this.box.pad(borderWidth / 2).toRect(), style);
|
|
216
206
|
|
|
217
207
|
return alignPathToPixel(highlight);
|
|
218
|
-
}
|
|
208
|
+
}
|
|
219
209
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
210
|
+
getBorderColor() {
|
|
211
|
+
const color = this.color;
|
|
212
|
+
const border = this.options.border;
|
|
213
|
+
const brightness = border._brightness || BORDER_BRIGHTNESS;
|
|
214
|
+
let borderColor = border.color;
|
|
225
215
|
|
|
226
216
|
if (!defined(borderColor)) {
|
|
227
217
|
borderColor = new Color(color).brightness(brightness).toHex();
|
|
228
218
|
}
|
|
229
219
|
|
|
230
220
|
return borderColor;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
var horizontalAlign = LEFT;
|
|
240
|
-
var verticalAlign = TOP;
|
|
241
|
-
var x, y;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
tooltipAnchor() {
|
|
224
|
+
const { options, box, aboveAxis } = this;
|
|
225
|
+
const clipBox = this.owner.pane.clipBox() || box;
|
|
226
|
+
let horizontalAlign = LEFT;
|
|
227
|
+
let verticalAlign = TOP;
|
|
228
|
+
let x, y;
|
|
242
229
|
|
|
243
230
|
if (options.vertical) {
|
|
244
231
|
x = Math.min(box.x2, clipBox.x2) + TOOLTIP_OFFSET;
|
|
@@ -249,8 +236,8 @@ var Bar = (function (ChartElement) {
|
|
|
249
236
|
verticalAlign = BOTTOM;
|
|
250
237
|
}
|
|
251
238
|
} else {
|
|
252
|
-
|
|
253
|
-
|
|
239
|
+
const x1 = Math.max(box.x1, clipBox.x1);
|
|
240
|
+
const x2 = Math.min(box.x2, clipBox.x2);
|
|
254
241
|
|
|
255
242
|
if (options.isStacked) {
|
|
256
243
|
verticalAlign = BOTTOM;
|
|
@@ -279,13 +266,13 @@ var Bar = (function (ChartElement) {
|
|
|
279
266
|
vertical: verticalAlign
|
|
280
267
|
}
|
|
281
268
|
};
|
|
282
|
-
}
|
|
269
|
+
}
|
|
283
270
|
|
|
284
|
-
|
|
271
|
+
overlapsBox(box) {
|
|
285
272
|
return this.box.overlaps(box);
|
|
286
|
-
}
|
|
273
|
+
}
|
|
287
274
|
|
|
288
|
-
|
|
275
|
+
pointData() {
|
|
289
276
|
return {
|
|
290
277
|
dataItem: this.dataItem,
|
|
291
278
|
category: this.category,
|
|
@@ -296,14 +283,12 @@ var Bar = (function (ChartElement) {
|
|
|
296
283
|
total: this.total,
|
|
297
284
|
series: this.series
|
|
298
285
|
};
|
|
299
|
-
}
|
|
286
|
+
}
|
|
300
287
|
|
|
301
|
-
|
|
288
|
+
getIndex() {
|
|
302
289
|
return this.categoryIx;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
return Bar;
|
|
306
|
-
}(ChartElement));
|
|
290
|
+
}
|
|
291
|
+
}
|
|
307
292
|
|
|
308
293
|
deepExtend(Bar.prototype, PointEventsMixin);
|
|
309
294
|
deepExtend(Bar.prototype, NoteMixin);
|