@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,113 +10,99 @@ import Box from './box';
|
|
|
10
10
|
import { BLACK } from '../common/constants';
|
|
11
11
|
import { deepExtend, deg, getSpacing, inArray, limitValue, setDefaultOptions } from '../common';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
class PolarAxis extends Axis {
|
|
14
|
+
constructor(options, chartService) {
|
|
15
|
+
super(options, chartService);
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const instanceOptions = this.options;
|
|
18
18
|
|
|
19
19
|
instanceOptions.minorUnit = instanceOptions.minorUnit || instanceOptions.majorUnit / 2;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
PolarAxis.prototype = Object.create( Axis && Axis.prototype );
|
|
24
|
-
PolarAxis.prototype.constructor = PolarAxis;
|
|
25
|
-
|
|
26
|
-
PolarAxis.prototype.getDivisions = function getDivisions (stepValue) {
|
|
22
|
+
getDivisions(stepValue) {
|
|
27
23
|
return NumericAxis.prototype.getDivisions.call(this, stepValue) - 1;
|
|
28
|
-
}
|
|
24
|
+
}
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
reflow(box) {
|
|
31
27
|
this.box = box;
|
|
32
28
|
this.reflowLabels();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
PolarAxis.prototype.reflowLabels = function reflowLabels () {
|
|
36
|
-
var this$1 = this;
|
|
29
|
+
}
|
|
37
30
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var skip = labelOptions.skip || 0;
|
|
43
|
-
var step = labelOptions.step || 1;
|
|
31
|
+
reflowLabels() {
|
|
32
|
+
const { options, labels, options: { labels: labelOptions } } = this;
|
|
33
|
+
const skip = labelOptions.skip || 0;
|
|
34
|
+
const step = labelOptions.step || 1;
|
|
44
35
|
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
const measureBox = new Box();
|
|
37
|
+
const divs = this.intervals(options.majorUnit, skip, step);
|
|
47
38
|
|
|
48
|
-
for (
|
|
39
|
+
for (let i = 0; i < labels.length; i++) {
|
|
49
40
|
labels[i].reflow(measureBox);
|
|
50
|
-
|
|
41
|
+
const labelBox = labels[i].box;
|
|
51
42
|
|
|
52
|
-
labels[i].reflow(this
|
|
43
|
+
labels[i].reflow(this.getSlot(divs[i]).adjacentBox(0, labelBox.width(), labelBox.height()));
|
|
53
44
|
}
|
|
54
|
-
}
|
|
45
|
+
}
|
|
55
46
|
|
|
56
|
-
|
|
47
|
+
lineBox() {
|
|
57
48
|
return this.box;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
PolarAxis.prototype.intervals = function intervals (size, skipOption, stepOption, skipAngles) {
|
|
61
|
-
if ( skipAngles === void 0 ) skipAngles = false;
|
|
49
|
+
}
|
|
62
50
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
intervals(size, skipOption, stepOption, skipAngles = false) {
|
|
52
|
+
const min = this.options.min;
|
|
53
|
+
const divisions = this.getDivisions(size);
|
|
54
|
+
const divs = [];
|
|
55
|
+
const skip = skipOption || 0;
|
|
56
|
+
const step = stepOption || 1;
|
|
68
57
|
|
|
69
|
-
for (
|
|
70
|
-
|
|
58
|
+
for (let i = skip; i < divisions; i += step) {
|
|
59
|
+
const current = (360 + min + i * size) % 360;
|
|
71
60
|
if (!(skipAngles && inArray(current, skipAngles))) {
|
|
72
61
|
divs.push(current);
|
|
73
62
|
}
|
|
74
63
|
}
|
|
75
64
|
|
|
76
65
|
return divs;
|
|
77
|
-
}
|
|
66
|
+
}
|
|
78
67
|
|
|
79
|
-
|
|
68
|
+
majorIntervals() {
|
|
80
69
|
return this.intervals(this.options.majorUnit);
|
|
81
|
-
}
|
|
70
|
+
}
|
|
82
71
|
|
|
83
|
-
|
|
72
|
+
minorIntervals() {
|
|
84
73
|
return this.intervals(this.options.minorUnit);
|
|
85
|
-
}
|
|
74
|
+
}
|
|
86
75
|
|
|
87
|
-
|
|
76
|
+
intervalAngle(i) {
|
|
88
77
|
return (540 - i - this.options.startAngle) % 360;
|
|
89
|
-
}
|
|
78
|
+
}
|
|
90
79
|
|
|
91
|
-
|
|
80
|
+
createLine() {
|
|
92
81
|
return [];
|
|
93
|
-
}
|
|
82
|
+
}
|
|
94
83
|
|
|
95
|
-
|
|
96
|
-
|
|
84
|
+
majorGridLineAngles(altAxis) {
|
|
85
|
+
const majorGridLines = this.options.majorGridLines;
|
|
97
86
|
return this.gridLineAngles(altAxis, this.options.majorUnit, majorGridLines.skip, majorGridLines.step);
|
|
98
|
-
}
|
|
87
|
+
}
|
|
99
88
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
var majorGridLineAngles = skipMajor ? this.intervals(options.majorUnit, majorGridLines.skip, majorGridLines.step) : null;
|
|
89
|
+
minorGridLineAngles(altAxis, skipMajor) {
|
|
90
|
+
const options = this.options;
|
|
91
|
+
const { minorGridLines, majorGridLines } = options;
|
|
92
|
+
const majorGridLineAngles = skipMajor ? this.intervals(options.majorUnit, majorGridLines.skip, majorGridLines.step) : null;
|
|
105
93
|
|
|
106
94
|
return this.gridLineAngles(altAxis, options.minorUnit, minorGridLines.skip, minorGridLines.step, majorGridLineAngles);
|
|
107
|
-
}
|
|
95
|
+
}
|
|
108
96
|
|
|
109
|
-
|
|
97
|
+
plotBandSlot(band) {
|
|
110
98
|
return this.getSlot(band.from, band.to);
|
|
111
|
-
}
|
|
99
|
+
}
|
|
112
100
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
var start = limitValue(a, options.min, options.max);
|
|
119
|
-
var end = limitValue(b || start, start, options.max);
|
|
101
|
+
getSlot(a, b) {
|
|
102
|
+
const { options, box } = this;
|
|
103
|
+
const startAngle = options.startAngle;
|
|
104
|
+
let start = limitValue(a, options.min, options.max);
|
|
105
|
+
let end = limitValue(b || start, start, options.max);
|
|
120
106
|
|
|
121
107
|
if (options.reverse) {
|
|
122
108
|
start *= -1;
|
|
@@ -127,23 +113,21 @@ var PolarAxis = (function (Axis) {
|
|
|
127
113
|
end = (540 - end - startAngle) % 360;
|
|
128
114
|
|
|
129
115
|
if (end < start) {
|
|
130
|
-
|
|
116
|
+
const tmp = start;
|
|
131
117
|
start = end;
|
|
132
118
|
end = tmp;
|
|
133
119
|
}
|
|
134
120
|
|
|
135
121
|
return new Ring(box.center(), 0, box.height() / 2, start, end - start);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
PolarAxis.prototype.slot = function slot (from, to) {
|
|
139
|
-
if ( to === void 0 ) to = from;
|
|
122
|
+
}
|
|
140
123
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
124
|
+
slot(from, to = from) {
|
|
125
|
+
const options = this.options;
|
|
126
|
+
const start = 360 - options.startAngle;
|
|
127
|
+
const slot = this.getSlot(from, to);
|
|
128
|
+
const min = Math.min(from, to);
|
|
129
|
+
const max = Math.max(from, to);
|
|
130
|
+
let startAngle, endAngle;
|
|
147
131
|
|
|
148
132
|
if (options.reverse) {
|
|
149
133
|
startAngle = min;
|
|
@@ -162,15 +146,15 @@ var PolarAxis = (function (Axis) {
|
|
|
162
146
|
radiusX: slot.radius,
|
|
163
147
|
radiusY: slot.radius
|
|
164
148
|
});
|
|
165
|
-
}
|
|
149
|
+
}
|
|
166
150
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
151
|
+
getValue(point) {
|
|
152
|
+
const options = this.options;
|
|
153
|
+
const center = this.box.center();
|
|
154
|
+
const dx = point.x - center.x;
|
|
155
|
+
const dy = point.y - center.y;
|
|
156
|
+
let theta = Math.round(deg(Math.atan2(dy, dx)));
|
|
157
|
+
let start = options.startAngle;
|
|
174
158
|
|
|
175
159
|
if (!options.reverse) {
|
|
176
160
|
theta *= -1;
|
|
@@ -178,17 +162,15 @@ var PolarAxis = (function (Axis) {
|
|
|
178
162
|
}
|
|
179
163
|
|
|
180
164
|
return (theta + start + 360) % 360;
|
|
181
|
-
}
|
|
165
|
+
}
|
|
182
166
|
|
|
183
|
-
|
|
167
|
+
valueRange() {
|
|
184
168
|
return {
|
|
185
169
|
min: 0,
|
|
186
170
|
max: Math.PI * 2
|
|
187
171
|
};
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
return PolarAxis;
|
|
191
|
-
}(Axis));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
192
174
|
|
|
193
175
|
setDefaultOptions(PolarAxis, {
|
|
194
176
|
type: "polar",
|
|
@@ -9,61 +9,47 @@ import Box from './box';
|
|
|
9
9
|
import { COORD_PRECISION, ARC } from '../common/constants';
|
|
10
10
|
import { deepExtend, getSpacing, inArray, limitValue, map, rad, round, setDefaultOptions } from '../common';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
CategoryAxis.apply(this, arguments);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if ( CategoryAxis ) RadarCategoryAxis.__proto__ = CategoryAxis;
|
|
18
|
-
RadarCategoryAxis.prototype = Object.create( CategoryAxis && CategoryAxis.prototype );
|
|
19
|
-
RadarCategoryAxis.prototype.constructor = RadarCategoryAxis;
|
|
20
|
-
|
|
21
|
-
RadarCategoryAxis.prototype.range = function range () {
|
|
12
|
+
class RadarCategoryAxis extends CategoryAxis {
|
|
13
|
+
range() {
|
|
22
14
|
return { min: 0, max: this.options.categories.length };
|
|
23
|
-
}
|
|
15
|
+
}
|
|
24
16
|
|
|
25
|
-
|
|
17
|
+
reflow(box) {
|
|
26
18
|
this.box = box;
|
|
27
19
|
this.reflowLabels();
|
|
28
|
-
}
|
|
20
|
+
}
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
lineBox() {
|
|
31
23
|
return this.box;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
RadarCategoryAxis.prototype.reflowLabels = function reflowLabels () {
|
|
35
|
-
var this$1 = this;
|
|
24
|
+
}
|
|
36
25
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var measureBox = new Box();
|
|
26
|
+
reflowLabels() {
|
|
27
|
+
const { labels, options: { labels: labelOptions } } = this;
|
|
28
|
+
const skip = labelOptions.skip || 0;
|
|
29
|
+
const step = labelOptions.step || 1;
|
|
30
|
+
const measureBox = new Box();
|
|
43
31
|
|
|
44
|
-
for (
|
|
32
|
+
for (let i = 0; i < labels.length; i++) {
|
|
45
33
|
labels[i].reflow(measureBox);
|
|
46
|
-
|
|
34
|
+
const labelBox = labels[i].box;
|
|
47
35
|
|
|
48
|
-
labels[i].reflow(this
|
|
36
|
+
labels[i].reflow(this.getSlot(skip + i * step).adjacentBox(
|
|
49
37
|
0, labelBox.width(), labelBox.height()
|
|
50
38
|
));
|
|
51
39
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
RadarCategoryAxis.prototype.intervals = function intervals (size, skipOption, stepOption, skipAngles) {
|
|
55
|
-
if ( skipAngles === void 0 ) skipAngles = false;
|
|
56
|
-
|
|
57
|
-
var options = this.options;
|
|
58
|
-
var categories = options.categories.length;
|
|
59
|
-
var divCount = categories / size || 1;
|
|
60
|
-
var divAngle = 360 / divCount;
|
|
61
|
-
var skip = skipOption || 0;
|
|
62
|
-
var step = stepOption || 1;
|
|
63
|
-
var divs = [];
|
|
64
|
-
var angle = 0;
|
|
40
|
+
}
|
|
65
41
|
|
|
66
|
-
|
|
42
|
+
intervals(size, skipOption, stepOption, skipAngles = false) {
|
|
43
|
+
const options = this.options;
|
|
44
|
+
const categories = options.categories.length;
|
|
45
|
+
const divCount = categories / size || 1;
|
|
46
|
+
const divAngle = 360 / divCount;
|
|
47
|
+
const skip = skipOption || 0;
|
|
48
|
+
const step = stepOption || 1;
|
|
49
|
+
const divs = [];
|
|
50
|
+
let angle = 0;
|
|
51
|
+
|
|
52
|
+
for (let i = skip; i < divCount; i += step) {
|
|
67
53
|
if (options.reverse) {
|
|
68
54
|
angle = 360 - i * divAngle;
|
|
69
55
|
} else {
|
|
@@ -78,51 +64,47 @@ var RadarCategoryAxis = (function (CategoryAxis) {
|
|
|
78
64
|
}
|
|
79
65
|
|
|
80
66
|
return divs;
|
|
81
|
-
}
|
|
67
|
+
}
|
|
82
68
|
|
|
83
|
-
|
|
69
|
+
majorIntervals() {
|
|
84
70
|
return this.intervals(1);
|
|
85
|
-
}
|
|
71
|
+
}
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
minorIntervals() {
|
|
88
74
|
return this.intervals(0.5);
|
|
89
|
-
}
|
|
75
|
+
}
|
|
90
76
|
|
|
91
|
-
|
|
77
|
+
intervalAngle(interval) {
|
|
92
78
|
return (360 + interval + this.options.startAngle) % 360;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
RadarCategoryAxis.prototype.majorAngles = function majorAngles () {
|
|
96
|
-
var this$1 = this;
|
|
79
|
+
}
|
|
97
80
|
|
|
98
|
-
|
|
99
|
-
|
|
81
|
+
majorAngles() {
|
|
82
|
+
return map(this.majorIntervals(), (interval) => this.intervalAngle(interval));
|
|
83
|
+
}
|
|
100
84
|
|
|
101
|
-
|
|
85
|
+
createLine() {
|
|
102
86
|
return [];
|
|
103
|
-
}
|
|
87
|
+
}
|
|
104
88
|
|
|
105
|
-
|
|
106
|
-
|
|
89
|
+
majorGridLineAngles(altAxis) {
|
|
90
|
+
const majorGridLines = this.options.majorGridLines;
|
|
107
91
|
return this.gridLineAngles(altAxis, 1, majorGridLines.skip, majorGridLines.step);
|
|
108
|
-
}
|
|
92
|
+
}
|
|
109
93
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
var majorGridLines = ref.majorGridLines;
|
|
114
|
-
var majorGridLineAngles = skipMajor ? this.intervals(1, majorGridLines.skip, majorGridLines.step) : null;
|
|
94
|
+
minorGridLineAngles(altAxis, skipMajor) {
|
|
95
|
+
const { minorGridLines, majorGridLines } = this.options;
|
|
96
|
+
const majorGridLineAngles = skipMajor ? this.intervals(1, majorGridLines.skip, majorGridLines.step) : null;
|
|
115
97
|
|
|
116
98
|
return this.gridLineAngles(altAxis, 0.5, minorGridLines.skip, minorGridLines.step, majorGridLineAngles);
|
|
117
|
-
}
|
|
99
|
+
}
|
|
118
100
|
|
|
119
|
-
|
|
101
|
+
radiusCallback(radius, altAxis, skipMajor) {
|
|
120
102
|
if (altAxis.options.type !== ARC) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
103
|
+
const minorAngle = rad(360 / (this.options.categories.length * 2));
|
|
104
|
+
const minorRadius = Math.cos(minorAngle) * radius;
|
|
105
|
+
const majorAngles = this.majorAngles();
|
|
124
106
|
|
|
125
|
-
|
|
107
|
+
const radiusCallback = function(angle) {
|
|
126
108
|
if (!skipMajor && inArray(angle, majorAngles)) {
|
|
127
109
|
return radius;
|
|
128
110
|
}
|
|
@@ -131,29 +113,27 @@ var RadarCategoryAxis = (function (CategoryAxis) {
|
|
|
131
113
|
};
|
|
132
114
|
return radiusCallback;
|
|
133
115
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
RadarCategoryAxis.prototype.createPlotBands = function createPlotBands () {
|
|
137
|
-
var this$1 = this;
|
|
116
|
+
}
|
|
138
117
|
|
|
139
|
-
|
|
118
|
+
createPlotBands() {
|
|
119
|
+
const plotBands = this.options.plotBands || [];
|
|
140
120
|
|
|
141
|
-
|
|
121
|
+
const group = this._plotbandGroup = new draw.Group({
|
|
142
122
|
zIndex: -1
|
|
143
123
|
});
|
|
144
124
|
|
|
145
|
-
for (
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
125
|
+
for (let i = 0; i < plotBands.length; i++) {
|
|
126
|
+
const band = plotBands[i];
|
|
127
|
+
const slot = this.plotBandSlot(band);
|
|
128
|
+
const singleSlot = this.getSlot(band.from);
|
|
149
129
|
|
|
150
|
-
|
|
130
|
+
const head = band.from - Math.floor(band.from);
|
|
151
131
|
slot.startAngle += head * singleSlot.angle;
|
|
152
132
|
|
|
153
|
-
|
|
133
|
+
const tail = Math.ceil(band.to) - band.to;
|
|
154
134
|
slot.angle -= (tail + head) * singleSlot.angle;
|
|
155
135
|
|
|
156
|
-
|
|
136
|
+
const ring = ShapeBuilder.current.createRing(slot, {
|
|
157
137
|
fill: {
|
|
158
138
|
color: band.color,
|
|
159
139
|
opacity: band.opacity
|
|
@@ -166,27 +146,27 @@ var RadarCategoryAxis = (function (CategoryAxis) {
|
|
|
166
146
|
}
|
|
167
147
|
|
|
168
148
|
this.appendVisual(group);
|
|
169
|
-
}
|
|
149
|
+
}
|
|
170
150
|
|
|
171
|
-
|
|
151
|
+
plotBandSlot(band) {
|
|
172
152
|
return this.getSlot(band.from, band.to - 1);
|
|
173
|
-
}
|
|
153
|
+
}
|
|
174
154
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
155
|
+
getSlot(from, to) {
|
|
156
|
+
const options = this.options;
|
|
157
|
+
const justified = options.justified;
|
|
158
|
+
const box = this.box;
|
|
159
|
+
const divs = this.majorAngles();
|
|
160
|
+
const totalDivs = divs.length;
|
|
161
|
+
const slotAngle = 360 / totalDivs;
|
|
162
|
+
let fromValue = from;
|
|
183
163
|
|
|
184
164
|
if (options.reverse && !justified) {
|
|
185
165
|
fromValue = (fromValue + 1) % totalDivs;
|
|
186
166
|
}
|
|
187
167
|
|
|
188
168
|
fromValue = limitValue(Math.floor(fromValue), 0, totalDivs - 1);
|
|
189
|
-
|
|
169
|
+
let slotStart = divs[fromValue];
|
|
190
170
|
|
|
191
171
|
if (justified) {
|
|
192
172
|
slotStart = slotStart - slotAngle / 2;
|
|
@@ -196,17 +176,17 @@ var RadarCategoryAxis = (function (CategoryAxis) {
|
|
|
196
176
|
}
|
|
197
177
|
}
|
|
198
178
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
179
|
+
const toValue = limitValue(Math.ceil(to || fromValue), fromValue, totalDivs - 1);
|
|
180
|
+
const slots = toValue - fromValue + 1;
|
|
181
|
+
const angle = slotAngle * slots;
|
|
202
182
|
|
|
203
183
|
return new Ring(box.center(), 0, box.height() / 2, slotStart, angle);
|
|
204
|
-
}
|
|
184
|
+
}
|
|
205
185
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
186
|
+
slot(from, to) {
|
|
187
|
+
const slot = this.getSlot(from, to);
|
|
188
|
+
const startAngle = slot.startAngle + 180;
|
|
189
|
+
const endAngle = startAngle + slot.angle;
|
|
210
190
|
|
|
211
191
|
return new geom.Arc([ slot.center.x, slot.center.y ], {
|
|
212
192
|
startAngle: startAngle,
|
|
@@ -214,16 +194,14 @@ var RadarCategoryAxis = (function (CategoryAxis) {
|
|
|
214
194
|
radiusX: slot.radius,
|
|
215
195
|
radiusY: slot.radius
|
|
216
196
|
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
RadarCategoryAxis.prototype.pointCategoryIndex = function pointCategoryIndex (point) {
|
|
220
|
-
var this$1 = this;
|
|
197
|
+
}
|
|
221
198
|
|
|
222
|
-
|
|
223
|
-
|
|
199
|
+
pointCategoryIndex(point) {
|
|
200
|
+
const length = this.options.categories.length;
|
|
201
|
+
let index = null;
|
|
224
202
|
|
|
225
|
-
for (
|
|
226
|
-
|
|
203
|
+
for (let i = 0; i < length; i++) {
|
|
204
|
+
const slot = this.getSlot(i);
|
|
227
205
|
if (slot.containsPoint(point)) {
|
|
228
206
|
index = i;
|
|
229
207
|
break;
|
|
@@ -231,10 +209,8 @@ var RadarCategoryAxis = (function (CategoryAxis) {
|
|
|
231
209
|
}
|
|
232
210
|
|
|
233
211
|
return index;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
return RadarCategoryAxis;
|
|
237
|
-
}(CategoryAxis));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
238
214
|
|
|
239
215
|
setDefaultOptions(RadarCategoryAxis, {
|
|
240
216
|
startAngle: 90,
|
|
@@ -3,41 +3,31 @@ import RadarNumericAxisMixin from './mixins/radar-numeric-axis-mixin';
|
|
|
3
3
|
|
|
4
4
|
import { deepExtend } from '../common';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if ( LogarithmicAxis ) RadarLogarithmicAxis.__proto__ = LogarithmicAxis;
|
|
12
|
-
RadarLogarithmicAxis.prototype = Object.create( LogarithmicAxis && LogarithmicAxis.prototype );
|
|
13
|
-
RadarLogarithmicAxis.prototype.constructor = RadarLogarithmicAxis;
|
|
14
|
-
|
|
15
|
-
RadarLogarithmicAxis.prototype.radarMajorGridLinePositions = function radarMajorGridLinePositions () {
|
|
16
|
-
var positions = [];
|
|
6
|
+
class RadarLogarithmicAxis extends LogarithmicAxis {
|
|
7
|
+
radarMajorGridLinePositions() {
|
|
8
|
+
const positions = [];
|
|
17
9
|
|
|
18
10
|
this.traverseMajorTicksPositions(function(position) {
|
|
19
11
|
positions.push(position);
|
|
20
12
|
}, this.options.majorGridLines);
|
|
21
13
|
|
|
22
14
|
return positions;
|
|
23
|
-
}
|
|
15
|
+
}
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
radarMinorGridLinePositions() {
|
|
18
|
+
const positions = [];
|
|
27
19
|
|
|
28
20
|
this.traverseMinorTicksPositions(function(position) {
|
|
29
21
|
positions.push(position);
|
|
30
22
|
}, this.options.minorGridLines);
|
|
31
23
|
|
|
32
24
|
return positions;
|
|
33
|
-
}
|
|
25
|
+
}
|
|
34
26
|
|
|
35
|
-
|
|
27
|
+
axisType() {
|
|
36
28
|
return LogarithmicAxis;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return RadarLogarithmicAxis;
|
|
40
|
-
}(LogarithmicAxis));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
41
31
|
|
|
42
32
|
deepExtend(RadarLogarithmicAxis.prototype, RadarNumericAxisMixin);
|
|
43
33
|
|
|
@@ -3,35 +3,25 @@ import RadarNumericAxisMixin from './mixins/radar-numeric-axis-mixin';
|
|
|
3
3
|
|
|
4
4
|
import { deepExtend } from '../common';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
NumericAxis.apply(this, arguments);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if ( NumericAxis ) RadarNumericAxis.__proto__ = NumericAxis;
|
|
12
|
-
RadarNumericAxis.prototype = Object.create( NumericAxis && NumericAxis.prototype );
|
|
13
|
-
RadarNumericAxis.prototype.constructor = RadarNumericAxis;
|
|
14
|
-
|
|
15
|
-
RadarNumericAxis.prototype.radarMajorGridLinePositions = function radarMajorGridLinePositions () {
|
|
6
|
+
class RadarNumericAxis extends NumericAxis {
|
|
7
|
+
radarMajorGridLinePositions() {
|
|
16
8
|
return this.getTickPositions(this.options.majorUnit);
|
|
17
|
-
}
|
|
9
|
+
}
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
radarMinorGridLinePositions() {
|
|
12
|
+
const options = this.options;
|
|
13
|
+
let minorSkipStep = 0;
|
|
22
14
|
|
|
23
15
|
if (options.majorGridLines.visible) {
|
|
24
16
|
minorSkipStep = options.majorUnit;
|
|
25
17
|
}
|
|
26
18
|
return this.getTickPositions(options.minorUnit, minorSkipStep);
|
|
27
|
-
}
|
|
19
|
+
}
|
|
28
20
|
|
|
29
|
-
|
|
21
|
+
axisType() {
|
|
30
22
|
return NumericAxis;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return RadarNumericAxis;
|
|
34
|
-
}(NumericAxis));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
35
25
|
|
|
36
26
|
deepExtend(RadarNumericAxis.prototype, RadarNumericAxisMixin);
|
|
37
27
|
|