@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 { WHITE, CIRCLE, CENTER, TOP, BOTTOM, LEFT, HIGHLIGHT_ZINDEX } from '../.
|
|
|
10
10
|
import { deepExtend, defined, getTemplate, getAriaTemplate, valueOrDefault, getSpacing } from '../../common';
|
|
11
11
|
import guid from '../../core/utils/guid';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
class LinePoint extends ChartElement {
|
|
14
|
+
constructor(value, options) {
|
|
15
|
+
super();
|
|
16
16
|
|
|
17
17
|
this.value = value;
|
|
18
18
|
this.options = options;
|
|
@@ -21,13 +21,8 @@ var LinePoint = (function (ChartElement) {
|
|
|
21
21
|
this._id = guid();
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
LinePoint.prototype.constructor = LinePoint;
|
|
27
|
-
|
|
28
|
-
LinePoint.prototype.render = function render () {
|
|
29
|
-
var ref = this.options;
|
|
30
|
-
var markers = ref.markers;
|
|
24
|
+
render() {
|
|
25
|
+
const { markers } = this.options;
|
|
31
26
|
|
|
32
27
|
if (this._rendered) {
|
|
33
28
|
return;
|
|
@@ -46,19 +41,19 @@ var LinePoint = (function (ChartElement) {
|
|
|
46
41
|
if (this.errorBar) {
|
|
47
42
|
this.append(this.errorBar);
|
|
48
43
|
}
|
|
49
|
-
}
|
|
44
|
+
}
|
|
50
45
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
createLabel() {
|
|
47
|
+
const options = this.options;
|
|
48
|
+
const labels = options.labels;
|
|
54
49
|
|
|
55
50
|
if (labels.visible) {
|
|
56
51
|
this.label = this.createLabelElement(labels);
|
|
57
52
|
this.append(this.label);
|
|
58
53
|
}
|
|
59
|
-
}
|
|
54
|
+
}
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
createLabelElement(options) {
|
|
62
57
|
return new TextBox(this.getLabelText(options),
|
|
63
58
|
deepExtend({
|
|
64
59
|
align: CENTER,
|
|
@@ -71,10 +66,10 @@ var LinePoint = (function (ChartElement) {
|
|
|
71
66
|
}, options),
|
|
72
67
|
this.pointData()
|
|
73
68
|
);
|
|
74
|
-
}
|
|
69
|
+
}
|
|
75
70
|
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
getLabelText(options) {
|
|
72
|
+
let labelTemplate = getTemplate(options);
|
|
78
73
|
|
|
79
74
|
if (labelTemplate) {
|
|
80
75
|
return labelTemplate(this.pointData());
|
|
@@ -83,36 +78,36 @@ var LinePoint = (function (ChartElement) {
|
|
|
83
78
|
}
|
|
84
79
|
|
|
85
80
|
return this.value;
|
|
86
|
-
}
|
|
81
|
+
}
|
|
87
82
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
getAriaLabelText() {
|
|
84
|
+
const labels = this.options.labels;
|
|
85
|
+
const ariaTemplate = getAriaTemplate(labels);
|
|
91
86
|
|
|
92
87
|
if (ariaTemplate) {
|
|
93
88
|
return ariaTemplate(this.pointData());
|
|
94
89
|
}
|
|
95
90
|
|
|
96
91
|
return this.getLabelText(labels);
|
|
97
|
-
}
|
|
92
|
+
}
|
|
98
93
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
markerBorder() {
|
|
95
|
+
const options = this.options.markers;
|
|
96
|
+
const background = options.background;
|
|
97
|
+
const border = deepExtend({ color: this.color }, options.border);
|
|
103
98
|
|
|
104
99
|
if (!defined(border.color)) {
|
|
105
100
|
border.color = new Color(background).brightness(BORDER_BRIGHTNESS).toHex();
|
|
106
101
|
}
|
|
107
102
|
|
|
108
103
|
return border;
|
|
109
|
-
}
|
|
104
|
+
}
|
|
110
105
|
|
|
111
|
-
|
|
106
|
+
createVisual() {}
|
|
112
107
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
createMarker() {
|
|
109
|
+
const options = this.options.markers;
|
|
110
|
+
const marker = new ShapeElement({
|
|
116
111
|
type: options.type,
|
|
117
112
|
width: options.size,
|
|
118
113
|
height: options.size,
|
|
@@ -135,29 +130,25 @@ var LinePoint = (function (ChartElement) {
|
|
|
135
130
|
});
|
|
136
131
|
|
|
137
132
|
return marker;
|
|
138
|
-
}
|
|
133
|
+
}
|
|
139
134
|
|
|
140
|
-
|
|
135
|
+
markerBox() {
|
|
141
136
|
if (!this.marker) {
|
|
142
137
|
this.marker = this.createMarker();
|
|
143
138
|
this.marker.reflow(this._childBox);
|
|
144
139
|
}
|
|
145
140
|
|
|
146
141
|
return this.marker.box;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
LinePoint.prototype.reflow = function reflow (targetBox) {
|
|
150
|
-
var this$1 = this;
|
|
142
|
+
}
|
|
151
143
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
var vertical = options.vertical;
|
|
144
|
+
reflow(targetBox) {
|
|
145
|
+
const { options, aboveAxis } = this;
|
|
146
|
+
const vertical = options.vertical;
|
|
156
147
|
|
|
157
148
|
this.render();
|
|
158
149
|
|
|
159
150
|
this.box = targetBox;
|
|
160
|
-
|
|
151
|
+
const childBox = targetBox.clone();
|
|
161
152
|
|
|
162
153
|
if (vertical) {
|
|
163
154
|
if (aboveAxis) {
|
|
@@ -181,28 +172,26 @@ var LinePoint = (function (ChartElement) {
|
|
|
181
172
|
this.reflowLabel(childBox);
|
|
182
173
|
|
|
183
174
|
if (this.errorBars) {
|
|
184
|
-
for (
|
|
185
|
-
this
|
|
175
|
+
for (let i = 0; i < this.errorBars.length; i++) {
|
|
176
|
+
this.errorBars[i].reflow(childBox);
|
|
186
177
|
}
|
|
187
178
|
}
|
|
188
179
|
|
|
189
180
|
if (this.note) {
|
|
190
|
-
|
|
181
|
+
let noteTargetBox = this.markerBox();
|
|
191
182
|
|
|
192
183
|
if (!(options.markers.visible && options.markers.size)) {
|
|
193
|
-
|
|
184
|
+
const center = noteTargetBox.center();
|
|
194
185
|
noteTargetBox = new Box(center.x, center.y, center.x, center.y);
|
|
195
186
|
}
|
|
196
187
|
|
|
197
188
|
this.note.reflow(noteTargetBox);
|
|
198
189
|
}
|
|
199
|
-
}
|
|
190
|
+
}
|
|
200
191
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
var label = ref.label;
|
|
205
|
-
var anchor = options.labels.position;
|
|
192
|
+
reflowLabel(box) {
|
|
193
|
+
const { options, label } = this;
|
|
194
|
+
let anchor = options.labels.position;
|
|
206
195
|
|
|
207
196
|
if (label) {
|
|
208
197
|
anchor = anchor === ABOVE ? TOP : anchor;
|
|
@@ -212,15 +201,15 @@ var LinePoint = (function (ChartElement) {
|
|
|
212
201
|
label.box.alignTo(this.markerBox(), anchor);
|
|
213
202
|
label.reflow(label.box);
|
|
214
203
|
}
|
|
215
|
-
}
|
|
204
|
+
}
|
|
216
205
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
206
|
+
createHighlight() {
|
|
207
|
+
const markers = this.options.highlight.markers;
|
|
208
|
+
const defaultColor = this.markerBorder().color;
|
|
209
|
+
const options = this.options.markers;
|
|
210
|
+
const size = options.size + (options.border.width || 0) + (markers.border.width || 0);
|
|
222
211
|
|
|
223
|
-
|
|
212
|
+
const shadow = new ShapeElement({
|
|
224
213
|
type: options.type,
|
|
225
214
|
width: size,
|
|
226
215
|
height: size,
|
|
@@ -236,23 +225,23 @@ var LinePoint = (function (ChartElement) {
|
|
|
236
225
|
shadow.reflow(this._childBox);
|
|
237
226
|
|
|
238
227
|
return shadow.getElement();
|
|
239
|
-
}
|
|
228
|
+
}
|
|
240
229
|
|
|
241
|
-
|
|
230
|
+
highlightVisual() {
|
|
242
231
|
return (this.marker || {}).visual;
|
|
243
|
-
}
|
|
232
|
+
}
|
|
244
233
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
234
|
+
highlightVisualArgs() {
|
|
235
|
+
const marker = this.marker;
|
|
236
|
+
let visual, rect;
|
|
248
237
|
|
|
249
238
|
if (marker) {
|
|
250
239
|
rect = marker.paddingBox.toRect();
|
|
251
240
|
visual = marker.visual;
|
|
252
241
|
} else {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
242
|
+
const size = this.options.markers.size;
|
|
243
|
+
const halfSize = size / 2;
|
|
244
|
+
const center = this.box.center();
|
|
256
245
|
rect = new geom.Rect([ center.x - halfSize, center.y - halfSize ], [ size, size ]);
|
|
257
246
|
}
|
|
258
247
|
|
|
@@ -261,14 +250,14 @@ var LinePoint = (function (ChartElement) {
|
|
|
261
250
|
rect: rect,
|
|
262
251
|
visual: visual
|
|
263
252
|
};
|
|
264
|
-
}
|
|
253
|
+
}
|
|
265
254
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
255
|
+
createFocusHighlight() {
|
|
256
|
+
const markerOptions = this.options.markers;
|
|
257
|
+
const highlightOptions = this.options.focusHighlight;
|
|
258
|
+
const size = markerOptions.size + (markerOptions.border.width || 0);
|
|
270
259
|
|
|
271
|
-
|
|
260
|
+
const highlight = new ShapeElement({
|
|
272
261
|
type: markerOptions.type,
|
|
273
262
|
width: size,
|
|
274
263
|
height: size,
|
|
@@ -283,17 +272,17 @@ var LinePoint = (function (ChartElement) {
|
|
|
283
272
|
highlight.reflow(this._childBox);
|
|
284
273
|
|
|
285
274
|
return highlight.getElement();
|
|
286
|
-
}
|
|
275
|
+
}
|
|
287
276
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
277
|
+
tooltipAnchor() {
|
|
278
|
+
const markerBox = this.markerBox();
|
|
279
|
+
const clipBox = this.owner.pane.clipBox();
|
|
280
|
+
const showTooltip = !clipBox || clipBox.overlaps(markerBox);
|
|
292
281
|
|
|
293
282
|
if (showTooltip) {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
283
|
+
const x = markerBox.x2 + TOOLTIP_OFFSET;
|
|
284
|
+
const horizontalAlign = LEFT;
|
|
285
|
+
let y, verticalAlign;
|
|
297
286
|
|
|
298
287
|
if (this.aboveAxis) {
|
|
299
288
|
y = markerBox.y1;
|
|
@@ -311,18 +300,18 @@ var LinePoint = (function (ChartElement) {
|
|
|
311
300
|
}
|
|
312
301
|
};
|
|
313
302
|
}
|
|
314
|
-
}
|
|
303
|
+
}
|
|
315
304
|
|
|
316
|
-
|
|
305
|
+
formatValue(format) {
|
|
317
306
|
return this.owner.formatPointValue(this, format);
|
|
318
|
-
}
|
|
307
|
+
}
|
|
319
308
|
|
|
320
|
-
|
|
321
|
-
|
|
309
|
+
overlapsBox(box) {
|
|
310
|
+
const markerBox = this.markerBox();
|
|
322
311
|
return markerBox.overlaps(box);
|
|
323
|
-
}
|
|
312
|
+
}
|
|
324
313
|
|
|
325
|
-
|
|
314
|
+
unclipElements() {
|
|
326
315
|
if (this.label) {
|
|
327
316
|
this.label.options.noclip = true;
|
|
328
317
|
}
|
|
@@ -330,9 +319,9 @@ var LinePoint = (function (ChartElement) {
|
|
|
330
319
|
if (this.note) {
|
|
331
320
|
this.note.options.noclip = true;
|
|
332
321
|
}
|
|
333
|
-
}
|
|
322
|
+
}
|
|
334
323
|
|
|
335
|
-
|
|
324
|
+
pointData() {
|
|
336
325
|
return {
|
|
337
326
|
dataItem: this.dataItem,
|
|
338
327
|
category: this.category,
|
|
@@ -341,9 +330,9 @@ var LinePoint = (function (ChartElement) {
|
|
|
341
330
|
stackValue: this.stackValue,
|
|
342
331
|
series: this.series
|
|
343
332
|
};
|
|
344
|
-
}
|
|
333
|
+
}
|
|
345
334
|
|
|
346
|
-
|
|
335
|
+
focusVisual() {
|
|
347
336
|
if (this.marker) {
|
|
348
337
|
if (this.marker.visual) {
|
|
349
338
|
this.marker.visual.options.set("id", this._id);
|
|
@@ -351,9 +340,9 @@ var LinePoint = (function (ChartElement) {
|
|
|
351
340
|
|
|
352
341
|
this.toggleFocusHighlight(true);
|
|
353
342
|
}
|
|
354
|
-
}
|
|
343
|
+
}
|
|
355
344
|
|
|
356
|
-
|
|
345
|
+
clearFocusFromVisual() {
|
|
357
346
|
if (this.marker) {
|
|
358
347
|
if (this.marker.visual) {
|
|
359
348
|
this.marker.visual.options.set("id", "");
|
|
@@ -361,14 +350,12 @@ var LinePoint = (function (ChartElement) {
|
|
|
361
350
|
|
|
362
351
|
this.toggleFocusHighlight(false);
|
|
363
352
|
}
|
|
364
|
-
}
|
|
353
|
+
}
|
|
365
354
|
|
|
366
|
-
|
|
355
|
+
getIndex() {
|
|
367
356
|
return defined(this.categoryIx) ? this.categoryIx : this.pointIx;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
return LinePoint;
|
|
371
|
-
}(ChartElement));
|
|
357
|
+
}
|
|
358
|
+
}
|
|
372
359
|
|
|
373
360
|
LinePoint.prototype.defaults = {
|
|
374
361
|
vertical: true,
|
|
@@ -4,47 +4,41 @@ import { ChartElement } from '../../core';
|
|
|
4
4
|
|
|
5
5
|
import { defined, isFunction, setDefaultOptions } from '../../common';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
class LineSegment extends ChartElement {
|
|
8
|
+
constructor(linePoints, series, seriesIx) {
|
|
9
|
+
super();
|
|
10
10
|
|
|
11
11
|
this.linePoints = linePoints;
|
|
12
12
|
this.series = series;
|
|
13
13
|
this.seriesIx = seriesIx;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
LineSegment.prototype = Object.create( ChartElement && ChartElement.prototype );
|
|
18
|
-
LineSegment.prototype.constructor = LineSegment;
|
|
19
|
-
|
|
20
|
-
LineSegment.prototype.points = function points () {
|
|
16
|
+
points() {
|
|
21
17
|
return this.toGeometryPoints(this.linePoints);
|
|
22
|
-
}
|
|
18
|
+
}
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
for (
|
|
20
|
+
toGeometryPoints(points) {
|
|
21
|
+
const result = [];
|
|
22
|
+
for (let i = 0, length = points.length; i < length; i++) {
|
|
27
23
|
if (points[i] && points[i].visible !== false) {
|
|
28
24
|
result.push(points[i]._childBox.toRect().center());
|
|
29
25
|
}
|
|
30
26
|
}
|
|
31
27
|
|
|
32
28
|
return result;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
LineSegment.prototype.createVisual = function createVisual () {
|
|
36
|
-
var this$1 = this;
|
|
29
|
+
}
|
|
37
30
|
|
|
38
|
-
|
|
31
|
+
createVisual() {
|
|
32
|
+
const customVisual = this.series.visual;
|
|
39
33
|
if (customVisual) {
|
|
40
34
|
this.visual = customVisual({
|
|
41
35
|
points: this.toGeometryPoints(this.linePoints),
|
|
42
36
|
series: this.series,
|
|
43
37
|
sender: this.getSender(),
|
|
44
|
-
createVisual:
|
|
45
|
-
this
|
|
38
|
+
createVisual: () => {
|
|
39
|
+
this.segmentVisual();
|
|
46
40
|
|
|
47
|
-
return this
|
|
41
|
+
return this.visual;
|
|
48
42
|
}
|
|
49
43
|
});
|
|
50
44
|
if (this.visual && !defined(this.visual.options.zIndex)) {
|
|
@@ -53,20 +47,17 @@ var LineSegment = (function (ChartElement) {
|
|
|
53
47
|
} else {
|
|
54
48
|
this.segmentVisual();
|
|
55
49
|
}
|
|
56
|
-
}
|
|
50
|
+
}
|
|
57
51
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var series = ref.series;
|
|
62
|
-
var color = series.color;
|
|
63
|
-
var defaults = series._defaults;
|
|
52
|
+
segmentVisual() {
|
|
53
|
+
const { options, series } = this;
|
|
54
|
+
let { color, _defaults: defaults } = series;
|
|
64
55
|
|
|
65
56
|
if (isFunction(color) && defaults) {
|
|
66
57
|
color = defaults.color;
|
|
67
58
|
}
|
|
68
59
|
|
|
69
|
-
|
|
60
|
+
const line = draw.Path.fromPoints(this.points(), {
|
|
70
61
|
stroke: {
|
|
71
62
|
color: color,
|
|
72
63
|
width: series.width,
|
|
@@ -81,14 +72,12 @@ var LineSegment = (function (ChartElement) {
|
|
|
81
72
|
}
|
|
82
73
|
|
|
83
74
|
this.visual = line;
|
|
84
|
-
}
|
|
75
|
+
}
|
|
85
76
|
|
|
86
|
-
|
|
77
|
+
aliasFor(e, coords) {
|
|
87
78
|
return this.parent.getNearestPoint(coords.x, coords.y, this.seriesIx);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return LineSegment;
|
|
91
|
-
}(ChartElement));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
92
81
|
|
|
93
82
|
setDefaultOptions(LineSegment, {
|
|
94
83
|
closed: false
|
|
@@ -6,27 +6,19 @@ import { CurveProcessor } from '../../core';
|
|
|
6
6
|
|
|
7
7
|
import { isFunction } from '../../common';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if ( LineSegment ) SplineSegment.__proto__ = LineSegment;
|
|
15
|
-
SplineSegment.prototype = Object.create( LineSegment && LineSegment.prototype );
|
|
16
|
-
SplineSegment.prototype.constructor = SplineSegment;
|
|
17
|
-
|
|
18
|
-
SplineSegment.prototype.segmentVisual = function segmentVisual () {
|
|
19
|
-
var series = this.series;
|
|
20
|
-
var defaults = series._defaults;
|
|
21
|
-
var color = series.color;
|
|
9
|
+
class SplineSegment extends LineSegment {
|
|
10
|
+
segmentVisual() {
|
|
11
|
+
const series = this.series;
|
|
12
|
+
const defaults = series._defaults;
|
|
13
|
+
let color = series.color;
|
|
22
14
|
|
|
23
15
|
if (isFunction(color) && defaults) {
|
|
24
16
|
color = defaults.color;
|
|
25
17
|
}
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const curveProcessor = new CurveProcessor(this.options.closed);
|
|
20
|
+
const segments = curveProcessor.process(this.points());
|
|
21
|
+
const curve = new draw.Path({
|
|
30
22
|
stroke: {
|
|
31
23
|
color: color,
|
|
32
24
|
width: series.width,
|
|
@@ -39,9 +31,7 @@ var SplineSegment = (function (LineSegment) {
|
|
|
39
31
|
curve.segments.push.apply(curve.segments, segments);
|
|
40
32
|
|
|
41
33
|
this.visual = curve;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return SplineSegment;
|
|
45
|
-
}(LineSegment));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
46
36
|
|
|
47
37
|
export default SplineSegment;
|
|
@@ -3,27 +3,24 @@ import { geometry as geom } from '@progress/kendo-drawing';
|
|
|
3
3
|
import { last } from '../../common';
|
|
4
4
|
import { X, Y } from '../../common/constants';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const StepLineMixin = {
|
|
7
7
|
calculateStepPoints: function(points) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var justified = ref.justified;
|
|
11
|
-
var vertical = ref.vertical;
|
|
12
|
-
var reverse = ref.reverse;
|
|
8
|
+
const categoryAxis = this.parent.plotArea.seriesCategoryAxis(this.series);
|
|
9
|
+
const { justified, vertical, reverse } = categoryAxis.options;
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
const stepAxis = vertical ? X : Y;
|
|
12
|
+
const axis = vertical ? Y : X;
|
|
13
|
+
const stepDir = reverse ? 2 : 1;
|
|
14
|
+
const dir = stepDir;
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
let previousPoint = toGeometryPoint(points[0], stepAxis, stepDir, axis, dir);
|
|
17
|
+
const result = [ previousPoint ];
|
|
21
18
|
|
|
22
|
-
for (
|
|
23
|
-
|
|
19
|
+
for (let idx = 1; idx < points.length; idx++) {
|
|
20
|
+
const point = toGeometryPoint(points[idx], stepAxis, stepDir, axis, dir);
|
|
24
21
|
|
|
25
22
|
if (previousPoint[stepAxis] !== point[stepAxis]) {
|
|
26
|
-
|
|
23
|
+
const stepPoint = new geom.Point();
|
|
27
24
|
stepPoint[stepAxis] = previousPoint[stepAxis];
|
|
28
25
|
stepPoint[axis] = point[axis];
|
|
29
26
|
|
|
@@ -45,8 +42,8 @@ var StepLineMixin = {
|
|
|
45
42
|
};
|
|
46
43
|
|
|
47
44
|
function toGeometryPoint(lintPoint, stepAxis, stepDir, axis, dir) {
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
const box = lintPoint.box;
|
|
46
|
+
const result = new geom.Point();
|
|
50
47
|
|
|
51
48
|
result[stepAxis] = box[stepAxis + stepDir];
|
|
52
49
|
result[axis] = box[axis + dir];
|
|
@@ -2,21 +2,11 @@ import LineSegment from './line-segment';
|
|
|
2
2
|
import StepLineMixin from './step-line-mixin';
|
|
3
3
|
import { deepExtend } from '../../common';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
LineSegment.apply(this, arguments);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
if ( LineSegment ) StepLineSegment.__proto__ = LineSegment;
|
|
11
|
-
StepLineSegment.prototype = Object.create( LineSegment && LineSegment.prototype );
|
|
12
|
-
StepLineSegment.prototype.constructor = StepLineSegment;
|
|
13
|
-
|
|
14
|
-
StepLineSegment.prototype.points = function points () {
|
|
5
|
+
class StepLineSegment extends LineSegment {
|
|
6
|
+
points() {
|
|
15
7
|
return this.calculateStepPoints(this.linePoints);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return StepLineSegment;
|
|
19
|
-
}(LineSegment));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
20
10
|
|
|
21
11
|
deepExtend(StepLineSegment.prototype, StepLineMixin);
|
|
22
12
|
|
|
@@ -2,20 +2,20 @@ import addAccessibilityAttributesToVisual from "../../core/utils/add-accessibili
|
|
|
2
2
|
import { deepExtend, getAriaTemplate } from "../../common";
|
|
3
3
|
import guid from '../../core/utils/guid';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const AccessibilityAttributesMixin = {
|
|
6
6
|
addAccessibilityAttributesToVisual: function() {
|
|
7
7
|
this._id = this._id || guid();
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const accessibilityOptions = deepExtend({
|
|
10
10
|
ariaLabel: this.getAriaLabelText()
|
|
11
11
|
}, this.options.accessibility);
|
|
12
12
|
|
|
13
13
|
addAccessibilityAttributesToVisual(this.visual, accessibilityOptions);
|
|
14
14
|
},
|
|
15
15
|
|
|
16
|
-
getAriaLabelText
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
getAriaLabelText() {
|
|
17
|
+
const labels = this.options.labels;
|
|
18
|
+
const ariaTemplate = getAriaTemplate(labels);
|
|
19
19
|
|
|
20
20
|
if (ariaTemplate) {
|
|
21
21
|
return ariaTemplate(this.pointData());
|
|
@@ -24,12 +24,12 @@ var AccessibilityAttributesMixin = {
|
|
|
24
24
|
return this.getLabelText(labels);
|
|
25
25
|
},
|
|
26
26
|
|
|
27
|
-
focusVisual
|
|
27
|
+
focusVisual() {
|
|
28
28
|
this.visual.options.set("id", this._id);
|
|
29
29
|
this.toggleFocusHighlight(true);
|
|
30
30
|
},
|
|
31
31
|
|
|
32
|
-
clearFocusFromVisual
|
|
32
|
+
clearFocusFromVisual() {
|
|
33
33
|
this.visual.options.set("id", "");
|
|
34
34
|
this.toggleFocusHighlight(false);
|
|
35
35
|
}
|
|
@@ -4,12 +4,12 @@ import ClipAnimation from '../animations/clip-animation';
|
|
|
4
4
|
import anyHasZIndex from '../utils/any-has-z-index';
|
|
5
5
|
import { defined } from '../../common';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const ClipAnimationMixin = {
|
|
8
8
|
createAnimation: function() {
|
|
9
|
-
|
|
9
|
+
const root = this.getRoot();
|
|
10
10
|
if (root && (root.options || {}).transitions !== false) {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const box = root.size();
|
|
12
|
+
const clipPath = draw.Path.fromRect(box.toRect());
|
|
13
13
|
this.visual.clip(clipPath);
|
|
14
14
|
this.animation = new ClipAnimation(clipPath, {
|
|
15
15
|
box: box
|
|
@@ -21,10 +21,10 @@ var ClipAnimationMixin = {
|
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
_setChildrenAnimation: function(clipPath) {
|
|
24
|
-
|
|
24
|
+
const points = this.animationPoints();
|
|
25
25
|
|
|
26
|
-
for (
|
|
27
|
-
|
|
26
|
+
for (let idx = 0; idx < points.length; idx++) {
|
|
27
|
+
const point = points[idx];
|
|
28
28
|
if (point && point.visual && defined(point.visual.options.zIndex)) {
|
|
29
29
|
point.visual.clip(clipPath);
|
|
30
30
|
}
|