@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.
Files changed (363) hide show
  1. package/dist/cdn/js/kendo-charts.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/barcode/barcode-validator.js +10 -12
  4. package/dist/es/barcode/barcode.js +84 -96
  5. package/dist/es/barcode/encodings/code11.js +41 -57
  6. package/dist/es/barcode/encodings/code128.js +222 -354
  7. package/dist/es/barcode/encodings/code39-extended.js +20 -34
  8. package/dist/es/barcode/encodings/code39.js +49 -75
  9. package/dist/es/barcode/encodings/code93-extended.js +12 -24
  10. package/dist/es/barcode/encodings/code93.js +52 -70
  11. package/dist/es/barcode/encodings/ean13.js +28 -42
  12. package/dist/es/barcode/encodings/ean8.js +8 -18
  13. package/dist/es/barcode/encodings/encoding.js +18 -24
  14. package/dist/es/barcode/encodings/main.js +13 -10
  15. package/dist/es/barcode/encodings/msi.js +56 -112
  16. package/dist/es/barcode/encodings/postnet.js +31 -45
  17. package/dist/es/barcode/surface-size.js +2 -2
  18. package/dist/es/chart/aggregates/aggregates.js +23 -23
  19. package/dist/es/chart/aggregates/default-aggregates.js +10 -18
  20. package/dist/es/chart/aggregates/series-aggregator.js +42 -54
  21. package/dist/es/chart/animations/bar-chart-animation.js +15 -26
  22. package/dist/es/chart/animations/bubble-animation.js +7 -17
  23. package/dist/es/chart/animations/clip-animation.js +13 -23
  24. package/dist/es/chart/animations/fade-in-animation.js +6 -16
  25. package/dist/es/chart/animations/pie-animation.js +6 -16
  26. package/dist/es/chart/api-elements/chart-axis.js +14 -22
  27. package/dist/es/chart/api-elements/chart-pane.js +10 -8
  28. package/dist/es/chart/api-elements/chart-plotarea.js +4 -10
  29. package/dist/es/chart/api-elements/find-axis-by-name.js +1 -1
  30. package/dist/es/chart/area-chart/area-chart.js +46 -60
  31. package/dist/es/chart/area-chart/area-segment.js +46 -52
  32. package/dist/es/chart/area-chart/spline-area-segment.js +12 -21
  33. package/dist/es/chart/area-chart/step-area-segment.js +6 -15
  34. package/dist/es/chart/axis-group-range-tracker.js +14 -20
  35. package/dist/es/chart/bar-chart/bar-chart.js +65 -80
  36. package/dist/es/chart/bar-chart/bar-label.js +25 -32
  37. package/dist/es/chart/bar-chart/bar.js +76 -91
  38. package/dist/es/chart/box-plot-chart/box-plot-chart.js +33 -48
  39. package/dist/es/chart/box-plot-chart/box-plot.js +55 -68
  40. package/dist/es/chart/box-plot-chart/vertical-box-plot.js +13 -23
  41. package/dist/es/chart/bubble-chart/bubble-chart.js +51 -64
  42. package/dist/es/chart/bubble-chart/bubble.js +21 -27
  43. package/dist/es/chart/bullet-chart/bullet-chart.js +45 -57
  44. package/dist/es/chart/bullet-chart/bullet.js +48 -57
  45. package/dist/es/chart/bullet-chart/target.js +1 -11
  46. package/dist/es/chart/candlestick-chart/candlestick-chart.js +41 -55
  47. package/dist/es/chart/candlestick-chart/candlestick.js +60 -69
  48. package/dist/es/chart/categorical-chart.js +178 -206
  49. package/dist/es/chart/chart-container.js +30 -39
  50. package/dist/es/chart/chart.js +641 -701
  51. package/dist/es/chart/constants.js +103 -103
  52. package/dist/es/chart/crosshair/crosshair-tooltip.js +22 -34
  53. package/dist/es/chart/crosshair/crosshair.js +39 -47
  54. package/dist/es/chart/donut-chart/donut-chart.js +36 -48
  55. package/dist/es/chart/donut-chart/donut-segment.js +12 -24
  56. package/dist/es/chart/error-bars/categorical-error-bar.js +5 -15
  57. package/dist/es/chart/error-bars/error-bar-base.js +37 -49
  58. package/dist/es/chart/error-bars/error-range-calculator.js +46 -56
  59. package/dist/es/chart/error-bars/scatter-error-bar.js +6 -16
  60. package/dist/es/chart/funnel-chart/funnel-chart.js +86 -103
  61. package/dist/es/chart/funnel-chart/funnel-segment.js +46 -54
  62. package/dist/es/chart/funnel-chart/pyramid-chart.js +5 -11
  63. package/dist/es/chart/heatmap-chart/color-scale.js +7 -9
  64. package/dist/es/chart/heatmap-chart/heatmap-chart.js +87 -110
  65. package/dist/es/chart/heatmap-chart/heatmap-point.js +72 -78
  66. package/dist/es/chart/highlight.js +26 -36
  67. package/dist/es/chart/layout/cluster-layout.js +16 -25
  68. package/dist/es/chart/layout/radar-cluster-layout.js +15 -24
  69. package/dist/es/chart/layout/radar-stack-layout.js +10 -22
  70. package/dist/es/chart/layout/stack-wrap.js +12 -24
  71. package/dist/es/chart/layout/utils.js +2 -2
  72. package/dist/es/chart/legend/legend-item-line-area.js +8 -19
  73. package/dist/es/chart/legend/legend-item-line.js +21 -31
  74. package/dist/es/chart/legend/legend-item-marker.js +18 -28
  75. package/dist/es/chart/legend/legend-item-square.js +8 -18
  76. package/dist/es/chart/legend/legend-item.js +91 -105
  77. package/dist/es/chart/legend/legend-layout.js +18 -25
  78. package/dist/es/chart/legend/legend.js +68 -92
  79. package/dist/es/chart/line-chart/line-chart.js +35 -48
  80. package/dist/es/chart/line-chart/line-point.js +90 -103
  81. package/dist/es/chart/line-chart/line-segment.js +23 -34
  82. package/dist/es/chart/line-chart/spline-segment.js +10 -20
  83. package/dist/es/chart/line-chart/step-line-mixin.js +14 -17
  84. package/dist/es/chart/line-chart/step-line-segment.js +4 -14
  85. package/dist/es/chart/mixins/accessibility-attributes-mixin.js +7 -7
  86. package/dist/es/chart/mixins/clip-animation-mixin.js +7 -7
  87. package/dist/es/chart/mixins/line-chart-mixin.js +27 -31
  88. package/dist/es/chart/mixins/note-mixin.js +3 -3
  89. package/dist/es/chart/mixins/pie-chart-mixin.js +9 -9
  90. package/dist/es/chart/mixins/plotarea-events-mixin.js +1 -1
  91. package/dist/es/chart/mixins/point-events-mixin.js +1 -1
  92. package/dist/es/chart/ohlc-chart/ohlc-chart.js +4 -14
  93. package/dist/es/chart/ohlc-chart/ohlc-point.js +15 -28
  94. package/dist/es/chart/pan-and-zoom/accept-key.js +3 -3
  95. package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +25 -33
  96. package/dist/es/chart/pan-and-zoom/pannable.js +29 -37
  97. package/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js +3 -3
  98. package/dist/es/chart/pan-and-zoom/zoom-selection.js +61 -70
  99. package/dist/es/chart/pane.js +71 -79
  100. package/dist/es/chart/pie-chart/pie-chart.js +153 -183
  101. package/dist/es/chart/pie-chart/pie-segment.js +82 -98
  102. package/dist/es/chart/plotarea/categorical-plotarea.js +285 -318
  103. package/dist/es/chart/plotarea/donut-plotarea.js +12 -22
  104. package/dist/es/chart/plotarea/funnel-plotarea.js +17 -27
  105. package/dist/es/chart/plotarea/heatmap-plotarea.js +139 -167
  106. package/dist/es/chart/plotarea/pie-plotarea.js +15 -25
  107. package/dist/es/chart/plotarea/plotarea-base.js +423 -462
  108. package/dist/es/chart/plotarea/plotarea-factory.js +15 -20
  109. package/dist/es/chart/plotarea/polar-plotarea-base.js +37 -51
  110. package/dist/es/chart/plotarea/polar-plotarea.js +39 -49
  111. package/dist/es/chart/plotarea/radar-plotarea.js +55 -65
  112. package/dist/es/chart/plotarea/xy-plotarea.js +111 -128
  113. package/dist/es/chart/polar-area-chart/polar-area-chart.js +22 -36
  114. package/dist/es/chart/polar-area-chart/polar-area-segment.js +7 -17
  115. package/dist/es/chart/polar-area-chart/spline-polar-area-segment.js +15 -25
  116. package/dist/es/chart/polar-line-chart/polar-line-chart.js +2 -11
  117. package/dist/es/chart/polar-scatter-chart/polar-scatter-chart.js +6 -16
  118. package/dist/es/chart/radar-area-chart/radar-area-chart.js +11 -21
  119. package/dist/es/chart/radar-area-chart/radar-area-segment.js +3 -13
  120. package/dist/es/chart/radar-area-chart/spline-radar-area-segment.js +3 -13
  121. package/dist/es/chart/radar-bar-chart/radar-bar-chart.js +19 -29
  122. package/dist/es/chart/radar-bar-chart/radar-segment.js +6 -12
  123. package/dist/es/chart/radar-line-chart/radar-line-chart.js +26 -35
  124. package/dist/es/chart/range-area-chart/range-area-chart.js +46 -58
  125. package/dist/es/chart/range-area-chart/range-area-point.js +55 -66
  126. package/dist/es/chart/range-area-chart/range-area-segment.js +19 -28
  127. package/dist/es/chart/range-area-chart/range-line-point.js +4 -14
  128. package/dist/es/chart/range-area-chart/spline-range-area-segment.js +11 -18
  129. package/dist/es/chart/range-area-chart/step-range-area-segment.js +7 -16
  130. package/dist/es/chart/range-bar-chart/range-bar-chart.js +18 -29
  131. package/dist/es/chart/range-bar-chart/range-bar.js +10 -23
  132. package/dist/es/chart/register-charts.js +20 -16
  133. package/dist/es/chart/scatter-charts/scatter-chart.js +100 -122
  134. package/dist/es/chart/scatter-charts/scatter-line-chart.js +15 -25
  135. package/dist/es/chart/selection.js +176 -201
  136. package/dist/es/chart/series-binder.js +55 -66
  137. package/dist/es/chart/theme/base-theme.js +75 -79
  138. package/dist/es/chart/theme/load-theme.js +52 -52
  139. package/dist/es/chart/tooltip/base-tooltip.js +17 -24
  140. package/dist/es/chart/tooltip/shared-tooltip.js +25 -31
  141. package/dist/es/chart/tooltip/tooltip.js +10 -20
  142. package/dist/es/chart/trendlines/calculate-moving-average.js +11 -13
  143. package/dist/es/chart/trendlines/calculate-polynomial.js +24 -26
  144. package/dist/es/chart/trendlines/calculate-slope.js +12 -14
  145. package/dist/es/chart/trendlines/check-all-positive.js +2 -5
  146. package/dist/es/chart/trendlines/exponential-trendline.js +15 -24
  147. package/dist/es/chart/trendlines/get-scatter-trendline-data.js +6 -7
  148. package/dist/es/chart/trendlines/get-trendline-data.js +6 -6
  149. package/dist/es/chart/trendlines/linear-trendline.js +12 -21
  150. package/dist/es/chart/trendlines/logarithmic-trendline.js +14 -23
  151. package/dist/es/chart/trendlines/moving-average.js +15 -26
  152. package/dist/es/chart/trendlines/polynomial-trendline.js +13 -21
  153. package/dist/es/chart/trendlines/power-trendline.js +15 -24
  154. package/dist/es/chart/trendlines/scatter-exponential-trendline.js +15 -24
  155. package/dist/es/chart/trendlines/scatter-linear-trendline.js +10 -16
  156. package/dist/es/chart/trendlines/scatter-logarithmic-trendline.js +17 -27
  157. package/dist/es/chart/trendlines/scatter-moving-average.js +7 -10
  158. package/dist/es/chart/trendlines/scatter-polynomial-trendline.js +11 -16
  159. package/dist/es/chart/trendlines/scatter-power-trendline.js +15 -22
  160. package/dist/es/chart/trendlines/scatter-trendline-registry.js +1 -1
  161. package/dist/es/chart/trendlines/scatter-value-getter.js +2 -5
  162. package/dist/es/chart/trendlines/trendline-factory.js +1 -1
  163. package/dist/es/chart/trendlines/trendline-registry.js +1 -1
  164. package/dist/es/chart/trendlines/x-value-limits.js +6 -8
  165. package/dist/es/chart/utils/any-has-z-index.js +1 -1
  166. package/dist/es/chart/utils/bind-segments.js +8 -8
  167. package/dist/es/chart/utils/categories-count.js +3 -3
  168. package/dist/es/chart/utils/count-numbers.js +4 -4
  169. package/dist/es/chart/utils/create-out-of-range-points.js +13 -22
  170. package/dist/es/chart/utils/eval-options.js +7 -10
  171. package/dist/es/chart/utils/filter-series-by-type.js +4 -4
  172. package/dist/es/chart/utils/get-field.js +1 -1
  173. package/dist/es/chart/utils/has-gradient-overlay.js +1 -1
  174. package/dist/es/chart/utils/is-date-axis.js +2 -2
  175. package/dist/es/chart/utils/parse-date-category.js +2 -2
  176. package/dist/es/chart/utils/segment-visible.js +2 -2
  177. package/dist/es/chart/waterfall-chart/waterfall-chart.js +41 -55
  178. package/dist/es/chart/waterfall-chart/waterfall-segment.js +16 -24
  179. package/dist/es/chart-wizard/get-wizard-data-from-data-rows.js +5 -6
  180. package/dist/es/chart-wizard/messages.js +1 -1
  181. package/dist/es/chart-wizard/state.js +145 -137
  182. package/dist/es/chart-wizard.js +12 -12
  183. package/dist/es/common/add-class.js +3 -3
  184. package/dist/es/common/align-path-to-pixel.js +2 -2
  185. package/dist/es/common/auto-text-color.js +1 -1
  186. package/dist/es/common/constants.js +53 -53
  187. package/dist/es/common/create-hash-set.js +59 -65
  188. package/dist/es/common/cycleDown.js +1 -1
  189. package/dist/es/common/deep-extend.js +10 -12
  190. package/dist/es/common/element-scale.js +9 -9
  191. package/dist/es/common/element-styles.js +8 -8
  192. package/dist/es/common/event-map.js +4 -4
  193. package/dist/es/common/event-utils.js +13 -13
  194. package/dist/es/common/find.js +2 -2
  195. package/dist/es/common/font-loader.js +42 -44
  196. package/dist/es/common/get-aria-template.js +2 -4
  197. package/dist/es/common/get-spacing.js +2 -4
  198. package/dist/es/common/get-supported-features.js +7 -7
  199. package/dist/es/common/get-template.js +2 -4
  200. package/dist/es/common/getter.js +5 -5
  201. package/dist/es/common/grep.js +3 -3
  202. package/dist/es/common/has-classes.js +2 -2
  203. package/dist/es/common/hash-map.js +11 -11
  204. package/dist/es/common/instance-observer.js +28 -33
  205. package/dist/es/common/keys.js +1 -1
  206. package/dist/es/common/map.js +4 -4
  207. package/dist/es/common/matrix.js +142 -150
  208. package/dist/es/common/mousewheel-delta.js +2 -2
  209. package/dist/es/common/observable.js +40 -52
  210. package/dist/es/common/remove-class.js +1 -1
  211. package/dist/es/common/render-icon.js +50 -60
  212. package/dist/es/common/set-default-options.js +1 -1
  213. package/dist/es/common/sparse-array-limits.js +4 -4
  214. package/dist/es/common/user-events.js +124 -150
  215. package/dist/es/core/axis-label.js +38 -43
  216. package/dist/es/core/axis.js +293 -345
  217. package/dist/es/core/box-element.js +36 -46
  218. package/dist/es/core/box.js +75 -83
  219. package/dist/es/core/category-axis.js +265 -314
  220. package/dist/es/core/chart-element.js +98 -109
  221. package/dist/es/core/constants.js +3 -3
  222. package/dist/es/core/curve-processor.js +86 -93
  223. package/dist/es/core/date-category-axis.js +381 -413
  224. package/dist/es/core/date-value-axis.js +108 -118
  225. package/dist/es/core/float-element.js +54 -78
  226. package/dist/es/core/gradients.js +3 -3
  227. package/dist/es/core/logarithmic-axis.js +134 -186
  228. package/dist/es/core/mixins/grid-lines-mixin.js +18 -20
  229. package/dist/es/core/mixins/radar-numeric-axis-mixin.js +46 -51
  230. package/dist/es/core/note.js +58 -73
  231. package/dist/es/core/numeric-axis.js +111 -133
  232. package/dist/es/core/pattern.js +4 -8
  233. package/dist/es/core/point.js +25 -34
  234. package/dist/es/core/polar-axis.js +73 -91
  235. package/dist/es/core/radar-category-axis.js +90 -114
  236. package/dist/es/core/radar-logarithmic-axis.js +10 -20
  237. package/dist/es/core/radar-numeric-axis.js +10 -20
  238. package/dist/es/core/ring.js +61 -68
  239. package/dist/es/core/root-element.js +40 -48
  240. package/dist/es/core/sector.js +11 -17
  241. package/dist/es/core/shape-builder.js +13 -23
  242. package/dist/es/core/shape-element.js +27 -37
  243. package/dist/es/core/text-box.js +50 -59
  244. package/dist/es/core/text.js +13 -24
  245. package/dist/es/core/title.js +19 -25
  246. package/dist/es/core/utils/auto-axis-max.js +3 -3
  247. package/dist/es/core/utils/auto-axis-min.js +3 -3
  248. package/dist/es/core/utils/auto-major-unit.js +4 -4
  249. package/dist/es/core/utils/box-diff.js +9 -9
  250. package/dist/es/core/utils/create-axis-grid-line.js +2 -4
  251. package/dist/es/core/utils/create-axis-tick.js +2 -4
  252. package/dist/es/core/utils/guid.js +3 -3
  253. package/dist/es/core/utils/rect-to-box.js +2 -2
  254. package/dist/es/date-utils/absolute-date-diff.js +2 -2
  255. package/dist/es/date-utils/add-duration.js +5 -5
  256. package/dist/es/date-utils/ceil-date.js +1 -1
  257. package/dist/es/date-utils/constants.js +17 -17
  258. package/dist/es/date-utils/date-index.js +3 -3
  259. package/dist/es/date-utils/duration.js +1 -1
  260. package/dist/es/date-utils/lte-date-index.js +4 -4
  261. package/dist/es/date-utils/parse-date.js +1 -1
  262. package/dist/es/date-utils/parse-dates.js +2 -2
  263. package/dist/es/date-utils/start-of-week.js +3 -5
  264. package/dist/es/date-utils/to-date.js +1 -1
  265. package/dist/es/date-utils/to-time.js +2 -2
  266. package/dist/es/drawing-utils.js +18 -17
  267. package/dist/es/gauges/arc/arc-gauge.js +29 -38
  268. package/dist/es/gauges/arc/arc-scale.js +16 -29
  269. package/dist/es/gauges/arc/range-pointer-animation.js +16 -25
  270. package/dist/es/gauges/arc/range-pointer.js +25 -46
  271. package/dist/es/gauges/circular/circular-gauge.js +7 -17
  272. package/dist/es/gauges/constants.js +14 -14
  273. package/dist/es/gauges/gauge.js +84 -96
  274. package/dist/es/gauges/linear/arrow-linear-pointer-animation.js +13 -25
  275. package/dist/es/gauges/linear/arrow-linear-pointer.js +23 -35
  276. package/dist/es/gauges/linear/bar-linear-pointer-animation.js +15 -24
  277. package/dist/es/gauges/linear/bar-linear-pointer.js +38 -51
  278. package/dist/es/gauges/linear/linear-gauge.js +61 -83
  279. package/dist/es/gauges/linear/linear-pointer.js +25 -39
  280. package/dist/es/gauges/linear/linear-scale.js +57 -74
  281. package/dist/es/gauges/pointer.js +11 -21
  282. package/dist/es/gauges/radial/radial-gauge.js +58 -81
  283. package/dist/es/gauges/radial/radial-pointer-animation.js +9 -15
  284. package/dist/es/gauges/radial/radial-pointer.js +33 -48
  285. package/dist/es/gauges/radial/radial-scale.js +154 -186
  286. package/dist/es/gauges/utils/build-label-element.js +10 -12
  287. package/dist/es/gauges/utils/get-range.js +2 -2
  288. package/dist/es/gauges/utils/pad.js +3 -3
  289. package/dist/es/gauges/utils/unpad.js +1 -1
  290. package/dist/es/map/attribution.js +42 -52
  291. package/dist/es/map/constants.js +5 -5
  292. package/dist/es/map/crs.js +68 -112
  293. package/dist/es/map/datums.js +3 -3
  294. package/dist/es/map/extent.js +40 -54
  295. package/dist/es/map/layers/bubble.js +52 -70
  296. package/dist/es/map/layers/layer.js +50 -56
  297. package/dist/es/map/layers/marker.js +109 -129
  298. package/dist/es/map/layers/shape.js +111 -133
  299. package/dist/es/map/layers/tile.js +144 -170
  300. package/dist/es/map/location.js +70 -78
  301. package/dist/es/map/map.js +261 -291
  302. package/dist/es/map/navigator.js +33 -39
  303. package/dist/es/map/scroller/draggable.js +98 -134
  304. package/dist/es/map/scroller/fx.js +39 -46
  305. package/dist/es/map/scroller/scroller.js +144 -174
  306. package/dist/es/map/tooltip/tooltip.js +15 -25
  307. package/dist/es/map/utils.js +25 -26
  308. package/dist/es/map/zoom.js +30 -36
  309. package/dist/es/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +14 -26
  310. package/dist/es/qrcode/encodings/data-modes/byte-data-mode.js +15 -25
  311. package/dist/es/qrcode/encodings/data-modes/data-mode-instances.js +8 -7
  312. package/dist/es/qrcode/encodings/data-modes/numeric-data-mode.js +14 -24
  313. package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +15 -21
  314. package/dist/es/qrcode/encodings/encoders/iso-encoder.js +6 -16
  315. package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +28 -36
  316. package/dist/es/qrcode/encodings/encoding-result.js +4 -10
  317. package/dist/es/qrcode/encodings/encoding.js +68 -192
  318. package/dist/es/qrcode/encodings/free-cell-visitor.js +16 -24
  319. package/dist/es/qrcode/encodings/utils/choose-mode.js +44 -0
  320. package/dist/es/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
  321. package/dist/es/qrcode/encodings/utils/get-data-string.js +13 -0
  322. package/dist/es/qrcode/encodings/utils/get-modes.js +35 -0
  323. package/dist/es/qrcode/encodings/utils/get-version.js +23 -0
  324. package/dist/es/qrcode/encodings/utils/index.js +5 -0
  325. package/dist/es/qrcode/encodings/version-codewords.js +1 -1
  326. package/dist/es/qrcode/qrcode-validator.js +3 -5
  327. package/dist/es/qrcode/qrcode.js +104 -114
  328. package/dist/es/qrcode/utils.js +4 -4
  329. package/dist/es/sankey/calculation.js +286 -307
  330. package/dist/es/sankey/element.js +15 -23
  331. package/dist/es/sankey/label.js +29 -44
  332. package/dist/es/sankey/legend.js +15 -29
  333. package/dist/es/sankey/link.js +80 -98
  334. package/dist/es/sankey/node.js +26 -37
  335. package/dist/es/sankey/sankey.js +318 -385
  336. package/dist/es/sankey/title.js +9 -20
  337. package/dist/es/sankey/utils.js +18 -23
  338. package/dist/es/services/chart-service.js +24 -28
  339. package/dist/es/services/dom-events-builder.js +15 -15
  340. package/dist/es/services/format-service.js +30 -35
  341. package/dist/es/services/intl-service.js +14 -18
  342. package/dist/es/services/map-service.js +11 -11
  343. package/dist/es/services/template-service.js +9 -9
  344. package/dist/es/sparkline/shared-tooltip.js +11 -21
  345. package/dist/es/sparkline/sparkline.js +50 -60
  346. package/dist/es/stock/constants.js +3 -3
  347. package/dist/es/stock/fade-out-animation.js +12 -21
  348. package/dist/es/stock/navigator-hint.js +37 -49
  349. package/dist/es/stock/navigator.js +130 -161
  350. package/dist/es/stock/stock-chart.js +58 -67
  351. package/dist/es2015/chart/legend/legend-item.js +1 -1
  352. package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -1
  353. package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -1
  354. package/dist/es2015/qrcode/encodings/encoding.js +3 -127
  355. package/dist/es2015/qrcode/encodings/utils/choose-mode.js +44 -0
  356. package/dist/es2015/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
  357. package/dist/es2015/qrcode/encodings/utils/get-data-string.js +13 -0
  358. package/dist/es2015/qrcode/encodings/utils/get-modes.js +35 -0
  359. package/dist/es2015/qrcode/encodings/utils/get-version.js +23 -0
  360. package/dist/es2015/qrcode/encodings/utils/index.js +5 -0
  361. package/dist/npm/main.js +3222 -3589
  362. package/dist/systemjs/kendo-charts.js +1 -1
  363. package/package.json +19 -57
@@ -5,13 +5,13 @@ import { BLACK, COORD_PRECISION, DEFAULT_PRECISION, X, Y } from '../common/const
5
5
  import { defined, isNumber, last, limitValue, round, setDefaultOptions, valueOrDefault, HashMap } from '../common';
6
6
  import { dateEquals } from '../date-utils';
7
7
 
8
- var MIN_CATEGORY_POINTS_RANGE = 0.01;
9
- var MIN_CATEGORY_RANGE = 0.1;
8
+ const MIN_CATEGORY_POINTS_RANGE = 0.01;
9
+ const MIN_CATEGORY_RANGE = 0.1;
10
10
 
11
11
  function indexOf(value, arr) {
12
12
  if (value instanceof Date) {
13
- var length = arr.length;
14
- for (var idx = 0; idx < length; idx++) {
13
+ const length = arr.length;
14
+ for (let idx = 0; idx < length; idx++) {
15
15
  if (dateEquals(arr[idx], value)) {
16
16
  return idx;
17
17
  }
@@ -23,41 +23,33 @@ function indexOf(value, arr) {
23
23
  return arr.indexOf(value);
24
24
  }
25
25
 
26
- var CategoryAxis = (function (Axis) {
27
- function CategoryAxis () {
28
- Axis.apply(this, arguments);
29
- }
30
-
31
- if ( Axis ) CategoryAxis.__proto__ = Axis;
32
- CategoryAxis.prototype = Object.create( Axis && Axis.prototype );
33
- CategoryAxis.prototype.constructor = CategoryAxis;
34
-
35
- CategoryAxis.prototype.initFields = function initFields () {
26
+ class CategoryAxis extends Axis {
27
+ initFields() {
36
28
  this._ticks = {};
37
- };
29
+ }
38
30
 
39
- CategoryAxis.prototype.categoriesHash = function categoriesHash () {
31
+ categoriesHash() {
40
32
  return "";
41
- };
33
+ }
42
34
 
43
- CategoryAxis.prototype.clone = function clone () {
44
- var copy = new CategoryAxis(Object.assign({}, this.options, {
35
+ clone() {
36
+ const copy = new CategoryAxis(Object.assign({}, this.options, {
45
37
  categories: this.options.srcCategories
46
38
  }), this.chartService);
47
39
  copy.createLabels();
48
40
 
49
41
  return copy;
50
- };
42
+ }
51
43
 
52
- CategoryAxis.prototype.initUserOptions = function initUserOptions (options) {
53
- var categories = options.categories || [];
54
- var definedMin = defined(options.min);
55
- var definedMax = defined(options.max);
44
+ initUserOptions(options) {
45
+ const categories = options.categories || [];
46
+ const definedMin = defined(options.min);
47
+ const definedMax = defined(options.max);
56
48
  options.srcCategories = options.categories = categories;
57
49
 
58
50
  if ((definedMin || definedMax) && categories.length) {
59
- var min = definedMin ? Math.floor(options.min) : 0;
60
- var max;
51
+ const min = definedMin ? Math.floor(options.min) : 0;
52
+ let max;
61
53
 
62
54
  if (definedMax) {
63
55
  max = options.justified ? Math.floor(options.max) + 1 : Math.ceil(options.max);
@@ -69,13 +61,13 @@ var CategoryAxis = (function (Axis) {
69
61
  }
70
62
 
71
63
  return options;
72
- };
64
+ }
73
65
 
74
- CategoryAxis.prototype.rangeIndices = function rangeIndices () {
75
- var options = this.options;
76
- var length = options.categories.length || 1;
77
- var min = isNumber(options.min) ? options.min % 1 : 0;
78
- var max;
66
+ rangeIndices() {
67
+ const options = this.options;
68
+ const length = options.categories.length || 1;
69
+ const min = isNumber(options.min) ? options.min % 1 : 0;
70
+ let max;
79
71
 
80
72
  if (isNumber(options.max) && options.max % 1 !== 0 && options.max < this.totalRange().max) {
81
73
  max = length - (1 - options.max % 1);
@@ -87,35 +79,33 @@ var CategoryAxis = (function (Axis) {
87
79
  min: min,
88
80
  max: max
89
81
  };
90
- };
82
+ }
91
83
 
92
- CategoryAxis.prototype.range = function range () {
93
- var options = this.options;
94
- var min = isNumber(options.min) ? options.min : 0;
95
- var max = isNumber(options.max) ? options.max : this.totalRange().max;
84
+ range() {
85
+ const options = this.options;
86
+ const min = isNumber(options.min) ? options.min : 0;
87
+ const max = isNumber(options.max) ? options.max : this.totalRange().max;
96
88
 
97
89
  return {
98
90
  min: min,
99
91
  max: max
100
92
  };
101
- };
93
+ }
102
94
 
103
- CategoryAxis.prototype.roundedRange = function roundedRange () {
95
+ roundedRange() {
104
96
  return this.range();
105
- };
97
+ }
106
98
 
107
- CategoryAxis.prototype.totalRange = function totalRange () {
108
- var options = this.options;
99
+ totalRange() {
100
+ const options = this.options;
109
101
  return { min: 0, max: Math.max(this._seriesMax || 0, options.srcCategories.length) - (options.justified ? 1 : 0) };
110
- };
102
+ }
111
103
 
112
- CategoryAxis.prototype.scaleOptions = function scaleOptions () {
113
- var ref = this.rangeIndices();
114
- var min = ref.min;
115
- var max = ref.max;
116
- var lineBox = this.lineBox();
117
- var size = this.options.vertical ? lineBox.height() : lineBox.width();
118
- var scale = size / ((max - min) || 1);
104
+ scaleOptions() {
105
+ const { min, max } = this.rangeIndices();
106
+ const lineBox = this.lineBox();
107
+ const size = this.options.vertical ? lineBox.height() : lineBox.width();
108
+ const scale = size / ((max - min) || 1);
119
109
 
120
110
  return {
121
111
  scale: scale * (this.options.reverse ? -1 : 1),
@@ -123,24 +113,22 @@ var CategoryAxis = (function (Axis) {
123
113
  min: min,
124
114
  max: max
125
115
  };
126
- };
116
+ }
127
117
 
128
- CategoryAxis.prototype.arrangeLabels = function arrangeLabels () {
129
- Axis.prototype.arrangeLabels.call(this);
118
+ arrangeLabels() {
119
+ super.arrangeLabels();
130
120
  this.hideOutOfRangeLabels();
131
- };
121
+ }
132
122
 
133
- CategoryAxis.prototype.hideOutOfRangeLabels = function hideOutOfRangeLabels () {
134
- var ref = this;
135
- var box = ref.box;
136
- var labels = ref.labels;
123
+ hideOutOfRangeLabels() {
124
+ const { box, labels } = this;
137
125
 
138
126
  if (labels.length > 0) {
139
- var valueAxis = this.options.vertical ? Y : X;
140
- var start = box[valueAxis + 1];
141
- var end = box[valueAxis + 2];
142
- var firstLabel = labels[0];
143
- var lastLabel = last(labels);
127
+ const valueAxis = this.options.vertical ? Y : X;
128
+ const start = box[valueAxis + 1];
129
+ const end = box[valueAxis + 2];
130
+ const firstLabel = labels[0];
131
+ const lastLabel = last(labels);
144
132
 
145
133
  if (firstLabel.box[valueAxis + 1] > end || firstLabel.box[valueAxis + 2] < start) {
146
134
  firstLabel.options.visible = false;
@@ -149,27 +137,25 @@ var CategoryAxis = (function (Axis) {
149
137
  lastLabel.options.visible = false;
150
138
  }
151
139
  }
152
- };
140
+ }
153
141
 
154
- CategoryAxis.prototype.getMajorTickPositions = function getMajorTickPositions () {
142
+ getMajorTickPositions() {
155
143
  return this.getTicks().majorTicks;
156
- };
144
+ }
157
145
 
158
- CategoryAxis.prototype.getMinorTickPositions = function getMinorTickPositions () {
146
+ getMinorTickPositions() {
159
147
  return this.getTicks().minorTicks;
160
- };
148
+ }
161
149
 
162
- CategoryAxis.prototype.getLabelsTickPositions = function getLabelsTickPositions () {
150
+ getLabelsTickPositions() {
163
151
  return this.getTicks().labelTicks;
164
- };
152
+ }
165
153
 
166
- CategoryAxis.prototype.tickIndices = function tickIndices (stepSize) {
167
- var ref = this.rangeIndices();
168
- var min = ref.min;
169
- var max = ref.max;
170
- var limit = Math.ceil(max);
171
- var current = Math.floor(min);
172
- var indices = [];
154
+ tickIndices(stepSize) {
155
+ const { min, max } = this.rangeIndices();
156
+ const limit = Math.ceil(max);
157
+ let current = Math.floor(min);
158
+ const indices = [];
173
159
 
174
160
  while (current <= limit) {
175
161
  indices.push(current);
@@ -177,36 +163,31 @@ var CategoryAxis = (function (Axis) {
177
163
  }
178
164
 
179
165
  return indices;
180
- };
181
-
182
- CategoryAxis.prototype.getTickPositions = function getTickPositions (stepSize) {
183
- var ref = this.options;
184
- var vertical = ref.vertical;
185
- var reverse = ref.reverse;
186
- var ref$1 = this.scaleOptions();
187
- var scale = ref$1.scale;
188
- var box = ref$1.box;
189
- var min = ref$1.min;
190
- var pos = box[(vertical ? Y : X) + (reverse ? 2 : 1)];
191
- var indices = this.tickIndices(stepSize);
192
- var positions = [];
193
-
194
- for (var idx = 0; idx < indices.length; idx++) {
166
+ }
167
+
168
+ getTickPositions(stepSize) {
169
+ const { vertical, reverse } = this.options;
170
+ const { scale, box, min } = this.scaleOptions();
171
+ const pos = box[(vertical ? Y : X) + (reverse ? 2 : 1)];
172
+ const indices = this.tickIndices(stepSize);
173
+ const positions = [];
174
+
175
+ for (let idx = 0; idx < indices.length; idx++) {
195
176
  positions.push(pos + round(scale * (indices[idx] - min), COORD_PRECISION));
196
177
  }
197
178
 
198
179
  return positions;
199
- };
180
+ }
200
181
 
201
- CategoryAxis.prototype.getTicks = function getTicks () {
202
- var options = this.options;
203
- var cache = this._ticks;
204
- var range = this.rangeIndices();
205
- var lineBox = this.lineBox();
206
- var hash = lineBox.getHash() + range.min + "," + range.max + options.reverse + options.justified;
182
+ getTicks() {
183
+ const options = this.options;
184
+ const cache = this._ticks;
185
+ const range = this.rangeIndices();
186
+ const lineBox = this.lineBox();
187
+ const hash = lineBox.getHash() + range.min + "," + range.max + options.reverse + options.justified;
207
188
 
208
189
  if (cache._hash !== hash) {
209
- var hasMinor = options.minorTicks.visible || options.minorGridLines.visible;
190
+ const hasMinor = options.minorTicks.visible || options.minorGridLines.visible;
210
191
  cache._hash = hash;
211
192
  cache.labelTicks = this.getTickPositions(1);
212
193
  cache.majorTicks = this.filterOutOfRangePositions(cache.labelTicks, lineBox);
@@ -214,91 +195,82 @@ var CategoryAxis = (function (Axis) {
214
195
  }
215
196
 
216
197
  return cache;
217
- };
198
+ }
218
199
 
219
- CategoryAxis.prototype.filterOutOfRangePositions = function filterOutOfRangePositions (positions, lineBox) {
200
+ filterOutOfRangePositions(positions, lineBox) {
220
201
  if (!positions.length) {
221
202
  return positions;
222
203
  }
223
204
 
224
- var axis = this.options.vertical ? Y : X;
225
- var inRange = function (position) { return lineBox[axis + 1] <= position && position <= lineBox[axis + 2]; };
205
+ const axis = this.options.vertical ? Y : X;
206
+ const inRange = (position) => lineBox[axis + 1] <= position && position <= lineBox[axis + 2];
226
207
 
227
- var end = positions.length - 1;
228
- var startIndex = 0;
208
+ const end = positions.length - 1;
209
+ let startIndex = 0;
229
210
  while (!inRange(positions[startIndex]) && startIndex <= end) {
230
211
  startIndex++;
231
212
  }
232
213
 
233
- var endIndex = end;
214
+ let endIndex = end;
234
215
 
235
216
  while (!inRange(positions[endIndex]) && endIndex >= 0) {
236
217
  endIndex--;
237
218
  }
238
219
 
239
220
  return positions.slice(startIndex, endIndex + 1);
240
- };
241
-
242
- CategoryAxis.prototype.lineInfo = function lineInfo () {
243
- var ref = this.options;
244
- var vertical = ref.vertical;
245
- var reverse = ref.reverse;
246
- var lineBox = this.lineBox();
247
- var lineSize = vertical ? lineBox.height() : lineBox.width();
248
- var axis = vertical ? Y : X;
249
- var axisDir = reverse ? -1 : 1;
250
- var startEdge = axisDir === 1 ? 1 : 2;
251
- var axisOrigin = axis + startEdge.toString();
252
- var lineStart = lineBox[axisOrigin];
221
+ }
222
+
223
+ lineInfo() {
224
+ const { vertical, reverse } = this.options;
225
+ const lineBox = this.lineBox();
226
+ const lineSize = vertical ? lineBox.height() : lineBox.width();
227
+ const axis = vertical ? Y : X;
228
+ const axisDir = reverse ? -1 : 1;
229
+ const startEdge = axisDir === 1 ? 1 : 2;
230
+ const axisOrigin = axis + startEdge.toString();
231
+ const lineStart = lineBox[axisOrigin];
253
232
 
254
233
  return {
255
- axis: axis,
256
- axisOrigin: axisOrigin,
257
- axisDir: axisDir,
258
- lineBox: lineBox,
259
- lineSize: lineSize,
260
- lineStart: lineStart
234
+ axis,
235
+ axisOrigin,
236
+ axisDir,
237
+ lineBox,
238
+ lineSize,
239
+ lineStart
261
240
  };
262
- };
241
+ }
263
242
 
264
- CategoryAxis.prototype.lineDir = function lineDir () {
243
+ lineDir() {
265
244
  /*
266
245
  * Category axis line direction:
267
246
  * * Vertical: down.
268
247
  * * Horizontal: right.
269
248
  */
270
249
 
271
- var ref = this.options;
272
- var reverse = ref.reverse;
250
+ const { reverse } = this.options;
273
251
  return reverse ? -1 : 1;
274
- };
252
+ }
275
253
 
276
254
  // TODO: Rename to slotBox, valueSlot, slotByIndex?
277
- CategoryAxis.prototype.getSlot = function getSlot (from, to, limit) {
278
- var options = this.options;
279
- var reverse = options.reverse;
280
- var justified = options.justified;
281
- var ref = this.scaleOptions();
282
- var scale = ref.scale;
283
- var box = ref.box;
284
- var min = ref.min;
285
- var ref$1 = this.lineInfo();
286
- var valueAxis = ref$1.axis;
287
- var lineStart = ref$1.lineStart;
288
-
289
- var slotBox = box.clone();
290
- var singleSlot = !defined(to);
291
-
292
- var start = valueOrDefault(from, 0);
293
- var end = valueOrDefault(to, start);
255
+ getSlot(from, to, limit) {
256
+ const options = this.options;
257
+ const { reverse, justified } = options;
258
+ const { scale, box, min } = this.scaleOptions();
259
+ const { axis: valueAxis, lineStart } = this.lineInfo();
260
+
261
+ const slotBox = box.clone();
262
+ const singleSlot = !defined(to);
263
+
264
+ const start = valueOrDefault(from, 0);
265
+ let end = valueOrDefault(to, start);
294
266
  end = Math.max(end - 1, start);
295
267
 
296
268
  // Fixes transient bug caused by iOS 6.0 JIT
297
269
  // (one can never be too sure)
298
270
  end = Math.max(start, end);
299
271
 
300
- var p1 = lineStart + (start - min) * scale;
301
- var p2 = lineStart + (end + 1 - min) * scale;
272
+ let p1 = lineStart + (start - min) * scale;
273
+ let p2 = lineStart + (end + 1 - min) * scale;
302
274
 
303
275
  if (singleSlot && justified) {
304
276
  p2 = p1;
@@ -313,24 +285,24 @@ var CategoryAxis = (function (Axis) {
313
285
  slotBox[valueAxis + 2] = reverse ? p1 : p2;
314
286
 
315
287
  return slotBox;
316
- };
288
+ }
317
289
 
318
- CategoryAxis.prototype.limitSlot = function limitSlot (slot) {
319
- var vertical = this.options.vertical;
320
- var valueAxis = vertical ? Y : X;
321
- var lineBox = this.lineBox();
322
- var limittedSlot = slot.clone();
290
+ limitSlot(slot) {
291
+ const vertical = this.options.vertical;
292
+ const valueAxis = vertical ? Y : X;
293
+ const lineBox = this.lineBox();
294
+ const limittedSlot = slot.clone();
323
295
 
324
296
  limittedSlot[valueAxis + 1] = limitValue(slot[valueAxis + 1], lineBox[valueAxis + 1], lineBox[valueAxis + 2]);
325
297
  limittedSlot[valueAxis + 2] = limitValue(slot[valueAxis + 2], lineBox[valueAxis + 1], lineBox[valueAxis + 2]);
326
298
 
327
299
  return limittedSlot;
328
- };
300
+ }
329
301
 
330
- CategoryAxis.prototype.slot = function slot (from, to, limit) {
331
- var min = Math.floor(this.options.min || 0);
332
- var start = from;
333
- var end = to;
302
+ slot(from, to, limit) {
303
+ const min = Math.floor(this.options.min || 0);
304
+ let start = from;
305
+ let end = to;
334
306
 
335
307
  if (typeof start === "string") {
336
308
  start = this.categoryIndex(start);
@@ -344,31 +316,24 @@ var CategoryAxis = (function (Axis) {
344
316
  end -= min;
345
317
  }
346
318
 
347
- return Axis.prototype.slot.call(this, start, end, limit);
348
- };
349
-
350
- CategoryAxis.prototype.pointCategoryIndex = function pointCategoryIndex (point) {
351
- var ref = this.options;
352
- var reverse = ref.reverse;
353
- var justified = ref.justified;
354
- var vertical = ref.vertical;
355
- var valueAxis = vertical ? Y : X;
356
- var ref$1 = this.scaleOptions();
357
- var scale = ref$1.scale;
358
- var box = ref$1.box;
359
- var min = ref$1.min;
360
- var max = ref$1.max;
361
- var startValue = reverse ? max : min;
362
- var lineStart = box[valueAxis + 1];
363
- var lineEnd = box[valueAxis + 2];
364
- var pos = point[valueAxis];
319
+ return super.slot(start, end, limit);
320
+ }
321
+
322
+ pointCategoryIndex(point) {
323
+ const { reverse, justified, vertical } = this.options;
324
+ const valueAxis = vertical ? Y : X;
325
+ const { scale, box, min, max } = this.scaleOptions();
326
+ const startValue = reverse ? max : min;
327
+ const lineStart = box[valueAxis + 1];
328
+ const lineEnd = box[valueAxis + 2];
329
+ const pos = point[valueAxis];
365
330
 
366
331
  if (pos < lineStart || pos > lineEnd) {
367
332
  return null;
368
333
  }
369
334
 
370
- var value = startValue + (pos - lineStart) / scale;
371
- var diff = value % 1;
335
+ let value = startValue + (pos - lineStart) / scale;
336
+ const diff = value % 1;
372
337
 
373
338
  if (justified) {
374
339
  value = Math.round(value);
@@ -377,55 +342,55 @@ var CategoryAxis = (function (Axis) {
377
342
  }
378
343
 
379
344
  return Math.floor(value);
380
- };
345
+ }
381
346
 
382
- CategoryAxis.prototype.getCategory = function getCategory (point) {
383
- var index = this.pointCategoryIndex(point);
347
+ getCategory(point) {
348
+ const index = this.pointCategoryIndex(point);
384
349
 
385
350
  if (index === null) {
386
351
  return null;
387
352
  }
388
353
 
389
354
  return this.options.categories[index];
390
- };
355
+ }
391
356
 
392
- CategoryAxis.prototype.categoryIndex = function categoryIndex (value) {
357
+ categoryIndex(value) {
393
358
  return this.totalIndex(value) - Math.floor(this.options.min || 0);
394
- };
359
+ }
395
360
 
396
- CategoryAxis.prototype.categoryAt = function categoryAt (index, total) {
397
- var options = this.options;
361
+ categoryAt(index, total) {
362
+ const options = this.options;
398
363
 
399
364
  return (total ? options.srcCategories : options.categories)[index];
400
- };
365
+ }
401
366
 
402
- CategoryAxis.prototype.categoriesCount = function categoriesCount () {
367
+ categoriesCount() {
403
368
  return (this.options.categories || []).length;
404
- };
369
+ }
405
370
 
406
- CategoryAxis.prototype.translateRange = function translateRange (delta) {
407
- var options = this.options;
408
- var lineBox = this.lineBox();
409
- var size = options.vertical ? lineBox.height() : lineBox.width();
410
- var range = options.categories.length;
411
- var scale = size / range;
412
- var offset = round(delta / scale, DEFAULT_PRECISION);
371
+ translateRange(delta) {
372
+ const options = this.options;
373
+ const lineBox = this.lineBox();
374
+ const size = options.vertical ? lineBox.height() : lineBox.width();
375
+ const range = options.categories.length;
376
+ const scale = size / range;
377
+ const offset = round(delta / scale, DEFAULT_PRECISION);
413
378
 
414
379
  return {
415
380
  min: offset,
416
381
  max: range + offset
417
382
  };
418
- };
419
-
420
- CategoryAxis.prototype.scaleRange = function scaleRange (scale, cursor) {
421
- var position = Math.abs(this.pointOffset(cursor));
422
- var rangeIndices = this.limitedRangeIndices();
423
- var range = rangeIndices.max - rangeIndices.min;
424
- var delta = this.scaleToDelta(scale, range);
425
- var minDelta = position * delta;
426
- var maxDelta = (1 - position) * delta;
427
- var min = rangeIndices.min + minDelta;
428
- var max = rangeIndices.max - maxDelta;
383
+ }
384
+
385
+ scaleRange(scale, cursor) {
386
+ const position = Math.abs(this.pointOffset(cursor));
387
+ const rangeIndices = this.limitedRangeIndices();
388
+ const range = rangeIndices.max - rangeIndices.min;
389
+ const delta = this.scaleToDelta(scale, range);
390
+ const minDelta = position * delta;
391
+ const maxDelta = (1 - position) * delta;
392
+ const min = rangeIndices.min + minDelta;
393
+ let max = rangeIndices.max - maxDelta;
429
394
 
430
395
  if (max - min < MIN_CATEGORY_RANGE) {
431
396
  max = min + MIN_CATEGORY_RANGE;
@@ -435,34 +400,29 @@ var CategoryAxis = (function (Axis) {
435
400
  min: min,
436
401
  max: max
437
402
  };
438
- };
403
+ }
439
404
 
440
- CategoryAxis.prototype.zoomRange = function zoomRange (scale, cursor) {
441
- var ref = this.totalRange();
442
- var totalMin = ref.min;
443
- var totalMax = ref.max;
444
- var range = this.scaleRange(scale, cursor);
405
+ zoomRange(scale, cursor) {
406
+ const { min: totalMin, max: totalMax } = this.totalRange();
407
+ const range = this.scaleRange(scale, cursor);
445
408
 
446
409
  return {
447
410
  min: limitValue(range.min, totalMin, totalMax),
448
411
  max: limitValue(range.max, totalMin, totalMax)
449
412
  };
450
- };
413
+ }
451
414
 
452
- CategoryAxis.prototype.labelsCount = function labelsCount () {
453
- var labelsRange = this.labelsRange();
415
+ labelsCount() {
416
+ const labelsRange = this.labelsRange();
454
417
 
455
418
  return labelsRange.max - labelsRange.min;
456
- };
419
+ }
457
420
 
458
- CategoryAxis.prototype.labelsRange = function labelsRange () {
459
- var options = this.options;
460
- var justified = options.justified;
461
- var labelOptions = options.labels;
462
- var ref = this.limitedRangeIndices(true);
463
- var min = ref.min;
464
- var max = ref.max;
465
- var start = Math.floor(min);
421
+ labelsRange() {
422
+ const options = this.options;
423
+ const { justified, labels: labelOptions } = options;
424
+ let { min, max } = this.limitedRangeIndices(true);
425
+ const start = Math.floor(min);
466
426
 
467
427
  if (!justified) {
468
428
  min = Math.floor(min);
@@ -472,7 +432,7 @@ var CategoryAxis = (function (Axis) {
472
432
  max = Math.floor(max);
473
433
  }
474
434
 
475
- var skip;
435
+ let skip;
476
436
 
477
437
  if (min > labelOptions.skip) {
478
438
  skip = labelOptions.skip + labelOptions.step * Math.ceil((min - labelOptions.skip) / labelOptions.step);
@@ -484,84 +444,77 @@ var CategoryAxis = (function (Axis) {
484
444
  min: skip - start,
485
445
  max: (options.categories.length ? max + (justified ? 1 : 0) : 0) - start
486
446
  };
487
- };
447
+ }
488
448
 
489
- CategoryAxis.prototype.createAxisLabel = function createAxisLabel (index, labelOptions, labelContext) {
490
- var options = this.options;
491
- var dataItem = options.dataItems ? options.dataItems[index] : null;
492
- var category = valueOrDefault(options.categories[index], "");
449
+ createAxisLabel(index, labelOptions, labelContext) {
450
+ const options = this.options;
451
+ const dataItem = options.dataItems ? options.dataItems[index] : null;
452
+ const category = valueOrDefault(options.categories[index], "");
493
453
 
494
454
  labelContext.dataItem = dataItem;
495
- var text = this.axisLabelText(category, labelOptions, labelContext);
455
+ const text = this.axisLabelText(category, labelOptions, labelContext);
496
456
 
497
457
  return new AxisLabel(category, text, index, dataItem, labelOptions);
498
- };
458
+ }
499
459
 
500
- CategoryAxis.prototype.shouldRenderNote = function shouldRenderNote (value) {
501
- var range = this.limitedRangeIndices();
460
+ shouldRenderNote(value) {
461
+ const range = this.limitedRangeIndices();
502
462
 
503
463
  return Math.floor(range.min) <= value && value <= Math.ceil(range.max);
504
- };
464
+ }
505
465
 
506
- CategoryAxis.prototype.noteSlot = function noteSlot (value) {
507
- var options = this.options;
508
- var index = value - Math.floor(options.min || 0);
466
+ noteSlot(value) {
467
+ const options = this.options;
468
+ const index = value - Math.floor(options.min || 0);
509
469
  return this.getSlot(index);
510
- };
470
+ }
511
471
 
512
- CategoryAxis.prototype.arrangeNotes = function arrangeNotes () {
513
- Axis.prototype.arrangeNotes.call(this);
472
+ arrangeNotes() {
473
+ super.arrangeNotes();
514
474
  this.hideOutOfRangeNotes();
515
- };
475
+ }
516
476
 
517
- CategoryAxis.prototype.hideOutOfRangeNotes = function hideOutOfRangeNotes () {
518
- var ref = this;
519
- var notes = ref.notes;
520
- var box = ref.box;
477
+ hideOutOfRangeNotes() {
478
+ const { notes, box } = this;
521
479
  if (notes && notes.length) {
522
- var valueAxis = this.options.vertical ? Y : X;
523
- var start = box[valueAxis + 1];
524
- var end = box[valueAxis + 2];
480
+ const valueAxis = this.options.vertical ? Y : X;
481
+ const start = box[valueAxis + 1];
482
+ const end = box[valueAxis + 2];
525
483
 
526
- for (var idx = 0; idx < notes.length; idx++) {
527
- var note = notes[idx];
484
+ for (let idx = 0; idx < notes.length; idx++) {
485
+ const note = notes[idx];
528
486
  if (note.box && (end < note.box[valueAxis + 1] || note.box[valueAxis + 2] < start)) {
529
487
  note.hide();
530
488
  }
531
489
  }
532
490
  }
533
- };
491
+ }
534
492
 
535
- CategoryAxis.prototype.pan = function pan (delta) {
536
- var range = this.limitedRangeIndices(true);
537
- var ref = this.scaleOptions();
538
- var scale = ref.scale;
539
- var offset = round(delta / scale, DEFAULT_PRECISION);
540
- var totalRange = this.totalRange();
541
- var min = range.min + offset;
542
- var max = range.max + offset;
493
+ pan(delta) {
494
+ const range = this.limitedRangeIndices(true);
495
+ const { scale } = this.scaleOptions();
496
+ const offset = round(delta / scale, DEFAULT_PRECISION);
497
+ const totalRange = this.totalRange();
498
+ const min = range.min + offset;
499
+ const max = range.max + offset;
543
500
 
544
501
  return this.limitRange(min, max, 0, totalRange.max, offset);
545
- };
546
-
547
- CategoryAxis.prototype.pointsRange = function pointsRange (start, end) {
548
- var ref = this.options;
549
- var reverse = ref.reverse;
550
- var vertical = ref.vertical;
551
- var valueAxis = vertical ? Y : X;
552
- var range = this.limitedRangeIndices(true);
553
- var ref$1 = this.scaleOptions();
554
- var scale = ref$1.scale;
555
- var box = ref$1.box;
556
- var lineStart = box[valueAxis + (reverse ? 2 : 1)];
557
-
558
- var diffStart = start[valueAxis] - lineStart;
559
- var diffEnd = end[valueAxis] - lineStart;
560
-
561
- var min = range.min + diffStart / scale;
562
- var max = range.min + diffEnd / scale;
563
- var rangeMin = Math.min(min, max);
564
- var rangeMax = Math.max(min, max);
502
+ }
503
+
504
+ pointsRange(start, end) {
505
+ const { reverse, vertical } = this.options;
506
+ const valueAxis = vertical ? Y : X;
507
+ const range = this.limitedRangeIndices(true);
508
+ const { scale, box } = this.scaleOptions();
509
+ const lineStart = box[valueAxis + (reverse ? 2 : 1)];
510
+
511
+ const diffStart = start[valueAxis] - lineStart;
512
+ const diffEnd = end[valueAxis] - lineStart;
513
+
514
+ const min = range.min + diffStart / scale;
515
+ const max = range.min + diffEnd / scale;
516
+ const rangeMin = Math.min(min, max);
517
+ const rangeMax = Math.max(min, max);
565
518
 
566
519
  if (rangeMax - rangeMin >= MIN_CATEGORY_POINTS_RANGE) {
567
520
  return {
@@ -569,29 +522,29 @@ var CategoryAxis = (function (Axis) {
569
522
  max: rangeMax
570
523
  };
571
524
  }
572
- };
525
+ }
573
526
 
574
- CategoryAxis.prototype.valueRange = function valueRange () {
527
+ valueRange() {
575
528
  return this.range();
576
- };
529
+ }
577
530
 
578
- CategoryAxis.prototype.totalIndex = function totalIndex (value) {
579
- var options = this.options;
580
- var index = this._categoriesMap ?
531
+ totalIndex(value) {
532
+ const options = this.options;
533
+ const index = this._categoriesMap ?
581
534
  this._categoriesMap.get(value) : indexOf(value, options.srcCategories);
582
535
 
583
536
  return index;
584
- };
537
+ }
585
538
 
586
- CategoryAxis.prototype.currentRangeIndices = function currentRangeIndices () {
587
- var options = this.options;
588
- var min = 0;
539
+ currentRangeIndices() {
540
+ const options = this.options;
541
+ let min = 0;
589
542
 
590
543
  if (isNumber(options.min)) {
591
544
  min = Math.floor(options.min);
592
545
  }
593
546
 
594
- var max;
547
+ let max;
595
548
  if (isNumber(options.max)) {
596
549
  max = options.justified ? Math.floor(options.max) : Math.ceil(options.max) - 1;
597
550
  } else {
@@ -602,12 +555,12 @@ var CategoryAxis = (function (Axis) {
602
555
  min: min,
603
556
  max: max
604
557
  };
605
- };
558
+ }
606
559
 
607
- CategoryAxis.prototype.limitedRangeIndices = function limitedRangeIndices (totalLimit) {
608
- var options = this.options;
609
- var min = isNumber(options.min) ? options.min : 0;
610
- var max;
560
+ limitedRangeIndices(totalLimit) {
561
+ const options = this.options;
562
+ let min = isNumber(options.min) ? options.min : 0;
563
+ let max;
611
564
 
612
565
  if (isNumber(options.max)) {
613
566
  max = options.max;
@@ -618,7 +571,7 @@ var CategoryAxis = (function (Axis) {
618
571
  }
619
572
 
620
573
  if (totalLimit) {
621
- var totalRange = this.totalRange();
574
+ const totalRange = this.totalRange();
622
575
  min = limitValue(min, 0, totalRange.max);
623
576
  max = limitValue(max, 0, totalRange.max);
624
577
  }
@@ -627,31 +580,29 @@ var CategoryAxis = (function (Axis) {
627
580
  min: min,
628
581
  max: max
629
582
  };
630
- };
583
+ }
631
584
 
632
- CategoryAxis.prototype.totalRangeIndices = function totalRangeIndices () {
585
+ totalRangeIndices() {
633
586
  return {
634
587
  min: 0,
635
588
  max: this.totalRange().max || 1
636
589
  };
637
- };
590
+ }
638
591
 
639
- CategoryAxis.prototype.indexCategories = function indexCategories () {
592
+ indexCategories() {
640
593
  if (!this._categoriesMap) {
641
- var map = this._categoriesMap = new HashMap();
642
- var srcCategories = this.options.srcCategories;
643
- for (var idx = 0; idx < srcCategories.length; idx++) {
594
+ const map = this._categoriesMap = new HashMap();
595
+ const srcCategories = this.options.srcCategories;
596
+ for (let idx = 0; idx < srcCategories.length; idx++) {
644
597
  map.set(srcCategories[idx], idx);
645
598
  }
646
599
  }
647
- };
600
+ }
648
601
 
649
- CategoryAxis.prototype.totalCount = function totalCount () {
602
+ totalCount() {
650
603
  return Math.max(this.options.srcCategories.length, this._seriesMax || 0);
651
- };
652
-
653
- return CategoryAxis;
654
- }(Axis));
604
+ }
605
+ }
655
606
 
656
607
  setDefaultOptions(CategoryAxis, {
657
608
  type: "category",