@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
package/dist/es/gauges/gauge.js
CHANGED
|
@@ -4,15 +4,13 @@ import { DEFAULT_WIDTH, DEFAULT_HEIGHT } from './constants';
|
|
|
4
4
|
import { ChartService } from '../services';
|
|
5
5
|
import { unpad } from './utils';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var Surface = drawing.Surface;
|
|
7
|
+
const DEFAULT_MARGIN = 5;
|
|
8
|
+
const { Path, Surface } = drawing;
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
function Gauge(element, userOptions, theme, context) {
|
|
13
|
-
if ( context === void 0 ) context = {};
|
|
10
|
+
class Gauge extends Class {
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
constructor(element, userOptions, theme, context = {}) {
|
|
13
|
+
super();
|
|
16
14
|
|
|
17
15
|
this.element = element;
|
|
18
16
|
this.theme = theme;
|
|
@@ -24,11 +22,7 @@ var Gauge = (function (Class) {
|
|
|
24
22
|
this.redraw();
|
|
25
23
|
}
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
Gauge.prototype = Object.create( Class && Class.prototype );
|
|
29
|
-
Gauge.prototype.constructor = Gauge;
|
|
30
|
-
|
|
31
|
-
Gauge.prototype.destroy = function destroy () {
|
|
25
|
+
destroy() {
|
|
32
26
|
if (this.surface) {
|
|
33
27
|
this.surface.destroy();
|
|
34
28
|
this.surface = null;
|
|
@@ -36,10 +30,10 @@ var Gauge = (function (Class) {
|
|
|
36
30
|
|
|
37
31
|
delete this.element;
|
|
38
32
|
delete this.surfaceElement;
|
|
39
|
-
}
|
|
33
|
+
}
|
|
40
34
|
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
value(pointerValue) {
|
|
36
|
+
const pointer = this.pointers[0];
|
|
43
37
|
|
|
44
38
|
if (arguments.length === 0) {
|
|
45
39
|
return pointer.value();
|
|
@@ -47,25 +41,25 @@ var Gauge = (function (Class) {
|
|
|
47
41
|
|
|
48
42
|
pointer.value(pointerValue);
|
|
49
43
|
this._setValueOptions(pointerValue);
|
|
50
|
-
}
|
|
44
|
+
}
|
|
51
45
|
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
_draw() {
|
|
47
|
+
const surface = this.surface;
|
|
54
48
|
|
|
55
49
|
surface.clear();
|
|
56
50
|
surface.draw(this._visuals);
|
|
57
|
-
}
|
|
51
|
+
}
|
|
58
52
|
|
|
59
|
-
|
|
53
|
+
exportVisual() {
|
|
60
54
|
return this._visuals;
|
|
61
|
-
}
|
|
55
|
+
}
|
|
62
56
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
allValues(values) {
|
|
58
|
+
const pointers = this.pointers;
|
|
59
|
+
const allValues = [];
|
|
66
60
|
|
|
67
61
|
if (arguments.length === 0) {
|
|
68
|
-
for (
|
|
62
|
+
for (let i = 0; i < pointers.length; i++) {
|
|
69
63
|
allValues.push(pointers[i].value());
|
|
70
64
|
}
|
|
71
65
|
|
|
@@ -73,42 +67,42 @@ var Gauge = (function (Class) {
|
|
|
73
67
|
}
|
|
74
68
|
|
|
75
69
|
if (isArray(values)) {
|
|
76
|
-
for (
|
|
77
|
-
if (isNumber(values[i
|
|
78
|
-
pointers[i
|
|
70
|
+
for (let i = 0; i < values.length; i++) {
|
|
71
|
+
if (isNumber(values[i])) {
|
|
72
|
+
pointers[i].value(values[i]);
|
|
79
73
|
}
|
|
80
74
|
}
|
|
81
75
|
}
|
|
82
76
|
|
|
83
77
|
this._setValueOptions(values);
|
|
84
|
-
}
|
|
78
|
+
}
|
|
85
79
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
_setValueOptions(values) {
|
|
81
|
+
const pointers = [].concat(this.options.pointer);
|
|
82
|
+
const arrayValues = [].concat(values);
|
|
89
83
|
|
|
90
|
-
for (
|
|
84
|
+
for (let i = 0; i < arrayValues.length; i++) {
|
|
91
85
|
pointers[i].value = arrayValues[i];
|
|
92
86
|
}
|
|
93
|
-
}
|
|
87
|
+
}
|
|
94
88
|
|
|
95
|
-
|
|
89
|
+
resize() {
|
|
96
90
|
this.noTransitionsRedraw();
|
|
97
|
-
}
|
|
91
|
+
}
|
|
98
92
|
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
noTransitionsRedraw() {
|
|
94
|
+
const transitions = this.options.transitions;
|
|
101
95
|
|
|
102
96
|
this._toggleTransitions(false);
|
|
103
97
|
|
|
104
98
|
this.redraw();
|
|
105
99
|
|
|
106
100
|
this._toggleTransitions(transitions);
|
|
107
|
-
}
|
|
101
|
+
}
|
|
108
102
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
redraw() {
|
|
104
|
+
const size = this._surfaceSize();
|
|
105
|
+
const wrapper = new geo.Rect([ 0, 0 ], [ size.width, size.height ]);
|
|
112
106
|
|
|
113
107
|
this._initSurface();
|
|
114
108
|
|
|
@@ -116,53 +110,53 @@ var Gauge = (function (Class) {
|
|
|
116
110
|
|
|
117
111
|
this._createModel();
|
|
118
112
|
|
|
119
|
-
|
|
113
|
+
const bbox = unpad(wrapper.bbox(), this._gaugeAreaMargin);
|
|
120
114
|
this.reflow(bbox);
|
|
121
|
-
}
|
|
115
|
+
}
|
|
122
116
|
|
|
123
|
-
|
|
117
|
+
setOptions(options, theme) {
|
|
124
118
|
this._originalOptions = deepExtend(this._originalOptions, options);
|
|
125
119
|
this.options = deepExtend({}, this._originalOptions);
|
|
126
120
|
|
|
127
121
|
this._initTheme(theme);
|
|
128
122
|
|
|
129
123
|
this.redraw();
|
|
130
|
-
}
|
|
124
|
+
}
|
|
131
125
|
|
|
132
|
-
|
|
126
|
+
setDirection(rtl) {
|
|
133
127
|
this.contextService.rtl = Boolean(rtl);
|
|
134
128
|
if (this.surface && this.surface.type === 'svg') {
|
|
135
129
|
this.surface.destroy();
|
|
136
130
|
this.surface = null;
|
|
137
131
|
}
|
|
138
|
-
}
|
|
132
|
+
}
|
|
139
133
|
|
|
140
|
-
|
|
134
|
+
setIntlService(intl) {
|
|
141
135
|
this.contextService.intl = intl;
|
|
142
|
-
}
|
|
136
|
+
}
|
|
143
137
|
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
_initTheme(theme) {
|
|
139
|
+
let currentTheme = theme || this.theme || {};
|
|
146
140
|
this.theme = currentTheme;
|
|
147
141
|
|
|
148
142
|
this.options = deepExtend({}, currentTheme, this.options);
|
|
149
|
-
|
|
150
|
-
|
|
143
|
+
const options = this.options;
|
|
144
|
+
const pointer = options.pointer;
|
|
151
145
|
|
|
152
146
|
if (isArray(pointer)) {
|
|
153
|
-
|
|
154
|
-
for (
|
|
147
|
+
const pointers = [];
|
|
148
|
+
for (let i = 0; i < pointer.length; i++) {
|
|
155
149
|
pointers.push(deepExtend({}, currentTheme.pointer, pointer[i]));
|
|
156
150
|
}
|
|
157
151
|
options.pointer = pointers;
|
|
158
152
|
}
|
|
159
|
-
}
|
|
153
|
+
}
|
|
160
154
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
155
|
+
_createGaugeArea() {
|
|
156
|
+
const options = this.options.gaugeArea;
|
|
157
|
+
const size = this.surface.size();
|
|
158
|
+
const border = options.border || {};
|
|
159
|
+
let areaGeometry = new geo.Rect([ 0, 0 ], [ size.width, size.height ]);
|
|
166
160
|
|
|
167
161
|
this._gaugeAreaMargin = options.margin || DEFAULT_MARGIN;
|
|
168
162
|
|
|
@@ -170,7 +164,7 @@ var Gauge = (function (Class) {
|
|
|
170
164
|
areaGeometry = unpad(areaGeometry, border.width);
|
|
171
165
|
}
|
|
172
166
|
|
|
173
|
-
|
|
167
|
+
const gaugeArea = Path.fromRect(areaGeometry, {
|
|
174
168
|
stroke: {
|
|
175
169
|
color: border.width ? border.color : "",
|
|
176
170
|
width: border.width,
|
|
@@ -185,14 +179,12 @@ var Gauge = (function (Class) {
|
|
|
185
179
|
});
|
|
186
180
|
|
|
187
181
|
return gaugeArea;
|
|
188
|
-
}
|
|
182
|
+
}
|
|
189
183
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
var element = this._surfaceElement();
|
|
195
|
-
var size = this._surfaceSize();
|
|
184
|
+
_initSurface() {
|
|
185
|
+
const { options, surface } = this;
|
|
186
|
+
const element = this._surfaceElement();
|
|
187
|
+
const size = this._surfaceSize();
|
|
196
188
|
|
|
197
189
|
elementSize(element, size);
|
|
198
190
|
|
|
@@ -208,37 +200,37 @@ var Gauge = (function (Class) {
|
|
|
208
200
|
this.surface.clear();
|
|
209
201
|
this.surface.resize();
|
|
210
202
|
}
|
|
211
|
-
}
|
|
203
|
+
}
|
|
212
204
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
205
|
+
_surfaceSize() {
|
|
206
|
+
const options = this.options;
|
|
207
|
+
const size = this._getSize();
|
|
216
208
|
|
|
217
209
|
if (options.gaugeArea) {
|
|
218
210
|
deepExtend(size, options.gaugeArea);
|
|
219
211
|
}
|
|
220
212
|
|
|
221
213
|
return size;
|
|
222
|
-
}
|
|
214
|
+
}
|
|
223
215
|
|
|
224
|
-
|
|
216
|
+
_surfaceElement() {
|
|
225
217
|
if (!this.surfaceElement) {
|
|
226
218
|
this.surfaceElement = document.createElement('div');
|
|
227
219
|
this.element.appendChild(this.surfaceElement);
|
|
228
220
|
}
|
|
229
221
|
|
|
230
222
|
return this.surfaceElement;
|
|
231
|
-
}
|
|
223
|
+
}
|
|
232
224
|
|
|
233
|
-
|
|
225
|
+
getSize() {
|
|
234
226
|
return this._getSize();
|
|
235
|
-
}
|
|
227
|
+
}
|
|
236
228
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
229
|
+
_getSize() {
|
|
230
|
+
const element = this.element;
|
|
231
|
+
const defaultSize = this._defaultSize();
|
|
232
|
+
let width = element.offsetWidth;
|
|
233
|
+
let height = element.offsetHeight;
|
|
242
234
|
|
|
243
235
|
if (!width) {
|
|
244
236
|
width = defaultSize.width;
|
|
@@ -249,26 +241,22 @@ var Gauge = (function (Class) {
|
|
|
249
241
|
}
|
|
250
242
|
|
|
251
243
|
return { width: width, height: height };
|
|
252
|
-
}
|
|
244
|
+
}
|
|
253
245
|
|
|
254
|
-
|
|
246
|
+
_defaultSize() {
|
|
255
247
|
return {
|
|
256
248
|
width: DEFAULT_WIDTH,
|
|
257
249
|
height: DEFAULT_HEIGHT
|
|
258
250
|
};
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
Gauge.prototype._toggleTransitions = function _toggleTransitions (value) {
|
|
262
|
-
var this$1 = this;
|
|
251
|
+
}
|
|
263
252
|
|
|
253
|
+
_toggleTransitions(value) {
|
|
264
254
|
this.options.transitions = value;
|
|
265
|
-
for (
|
|
266
|
-
this
|
|
255
|
+
for (let i = 0; i < this.pointers.length; i++) {
|
|
256
|
+
this.pointers[i].options.animation.transitions = value;
|
|
267
257
|
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
return Gauge;
|
|
271
|
-
}(Class));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
272
260
|
|
|
273
261
|
setDefaultOptions(Gauge, {
|
|
274
262
|
plotArea: {},
|
|
@@ -2,22 +2,12 @@ import { geometry, drawing } from '@progress/kendo-drawing';
|
|
|
2
2
|
import { interpolateValue, setDefaultOptions } from '../../common';
|
|
3
3
|
import { ARROW_POINTER, LINEAR_SPEED, LINEAR } from '../constants';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
function ArrowLinearPointerAnimation () {
|
|
7
|
-
superclass.apply(this, arguments);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
if ( superclass ) ArrowLinearPointerAnimation.__proto__ = superclass;
|
|
11
|
-
ArrowLinearPointerAnimation.prototype = Object.create( superclass && superclass.prototype );
|
|
12
|
-
ArrowLinearPointerAnimation.prototype.constructor = ArrowLinearPointerAnimation;
|
|
5
|
+
class ArrowLinearPointerAnimation extends drawing.Animation {
|
|
13
6
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var to = options.to;
|
|
19
|
-
var vertical = options.vertical;
|
|
20
|
-
var axis = vertical ? "x1" : "y1";
|
|
7
|
+
setup() {
|
|
8
|
+
const options = this.options;
|
|
9
|
+
const { margin, from, to, vertical } = options;
|
|
10
|
+
const axis = vertical ? "x1" : "y1";
|
|
21
11
|
|
|
22
12
|
if (options.mirror === vertical) {
|
|
23
13
|
from[axis] -= margin; to[axis] -= margin;
|
|
@@ -25,23 +15,21 @@ var ArrowLinearPointerAnimation = (function (superclass) {
|
|
|
25
15
|
from[axis] += margin; to[axis] += margin;
|
|
26
16
|
}
|
|
27
17
|
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
const fromScale = this.fromScale = new geometry.Point(from.x1, from.y1);
|
|
19
|
+
const toScale = this.toScale = new geometry.Point(to.x1, to.y1);
|
|
30
20
|
|
|
31
21
|
if (options.duration !== 0) {
|
|
32
22
|
options.duration = Math.max((fromScale.distanceTo(toScale) / options.duration) * 1000, 1);
|
|
33
23
|
}
|
|
34
|
-
}
|
|
24
|
+
}
|
|
35
25
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
step(pos) {
|
|
27
|
+
const translateX = interpolateValue(this.fromScale.x, this.toScale.x, pos);
|
|
28
|
+
const translateY = interpolateValue(this.fromScale.y, this.toScale.y, pos);
|
|
39
29
|
|
|
40
30
|
this.element.transform(geometry.transform().translate(translateX, translateY));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return ArrowLinearPointerAnimation;
|
|
44
|
-
}(drawing.Animation));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
45
33
|
|
|
46
34
|
setDefaultOptions(ArrowLinearPointerAnimation, {
|
|
47
35
|
easing: LINEAR,
|
|
@@ -4,29 +4,23 @@ import { ARROW_POINTER } from '../constants';
|
|
|
4
4
|
import LinearPointer from './linear-pointer';
|
|
5
5
|
import ArrowLinearPointerAnimation from './arrow-linear-pointer-animation';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const Point = geo.Point;
|
|
8
|
+
const Path = drawing.Path;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
class ArrowLinearPointer extends LinearPointer {
|
|
11
|
+
constructor(scale, options) {
|
|
12
|
+
super(scale, options);
|
|
13
13
|
|
|
14
14
|
if (!defined(this.options.size)) {
|
|
15
15
|
this.options.size = this.scale.options.majorTicks.size * 0.6;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var ref = this;
|
|
25
|
-
var scale = ref.scale;
|
|
26
|
-
var size = ref.options.size;
|
|
27
|
-
var halfSize = size / 2;
|
|
28
|
-
var sign = (scale.options.mirror ? -1 : 1);
|
|
29
|
-
var shape;
|
|
19
|
+
pointerShape() {
|
|
20
|
+
const { scale, options: { size } } = this;
|
|
21
|
+
const halfSize = size / 2;
|
|
22
|
+
const sign = (scale.options.mirror ? -1 : 1);
|
|
23
|
+
let shape;
|
|
30
24
|
|
|
31
25
|
if (scale.options.vertical) {
|
|
32
26
|
shape = [
|
|
@@ -39,13 +33,11 @@ var ArrowLinearPointer = (function (LinearPointer) {
|
|
|
39
33
|
}
|
|
40
34
|
|
|
41
35
|
return shape;
|
|
42
|
-
}
|
|
36
|
+
}
|
|
43
37
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var options = ref.options;
|
|
48
|
-
var animation = new ArrowLinearPointerAnimation(this.elements, deepExtend(options.animation, {
|
|
38
|
+
repaint() {
|
|
39
|
+
const { scale, options } = this;
|
|
40
|
+
const animation = new ArrowLinearPointerAnimation(this.elements, deepExtend(options.animation, {
|
|
49
41
|
vertical: scale.options.vertical,
|
|
50
42
|
mirror: scale.options.mirror,
|
|
51
43
|
margin: this._margin(options.margin),
|
|
@@ -59,31 +51,27 @@ var ArrowLinearPointer = (function (LinearPointer) {
|
|
|
59
51
|
|
|
60
52
|
animation.setup();
|
|
61
53
|
animation.play();
|
|
62
|
-
}
|
|
54
|
+
}
|
|
63
55
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var elementOptions = this.getElementOptions();
|
|
69
|
-
var shape = this.pointerShape(options.value);
|
|
56
|
+
render() {
|
|
57
|
+
const { scale, options } = this;
|
|
58
|
+
const elementOptions = this.getElementOptions();
|
|
59
|
+
const shape = this.pointerShape(options.value);
|
|
70
60
|
|
|
71
61
|
options.animation.type = ARROW_POINTER;
|
|
72
62
|
|
|
73
|
-
|
|
63
|
+
const elements = new Path({
|
|
74
64
|
stroke: elementOptions.stroke,
|
|
75
65
|
fill: elementOptions.fill
|
|
76
66
|
}).moveTo(shape[0]).lineTo(shape[1]).lineTo(shape[2]).close();
|
|
77
67
|
|
|
78
|
-
|
|
68
|
+
const slot = scale.getSlot(options.value);
|
|
79
69
|
elements.transform(geo.transform().translate(slot.x1, slot.y1));
|
|
80
70
|
|
|
81
71
|
this.elements = elements;
|
|
82
72
|
|
|
83
73
|
return elements;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return ArrowLinearPointer;
|
|
87
|
-
}(LinearPointer));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
88
76
|
|
|
89
77
|
export default ArrowLinearPointer;
|
|
@@ -3,43 +3,34 @@ import { interpolateValue, setDefaultOptions } from '../../common';
|
|
|
3
3
|
import { X, Y } from '../../common/constants';
|
|
4
4
|
import { BAR_POINTER, LINEAR_SPEED, LINEAR } from '../constants';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
function BarLinearPointerAnimation () {
|
|
8
|
-
superclass.apply(this, arguments);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if ( superclass ) BarLinearPointerAnimation.__proto__ = superclass;
|
|
12
|
-
BarLinearPointerAnimation.prototype = Object.create( superclass && superclass.prototype );
|
|
13
|
-
BarLinearPointerAnimation.prototype.constructor = BarLinearPointerAnimation;
|
|
6
|
+
class BarLinearPointerAnimation extends drawing.Animation {
|
|
14
7
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
setup() {
|
|
9
|
+
const options = this.options;
|
|
10
|
+
const axis = this.axis = options.vertical ? Y : X;
|
|
11
|
+
const to = this.to = options.newPoints[0][axis];
|
|
12
|
+
const from = this.from = options.oldPoints[0][axis];
|
|
20
13
|
|
|
21
14
|
if (options.duration !== 0) {
|
|
22
15
|
options.duration = Math.max((Math.abs(to - from) / options.speed) * 1000, 1);
|
|
23
16
|
}
|
|
24
17
|
|
|
25
18
|
this._set(from);
|
|
26
|
-
}
|
|
19
|
+
}
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
step(pos) {
|
|
22
|
+
const value = interpolateValue(this.from, this.to, pos);
|
|
30
23
|
this._set(value);
|
|
31
|
-
}
|
|
24
|
+
}
|
|
32
25
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
_set(value) {
|
|
27
|
+
const setter = "set" + this.axis.toUpperCase();
|
|
28
|
+
const points = this.options.newPoints;
|
|
36
29
|
|
|
37
30
|
points[0][setter](value);
|
|
38
31
|
points[1][setter](value);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return BarLinearPointerAnimation;
|
|
42
|
-
}(drawing.Animation));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
43
34
|
|
|
44
35
|
setDefaultOptions(BarLinearPointerAnimation, {
|
|
45
36
|
easing: LINEAR,
|