highcharts 7.1.1 → 7.1.2

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 (415) hide show
  1. package/bower.json +1 -1
  2. package/css/annotations/popup.css +3 -3
  3. package/css/annotations/popup.scss +1 -1
  4. package/css/stocktools/gui.css +5 -5
  5. package/css/stocktools/gui.scss +1 -1
  6. package/es-modules/annotations/ControlPoint.js +1 -1
  7. package/es-modules/annotations/MockPoint.js +45 -12
  8. package/es-modules/annotations/annotations.src.js +203 -166
  9. package/es-modules/annotations/controllable/ControllableCircle.js +2 -10
  10. package/es-modules/annotations/controllable/ControllableImage.js +2 -10
  11. package/es-modules/annotations/controllable/ControllableLabel.js +54 -9
  12. package/es-modules/annotations/controllable/ControllableRect.js +2 -10
  13. package/es-modules/annotations/controllable/controllableMixin.js +32 -4
  14. package/es-modules/annotations/controllable/markerMixin.js +1 -0
  15. package/es-modules/annotations/eventEmitterMixin.js +1 -0
  16. package/es-modules/annotations/navigationBindings.js +15 -11
  17. package/es-modules/annotations/popup.js +59 -81
  18. package/es-modules/annotations/types/CrookedLine.js +19 -7
  19. package/es-modules/annotations/types/ElliottWave.js +7 -6
  20. package/es-modules/annotations/types/Fibonacci.js +14 -14
  21. package/es-modules/annotations/types/InfinityLine.js +4 -4
  22. package/es-modules/annotations/types/Measure.js +41 -41
  23. package/es-modules/annotations/types/Pitchfork.js +5 -4
  24. package/es-modules/annotations/types/VerticalLine.js +6 -5
  25. package/es-modules/error-messages.js +6 -1
  26. package/es-modules/indicators/indicators.src.js +5 -3
  27. package/es-modules/mixins/nodes.js +16 -8
  28. package/es-modules/modules/accessibility/AccessibilityComponent.js +4 -4
  29. package/es-modules/modules/accessibility/KeyboardNavigation.js +17 -4
  30. package/es-modules/modules/accessibility/components/RangeSelectorComponent.js +3 -2
  31. package/es-modules/modules/accessibility/components/SeriesComponent.js +110 -2
  32. package/es-modules/modules/accessibility/components/ZoomComponent.js +1 -1
  33. package/es-modules/modules/accessibility/options.js +2 -1
  34. package/es-modules/modules/bellcurve.src.js +27 -29
  35. package/es-modules/modules/boost/boost-init.js +14 -0
  36. package/es-modules/modules/boost/boost-overrides.js +13 -3
  37. package/es-modules/modules/boost/wgl-renderer.js +30 -15
  38. package/es-modules/modules/boost/wgl-shader.js +33 -16
  39. package/es-modules/modules/boost/wgl-vbuffer.js +8 -4
  40. package/es-modules/modules/broken-axis.src.js +1 -1
  41. package/es-modules/modules/bullet.src.js +68 -68
  42. package/es-modules/modules/cylinder.src.js +3 -1
  43. package/es-modules/modules/data.src.js +9 -5
  44. package/es-modules/modules/draggable-points.src.js +1 -1
  45. package/es-modules/modules/drilldown.src.js +1 -1
  46. package/es-modules/modules/export-data.src.js +7 -8
  47. package/es-modules/modules/exporting.src.js +9 -1
  48. package/es-modules/modules/full-screen.src.js +1 -1
  49. package/es-modules/modules/funnel3d.src.js +10 -3
  50. package/es-modules/modules/histogram.src.js +162 -164
  51. package/es-modules/modules/item-series.src.js +10 -10
  52. package/es-modules/modules/networkgraph/layouts.js +16 -12
  53. package/es-modules/modules/networkgraph/networkgraph.src.js +147 -51
  54. package/es-modules/modules/offline-exporting.src.js +15 -2
  55. package/es-modules/modules/oldie-polyfills.src.js +1 -1
  56. package/es-modules/modules/organization.src.js +65 -20
  57. package/es-modules/modules/pareto.src.js +52 -51
  58. package/es-modules/modules/pattern-fill.src.js +1 -1
  59. package/es-modules/modules/price-indicator.src.js +1 -1
  60. package/es-modules/modules/pyramid3d.src.js +1 -1
  61. package/es-modules/modules/sankey.src.js +22 -10
  62. package/es-modules/modules/series-label.src.js +16 -8
  63. package/es-modules/modules/solid-gauge.src.js +128 -79
  64. package/es-modules/modules/static-scale.src.js +8 -1
  65. package/es-modules/modules/stock-tools-gui.js +1 -1
  66. package/es-modules/modules/streamgraph.src.js +11 -11
  67. package/es-modules/modules/sunburst.src.js +23 -2
  68. package/es-modules/modules/tilemap.src.js +58 -57
  69. package/es-modules/modules/timeline.src.js +17 -12
  70. package/es-modules/modules/treemap.src.js +6 -6
  71. package/es-modules/modules/variwide.src.js +39 -39
  72. package/es-modules/modules/vector.src.js +108 -107
  73. package/es-modules/modules/venn.src.js +4 -2
  74. package/es-modules/modules/windbarb.src.js +43 -43
  75. package/es-modules/modules/wordcloud.src.js +1 -0
  76. package/es-modules/modules/xrange.src.js +112 -104
  77. package/es-modules/parts/AreaSeries.js +4 -1
  78. package/es-modules/parts/Axis.js +809 -1870
  79. package/es-modules/parts/Chart.js +254 -743
  80. package/es-modules/parts/Color.js +160 -113
  81. package/es-modules/parts/ColumnSeries.js +9 -3
  82. package/es-modules/parts/DataLabels.js +31 -2
  83. package/es-modules/parts/Dynamics.js +73 -26
  84. package/es-modules/parts/FlagsSeries.js +6 -4
  85. package/es-modules/parts/Globals.js +20 -36
  86. package/es-modules/parts/Html.js +116 -235
  87. package/es-modules/parts/Interaction.js +17 -7
  88. package/es-modules/parts/Legend.js +277 -632
  89. package/es-modules/parts/MSPointer.js +62 -106
  90. package/es-modules/parts/Options.js +128 -367
  91. package/es-modules/parts/OrdinalAxis.js +12 -0
  92. package/es-modules/parts/PieSeries.js +61 -44
  93. package/es-modules/parts/PlotLineOrBand.js +38 -3
  94. package/es-modules/parts/Point.js +117 -227
  95. package/es-modules/parts/Pointer.js +273 -558
  96. package/es-modules/parts/RangeSelector.js +5 -3
  97. package/es-modules/parts/Responsive.js +8 -4
  98. package/es-modules/parts/ScrollablePlotArea.js +215 -81
  99. package/es-modules/parts/Scrollbar.js +38 -23
  100. package/es-modules/parts/Series.js +151 -47
  101. package/es-modules/parts/Stacking.js +8 -3
  102. package/es-modules/parts/StockChart.js +42 -29
  103. package/es-modules/parts/SvgRenderer.js +1080 -2100
  104. package/es-modules/parts/Tick.js +11 -4
  105. package/es-modules/parts/Time.js +179 -363
  106. package/es-modules/parts/Tooltip.js +23 -12
  107. package/es-modules/parts/TouchPointer.js +69 -187
  108. package/es-modules/parts/Utilities.js +593 -846
  109. package/es-modules/parts-3d/Axis.js +2 -2
  110. package/es-modules/parts-3d/Column.js +18 -8
  111. package/es-modules/parts-gantt/GanttSeries.js +17 -21
  112. package/es-modules/parts-gantt/GridAxis.js +183 -101
  113. package/es-modules/parts-gantt/PathfinderAlgorithms.js +2 -2
  114. package/es-modules/parts-gantt/TreeGrid.js +53 -36
  115. package/es-modules/parts-map/ColorAxis.js +35 -14
  116. package/es-modules/parts-map/MapBubbleSeries.js +2 -1
  117. package/es-modules/parts-map/MapSeries.js +29 -18
  118. package/es-modules/parts-more/AreaRangeSeries.js +13 -12
  119. package/es-modules/parts-more/ColumnRangeSeries.js +8 -2
  120. package/es-modules/parts-more/GaugeSeries.js +9 -9
  121. package/es-modules/parts-more/PackedBubbleSeries.js +152 -115
  122. package/es-modules/parts-more/RadialAxis.js +102 -8
  123. package/es-modules/parts-more/WaterfallSeries.js +148 -35
  124. package/highcharts-3d.js +68 -67
  125. package/highcharts-3d.js.map +1 -1
  126. package/highcharts-3d.src.js +21 -11
  127. package/highcharts-gantt.d.ts +5 -3
  128. package/highcharts-gantt.js +618 -610
  129. package/highcharts-gantt.js.map +1 -1
  130. package/highcharts-gantt.src.d.ts +5 -3
  131. package/highcharts-gantt.src.js +5185 -8892
  132. package/highcharts-more.js +144 -140
  133. package/highcharts-more.js.map +1 -1
  134. package/highcharts-more.src.js +449 -194
  135. package/highcharts.d.ts +3943 -5236
  136. package/highcharts.js +454 -449
  137. package/highcharts.js.map +1 -1
  138. package/highcharts.src.d.ts +3943 -5236
  139. package/highcharts.src.js +4767 -8601
  140. package/highmaps.d.ts +5 -3
  141. package/highmaps.js +498 -494
  142. package/highmaps.js.map +1 -1
  143. package/highmaps.src.d.ts +5 -3
  144. package/highmaps.src.js +4547 -8507
  145. package/highstock.d.ts +5 -3
  146. package/highstock.js +597 -590
  147. package/highstock.js.map +1 -1
  148. package/highstock.src.d.ts +5 -3
  149. package/highstock.src.js +4871 -8661
  150. package/indicators/acceleration-bands.js +1 -1
  151. package/indicators/acceleration-bands.src.js +1 -1
  152. package/indicators/accumulation-distribution.js +1 -1
  153. package/indicators/accumulation-distribution.src.js +1 -1
  154. package/indicators/ao.js +1 -1
  155. package/indicators/ao.src.js +1 -1
  156. package/indicators/apo.js +1 -1
  157. package/indicators/apo.src.js +1 -1
  158. package/indicators/aroon-oscillator.js +1 -1
  159. package/indicators/aroon-oscillator.src.js +1 -1
  160. package/indicators/aroon.js +1 -1
  161. package/indicators/aroon.src.js +1 -1
  162. package/indicators/atr.js +1 -1
  163. package/indicators/atr.src.js +1 -1
  164. package/indicators/bollinger-bands.js +1 -1
  165. package/indicators/bollinger-bands.src.js +1 -1
  166. package/indicators/cci.js +1 -1
  167. package/indicators/cci.src.js +1 -1
  168. package/indicators/chaikin.js +1 -1
  169. package/indicators/chaikin.src.js +1 -1
  170. package/indicators/cmf.js +1 -1
  171. package/indicators/cmf.src.js +1 -1
  172. package/indicators/dema.js +1 -1
  173. package/indicators/dema.src.js +1 -1
  174. package/indicators/dpo.js +1 -1
  175. package/indicators/dpo.src.js +1 -1
  176. package/indicators/ema.js +1 -1
  177. package/indicators/ema.src.js +1 -1
  178. package/indicators/ichimoku-kinko-hyo.js +1 -1
  179. package/indicators/ichimoku-kinko-hyo.src.js +1 -1
  180. package/indicators/indicators-all.js +105 -105
  181. package/indicators/indicators-all.js.map +1 -1
  182. package/indicators/indicators-all.src.js +6 -4
  183. package/indicators/indicators.js +9 -9
  184. package/indicators/indicators.js.map +1 -1
  185. package/indicators/indicators.src.js +6 -4
  186. package/indicators/keltner-channels.js +1 -1
  187. package/indicators/keltner-channels.src.js +1 -1
  188. package/indicators/macd.js +1 -1
  189. package/indicators/macd.src.js +1 -1
  190. package/indicators/mfi.js +1 -1
  191. package/indicators/mfi.src.js +1 -1
  192. package/indicators/momentum.js +1 -1
  193. package/indicators/momentum.src.js +1 -1
  194. package/indicators/natr.js +1 -1
  195. package/indicators/natr.src.js +1 -1
  196. package/indicators/pivot-points.js +1 -1
  197. package/indicators/pivot-points.src.js +1 -1
  198. package/indicators/ppo.js +1 -1
  199. package/indicators/ppo.src.js +1 -1
  200. package/indicators/price-channel.js +1 -1
  201. package/indicators/price-channel.src.js +1 -1
  202. package/indicators/price-envelopes.js +1 -1
  203. package/indicators/price-envelopes.src.js +1 -1
  204. package/indicators/psar.js +1 -1
  205. package/indicators/psar.src.js +1 -1
  206. package/indicators/regressions.js +1 -1
  207. package/indicators/regressions.src.js +1 -1
  208. package/indicators/roc.js +1 -1
  209. package/indicators/roc.src.js +1 -1
  210. package/indicators/rsi.js +1 -1
  211. package/indicators/rsi.src.js +1 -1
  212. package/indicators/stochastic.js +1 -1
  213. package/indicators/stochastic.src.js +1 -1
  214. package/indicators/supertrend.js +1 -1
  215. package/indicators/supertrend.src.js +1 -1
  216. package/indicators/tema.js +1 -1
  217. package/indicators/tema.src.js +1 -1
  218. package/indicators/trix.js +1 -1
  219. package/indicators/trix.src.js +1 -1
  220. package/indicators/volume-by-price.js +1 -1
  221. package/indicators/volume-by-price.src.js +1 -1
  222. package/indicators/vwap.js +1 -1
  223. package/indicators/vwap.src.js +1 -1
  224. package/indicators/williams-r.js +1 -1
  225. package/indicators/williams-r.src.js +1 -1
  226. package/indicators/wma.js +1 -1
  227. package/indicators/wma.src.js +1 -1
  228. package/indicators/zigzag.js +1 -1
  229. package/indicators/zigzag.src.js +1 -1
  230. package/modules/accessibility.js +92 -89
  231. package/modules/accessibility.js.map +1 -1
  232. package/modules/accessibility.src.js +138 -15
  233. package/modules/annotations-advanced.js +128 -127
  234. package/modules/annotations-advanced.js.map +1 -1
  235. package/modules/annotations-advanced.src.js +514 -396
  236. package/modules/annotations.d.ts +36 -0
  237. package/modules/annotations.js +81 -81
  238. package/modules/annotations.js.map +1 -1
  239. package/modules/annotations.src.d.ts +36 -0
  240. package/modules/annotations.src.js +418 -315
  241. package/modules/arrow-symbols.js +1 -1
  242. package/modules/arrow-symbols.src.js +1 -1
  243. package/modules/boost-canvas.js +1 -1
  244. package/modules/boost-canvas.src.js +1 -1
  245. package/modules/boost.js +63 -63
  246. package/modules/boost.js.map +1 -1
  247. package/modules/boost.src.js +99 -39
  248. package/modules/broken-axis.js +1 -1
  249. package/modules/broken-axis.src.js +2 -2
  250. package/modules/bullet.js +1 -1
  251. package/modules/bullet.src.js +69 -69
  252. package/modules/current-date-indicator.js +1 -1
  253. package/modules/current-date-indicator.src.js +1 -1
  254. package/modules/cylinder.js +1 -1
  255. package/modules/cylinder.js.map +1 -1
  256. package/modules/cylinder.src.js +4 -2
  257. package/modules/data.js +4 -4
  258. package/modules/data.js.map +1 -1
  259. package/modules/data.src.js +10 -6
  260. package/modules/datagrouping.js +1 -1
  261. package/modules/datagrouping.src.js +1 -1
  262. package/modules/debugger.js +4 -4
  263. package/modules/debugger.js.map +1 -1
  264. package/modules/debugger.src.js +7 -2
  265. package/modules/dependency-wheel.js +1 -1
  266. package/modules/dependency-wheel.src.js +1 -1
  267. package/modules/dotplot.js +1 -1
  268. package/modules/dotplot.src.js +1 -1
  269. package/modules/drag-panes.js +1 -1
  270. package/modules/drag-panes.src.js +1 -1
  271. package/modules/draggable-points.js +1 -1
  272. package/modules/draggable-points.src.js +2 -2
  273. package/modules/drilldown.js +1 -1
  274. package/modules/drilldown.src.js +2 -2
  275. package/modules/export-data.js +2 -2
  276. package/modules/export-data.js.map +1 -1
  277. package/modules/export-data.src.js +8 -9
  278. package/modules/exporting.js +25 -25
  279. package/modules/exporting.js.map +1 -1
  280. package/modules/exporting.src.js +11 -3
  281. package/modules/full-screen.js +1 -1
  282. package/modules/full-screen.src.js +2 -2
  283. package/modules/funnel.js +1 -1
  284. package/modules/funnel.src.js +1 -1
  285. package/modules/funnel3d.js +2 -2
  286. package/modules/funnel3d.js.map +1 -1
  287. package/modules/funnel3d.src.js +11 -4
  288. package/modules/gantt.js +166 -164
  289. package/modules/gantt.js.map +1 -1
  290. package/modules/gantt.src.js +422 -295
  291. package/modules/grid-axis.js +18 -16
  292. package/modules/grid-axis.js.map +1 -1
  293. package/modules/grid-axis.src.js +184 -102
  294. package/modules/heatmap.js +22 -22
  295. package/modules/heatmap.js.map +1 -1
  296. package/modules/heatmap.src.js +36 -15
  297. package/modules/histogram-bellcurve.js +1 -1
  298. package/modules/histogram-bellcurve.js.map +1 -1
  299. package/modules/histogram-bellcurve.src.js +186 -183
  300. package/modules/item-series.js +1 -1
  301. package/modules/item-series.src.js +11 -11
  302. package/modules/map-parser.js +1 -1
  303. package/modules/map-parser.src.js +1 -1
  304. package/modules/map.js +83 -83
  305. package/modules/map.js.map +1 -1
  306. package/modules/map.src.js +67 -34
  307. package/modules/networkgraph.js +10 -9
  308. package/modules/networkgraph.js.map +1 -1
  309. package/modules/networkgraph.src.js +180 -72
  310. package/modules/no-data-to-display.js +1 -1
  311. package/modules/no-data-to-display.src.js +1 -1
  312. package/modules/offline-exporting.js +15 -15
  313. package/modules/offline-exporting.js.map +1 -1
  314. package/modules/offline-exporting.src.js +17 -4
  315. package/modules/oldie-polyfills.js +1 -1
  316. package/modules/oldie-polyfills.src.js +2 -2
  317. package/modules/oldie.js +2 -2
  318. package/modules/oldie.src.js +2 -2
  319. package/modules/organization.js +1 -1
  320. package/modules/organization.js.map +1 -1
  321. package/modules/organization.src.js +66 -21
  322. package/modules/overlapping-datalabels.js +1 -1
  323. package/modules/overlapping-datalabels.src.js +1 -1
  324. package/modules/parallel-coordinates.js +1 -1
  325. package/modules/parallel-coordinates.src.js +1 -1
  326. package/modules/pareto.js +1 -1
  327. package/modules/pareto.js.map +1 -1
  328. package/modules/pareto.src.js +53 -52
  329. package/modules/pathfinder.js +3 -3
  330. package/modules/pathfinder.js.map +1 -1
  331. package/modules/pathfinder.src.js +3 -3
  332. package/modules/pattern-fill.js +1 -1
  333. package/modules/pattern-fill.src.js +2 -2
  334. package/modules/price-indicator.js +1 -1
  335. package/modules/price-indicator.src.js +2 -2
  336. package/modules/pyramid3d.js +1 -1
  337. package/modules/pyramid3d.src.js +2 -2
  338. package/modules/sankey.js +14 -14
  339. package/modules/sankey.js.map +1 -1
  340. package/modules/sankey.src.js +39 -19
  341. package/modules/series-label.js +16 -16
  342. package/modules/series-label.js.map +1 -1
  343. package/modules/series-label.src.js +17 -9
  344. package/modules/solid-gauge.js +5 -5
  345. package/modules/solid-gauge.js.map +1 -1
  346. package/modules/solid-gauge.src.js +129 -80
  347. package/modules/sonification.js +1 -1
  348. package/modules/sonification.src.js +1 -1
  349. package/modules/static-scale.js +4 -4
  350. package/modules/static-scale.js.map +1 -1
  351. package/modules/static-scale.src.js +9 -2
  352. package/modules/stock-tools.js +2 -2
  353. package/modules/stock-tools.src.js +3 -3
  354. package/modules/stock.js +146 -145
  355. package/modules/stock.js.map +1 -1
  356. package/modules/stock.src.js +105 -61
  357. package/modules/streamgraph.js +1 -1
  358. package/modules/streamgraph.src.js +12 -12
  359. package/modules/sunburst.js +40 -40
  360. package/modules/sunburst.js.map +1 -1
  361. package/modules/sunburst.src.js +30 -9
  362. package/modules/tilemap.js +1 -1
  363. package/modules/tilemap.js.map +1 -1
  364. package/modules/tilemap.src.js +59 -58
  365. package/modules/timeline.js +12 -11
  366. package/modules/timeline.js.map +1 -1
  367. package/modules/timeline.src.js +18 -13
  368. package/modules/treegrid.js +45 -43
  369. package/modules/treegrid.js.map +1 -1
  370. package/modules/treegrid.src.js +238 -139
  371. package/modules/treemap.js +1 -1
  372. package/modules/treemap.src.js +7 -7
  373. package/modules/variable-pie.js +1 -1
  374. package/modules/variable-pie.src.js +1 -1
  375. package/modules/variwide.js +1 -1
  376. package/modules/variwide.src.js +40 -40
  377. package/modules/vector.js +1 -1
  378. package/modules/vector.js.map +1 -1
  379. package/modules/vector.src.js +109 -108
  380. package/modules/venn.js +23 -23
  381. package/modules/venn.js.map +1 -1
  382. package/modules/venn.src.js +5 -3
  383. package/modules/windbarb.js +1 -1
  384. package/modules/windbarb.src.js +44 -44
  385. package/modules/wordcloud.js +10 -10
  386. package/modules/wordcloud.js.map +1 -1
  387. package/modules/wordcloud.src.js +2 -1
  388. package/modules/xrange.js +12 -12
  389. package/modules/xrange.js.map +1 -1
  390. package/modules/xrange.src.js +113 -105
  391. package/package.json +1 -1
  392. package/themes/avocado.js +21 -37
  393. package/themes/avocado.src.js +1 -1
  394. package/themes/dark-blue.js +1 -1
  395. package/themes/dark-blue.src.js +1 -1
  396. package/themes/dark-green.js +1 -1
  397. package/themes/dark-green.src.js +1 -1
  398. package/themes/dark-unica.js +1 -1
  399. package/themes/dark-unica.src.js +1 -1
  400. package/themes/gray.js +1 -1
  401. package/themes/gray.src.js +1 -1
  402. package/themes/grid-light.js +1 -1
  403. package/themes/grid-light.src.js +1 -1
  404. package/themes/grid.js +1 -1
  405. package/themes/grid.src.js +1 -1
  406. package/themes/sand-signika.js +1 -1
  407. package/themes/sand-signika.src.js +1 -1
  408. package/themes/skies.js +1 -1
  409. package/themes/skies.src.js +1 -1
  410. package/themes/sunset.js +21 -37
  411. package/themes/sunset.src.js +1 -1
  412. package/.DS_Store +0 -0
  413. package/es-modules/.DS_Store +0 -0
  414. package/es-modules/modules/annotations-legacy.src.js +0 -1977
  415. package/js/.DS_Store +0 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v7.1.1 (2019-04-09)
2
+ * @license Highcharts JS v7.1.2 (2019-06-04)
3
3
  *
4
4
  * Gantt series
5
5
  *
@@ -154,9 +154,50 @@
154
154
  merge = H.merge,
155
155
  pick = H.pick,
156
156
  wrap = H.wrap,
157
+ Chart = H.Chart,
157
158
  Axis = H.Axis,
158
159
  Tick = H.Tick;
159
160
 
161
+ var applyGridOptions = function applyGridOptions(axis) {
162
+ var options = axis.options,
163
+ gridOptions = options && isObject(options.grid) ? options.grid : {},
164
+ // TODO: Consider using cell margins defined in % of font size?
165
+ // 25 is optimal height for default fontSize (11px)
166
+ // 25 / 11 ≈ 2.28
167
+ fontSizeToCellHeightRatio = 25 / 11,
168
+ fontSize = options.labels.style.fontSize,
169
+ fontMetrics = axis.chart.renderer.fontMetrics(fontSize);
170
+
171
+ // Center-align by default
172
+ if (!options.labels) {
173
+ options.labels = {};
174
+ }
175
+ options.labels.align = pick(options.labels.align, 'center');
176
+
177
+ // @todo: Check against tickLabelPlacement between/on etc
178
+
179
+ /* Prevents adding the last tick label if the axis is not a category
180
+ axis.
181
+ Since numeric labels are normally placed at starts and ends of a
182
+ range of value, and this module makes the label point at the value,
183
+ an "extra" label would appear. */
184
+ if (!axis.categories) {
185
+ options.showLastLabel = false;
186
+ }
187
+
188
+ // Make tick marks taller, creating cell walls of a grid. Use cellHeight
189
+ // axis option if set
190
+ if (axis.horiz) {
191
+ options.tickLength = gridOptions.cellHeight ||
192
+ fontMetrics.h * fontSizeToCellHeightRatio;
193
+ }
194
+
195
+ // Prevents rotation of labels when squished, as rotating them would not
196
+ // help.
197
+ axis.labelRotation = 0;
198
+ options.labels.rotation = 0;
199
+ };
200
+
160
201
  /**
161
202
  * Set grid options for the axis labels. Requires Highcharts Gantt.
162
203
  *
@@ -273,6 +314,13 @@
273
314
  }
274
315
  }
275
316
  });
317
+
318
+ if (isOuter && isNumber(axis.columnIndex)) {
319
+ var columns = axis.linkedParent && axis.linkedParent.columns ||
320
+ axis.columns;
321
+ isOuter = columns.length === axis.columnIndex;
322
+ }
323
+
276
324
  // There were either no other axes on the same side,
277
325
  // or the other axes were not farther from the chart
278
326
  return isOuter;
@@ -310,6 +358,9 @@
310
358
 
311
359
  // Find width and height of tick
312
360
  tickHeight = label.getBBox ? label.getBBox().height : 0;
361
+ if (label.textStr && !isNumber(label.textPxLength)) {
362
+ label.textPxLength = label.getBBox().width;
363
+ }
313
364
  tickWidth = isNumber(label.textPxLength) ? label.textPxLength : 0;
314
365
 
315
366
  // Update the result if width and/or height are larger
@@ -825,8 +876,6 @@
825
876
  min = linkedMin || axis.min,
826
877
  max = linkedMax || axis.max,
827
878
  tickInterval = axis.tickInterval,
828
- moreThanMin = firstPos > min,
829
- lessThanMax = lastPos < max,
830
879
  endMoreThanMin = firstPos < min && firstPos + tickInterval > min,
831
880
  startLessThanMax = lastPos > max && lastPos - tickInterval < max;
832
881
 
@@ -835,11 +884,11 @@
835
884
  !categoryAxis &&
836
885
  (axis.horiz || axis.isLinked)
837
886
  ) {
838
- if ((moreThanMin || endMoreThanMin) && !options.startOnTick) {
887
+ if (endMoreThanMin && !options.startOnTick) {
839
888
  tickPositions[0] = min;
840
889
  }
841
890
 
842
- if ((lessThanMax || startLessThanMax) && !options.endOnTick) {
891
+ if (startLessThanMax && !options.endOnTick) {
843
892
  tickPositions[tickPositions.length - 1] = max;
844
893
  }
845
894
  }
@@ -971,122 +1020,155 @@
971
1020
  }
972
1021
  }
973
1022
 
1023
+ (axis.columns || []).forEach(function (column) {
1024
+ column.render();
1025
+ });
974
1026
  }
975
1027
  }
976
1028
  );
977
1029
 
978
- // Wraps axis init to draw cell walls on vertical axes.
979
- addEvent(Axis, 'init', function (e) {
1030
+ // Handle columns and getOffset
1031
+ var onGridAxisAfterGetOffset = function onGridAxisAfterGetOffset() {
1032
+ (this.columns || []).forEach(function (column) {
1033
+ column.getOffset();
1034
+ });
1035
+ };
1036
+
1037
+ var onGridAxisAfterInit = function onGridAxisAfterInit() {
980
1038
  var axis = this,
981
1039
  chart = axis.chart,
982
- userOptions = e.userOptions,
1040
+ userOptions = axis.userOptions,
1041
+ options = axis.options,
1042
+ gridOptions = options && isObject(options.grid) ? options.grid : {};
1043
+
1044
+ if (gridOptions.enabled) {
1045
+ applyGridOptions(axis);
1046
+
1047
+ // TODO: wrap the axis instead
1048
+ wrap(axis, 'labelFormatter', function (proceed) {
1049
+ var axis = this.axis,
1050
+ tickPos = axis.tickPositions,
1051
+ value = this.value,
1052
+ series = (axis.isLinked ? axis.linkedParent : axis)
1053
+ .series[0],
1054
+ isFirst = value === tickPos[0],
1055
+ isLast = value === tickPos[tickPos.length - 1],
1056
+ point = series && H.find(series.options.data, function (p) {
1057
+ return p[axis.isXAxis ? 'x' : 'y'] === value;
1058
+ });
1059
+
1060
+ // Make additional properties available for the
1061
+ // formatter
1062
+ this.isFirst = isFirst;
1063
+ this.isLast = isLast;
1064
+ this.point = point;
1065
+
1066
+ // Call original labelFormatter
1067
+ return proceed.call(this);
1068
+ });
1069
+ }
1070
+
1071
+ if (gridOptions.columns) {
1072
+ var columns = axis.columns = [],
1073
+ columnIndex = axis.columnIndex = 0;
1074
+
1075
+ // Handle columns, each column is a grid axis
1076
+ while (++columnIndex < gridOptions.columns.length) {
1077
+ var columnOptions = merge(
1078
+ userOptions,
1079
+ gridOptions.columns[
1080
+ gridOptions.columns.length - columnIndex - 1
1081
+ ],
1082
+ {
1083
+ linkedTo: 0,
1084
+ // Force to behave like category axis
1085
+ type: 'category'
1086
+ }
1087
+ );
1088
+
1089
+ delete columnOptions.grid.columns; // Prevent recursion
1090
+
1091
+ var column = new Axis(axis.chart, columnOptions, true);
1092
+ column.isColumn = true;
1093
+ column.columnIndex = columnIndex;
1094
+
1095
+ // Remove column axis from chart axes array, and place it
1096
+ // in the columns array.
1097
+ H.erase(chart.axes, column);
1098
+ H.erase(chart[axis.coll], column);
1099
+ columns.push(column);
1100
+ }
1101
+ }
1102
+ };
1103
+
1104
+ var onGridAxisAfterSetChartSize = function onGridAxisAfterSetChartSize() {
1105
+ this.axes.forEach(function (axis) {
1106
+ (axis.columns || []).forEach(function (column) {
1107
+ column.setAxisSize();
1108
+ column.setAxisTranslation();
1109
+ });
1110
+ });
1111
+ };
1112
+
1113
+ // Handle columns and setScale
1114
+ var onGridAxisAfterSetScale = function onGridAxisAfterSetScale() {
1115
+ (this.columns || []).forEach(function (column) {
1116
+ column.setScale();
1117
+ });
1118
+ };
1119
+
1120
+ var onGridAxisDestroy = function onGridAxisDestroy(e) {
1121
+ (this.columns || []).forEach(function (column) {
1122
+ column.destroy(e.keepEvents);
1123
+ });
1124
+ };
1125
+
1126
+ // Wraps axis init to draw cell walls on vertical axes.
1127
+ var onGridAxisInit = function onGridAxisInit(e) {
1128
+ var userOptions = e.userOptions,
983
1129
  gridOptions = (
984
1130
  (userOptions && isObject(userOptions.grid)) ?
985
1131
  userOptions.grid :
986
1132
  {}
987
- ),
988
- columnOptions,
989
- column,
990
- columnIndex,
991
- i;
992
-
993
- function applyGridOptions() {
994
- var options = axis.options,
995
- // TODO: Consider using cell margins defined in % of font size?
996
- // 25 is optimal height for default fontSize (11px)
997
- // 25 / 11 ≈ 2.28
998
- fontSizeToCellHeightRatio = 25 / 11,
999
- fontSize = options.labels.style.fontSize,
1000
- fontMetrics = axis.chart.renderer.fontMetrics(fontSize);
1001
-
1002
- // Center-align by default
1003
- if (!options.labels) {
1004
- options.labels = {};
1005
- }
1006
- options.labels.align = pick(options.labels.align, 'center');
1007
-
1008
- // @todo: Check against tickLabelPlacement between/on etc
1009
-
1010
- /* Prevents adding the last tick label if the axis is not a category
1011
- axis.
1012
- Since numeric labels are normally placed at starts and ends of a
1013
- range of value, and this module makes the label point at the value,
1014
- an "extra" label would appear. */
1015
- if (!axis.categories) {
1016
- options.showLastLabel = false;
1017
- }
1018
-
1019
- // Make tick marks taller, creating cell walls of a grid. Use cellHeight
1020
- // axis option if set
1021
- if (axis.horiz) {
1022
- options.tickLength = gridOptions.cellHeight ||
1023
- fontMetrics.h * fontSizeToCellHeightRatio;
1024
- }
1025
-
1026
- // Prevents rotation of labels when squished, as rotating them would not
1027
- // help.
1028
- axis.labelRotation = 0;
1029
- options.labels.rotation = 0;
1030
- }
1133
+ );
1031
1134
 
1032
- if (gridOptions.enabled) {
1033
- if (defined(gridOptions.borderColor)) {
1034
- userOptions.tickColor =
1035
- userOptions.lineColor = gridOptions.borderColor;
1036
- }
1135
+ if (gridOptions.enabled && defined(gridOptions.borderColor)) {
1136
+ userOptions.tickColor = userOptions.lineColor = gridOptions.borderColor;
1137
+ }
1138
+ };
1037
1139
 
1038
- // Handle columns, each column is a grid axis
1039
- if (isArray(gridOptions.columns)) {
1040
- columnIndex = 0;
1041
- i = gridOptions.columns.length;
1042
- while (i--) {
1043
- columnOptions = merge(
1044
- userOptions,
1045
- gridOptions.columns[i],
1046
- {
1047
- // Force to behave like category axis
1048
- type: 'category'
1049
- }
1050
- );
1140
+ var onGridAxisAfterSetOptions = function onGridAxisAfterSetOptions(e) {
1141
+ var axis = this,
1142
+ userOptions = e.userOptions,
1143
+ gridOptions = (
1144
+ (userOptions && isObject(userOptions.grid)) ?
1145
+ userOptions.grid :
1146
+ {}
1147
+ ),
1148
+ columns = gridOptions.columns;
1051
1149
 
1052
- delete columnOptions.grid.columns; // Prevent recursion
1053
-
1054
- column = new Axis(axis.chart, columnOptions);
1055
- column.isColumn = true;
1056
- column.columnIndex = columnIndex;
1057
-
1058
- wrap(column, 'labelFormatter', function (proceed) {
1059
- var axis = this.axis,
1060
- tickPos = axis.tickPositions,
1061
- value = this.value,
1062
- series = axis.series[0],
1063
- isFirst = value === tickPos[0],
1064
- isLast = value === tickPos[tickPos.length - 1],
1065
- point = H.find(series.options.data, function (p) {
1066
- return p[axis.isXAxis ? 'x' : 'y'] === value;
1067
- });
1150
+ // Add column options to the parent axis.
1151
+ // Children has their column options set on init in onGridAxisAfterInit.
1152
+ if (gridOptions.enabled && columns) {
1153
+ merge(true, axis.options, columns[columns.length - 1]);
1154
+ }
1155
+ };
1068
1156
 
1069
- // Make additional properties available for the formatter
1070
- this.isFirst = isFirst;
1071
- this.isLast = isLast;
1072
- this.point = point;
1073
1157
 
1074
- // Call original labelFormatter
1075
- return proceed.call(this);
1076
- });
1158
+ var axisEvents = {
1159
+ afterGetOffset: onGridAxisAfterGetOffset,
1160
+ afterInit: onGridAxisAfterInit,
1161
+ afterSetOptions: onGridAxisAfterSetOptions,
1162
+ afterSetScale: onGridAxisAfterSetScale,
1163
+ destroy: onGridAxisDestroy,
1164
+ init: onGridAxisInit
1165
+ };
1077
1166
 
1078
- columnIndex++;
1079
- }
1080
- // This axis should not be shown, instead the column axes take over
1081
- addEvent(this, 'afterInit', function () {
1082
- H.erase(chart.axes, this);
1083
- H.erase(chart[axis.coll], this);
1084
- });
1085
- } else {
1086
- addEvent(this, 'afterInit', applyGridOptions);
1087
- }
1088
- }
1167
+ // Add event handlers
1168
+ Object.keys(axisEvents).forEach(function (event) {
1169
+ addEvent(Axis, event, axisEvents[event]);
1089
1170
  });
1171
+ addEvent(Chart, 'afterSetChartSize', onGridAxisAfterSetChartSize);
1090
1172
 
1091
1173
  });
1092
1174
  _registerModule(_modules, 'modules/static-scale.src.js', [_modules['parts/Globals.js']], function (H) {
@@ -1119,10 +1201,17 @@
1119
1201
  */
1120
1202
 
1121
1203
  H.addEvent(H.Axis, 'afterSetOptions', function () {
1204
+ var chartOptions = this.chart.options && this.chart.options.chart;
1122
1205
  if (
1123
1206
  !this.horiz &&
1124
1207
  H.isNumber(this.options.staticScale) &&
1125
- !this.chart.options.chart.height
1208
+ (
1209
+ !chartOptions.height ||
1210
+ (
1211
+ chartOptions.scrollablePlotArea &&
1212
+ chartOptions.scrollablePlotArea.minHeight
1213
+ )
1214
+ )
1126
1215
  ) {
1127
1216
  this.staticScale = this.options.staticScale;
1128
1217
  }
@@ -1594,7 +1683,7 @@
1594
1683
  return result;
1595
1684
  });
1596
1685
  _registerModule(_modules, 'modules/broken-axis.src.js', [_modules['parts/Globals.js']], function (H) {
1597
- /**
1686
+ /* *
1598
1687
  * (c) 2009-2019 Torstein Honsi
1599
1688
  *
1600
1689
  * License: www.highcharts.com/license
@@ -2612,6 +2701,19 @@
2612
2701
  removeFoundExtremesEvent,
2613
2702
  uniqueNames = options.uniqueNames,
2614
2703
  numberOfSeries = 0,
2704
+ isDirty,
2705
+ data,
2706
+ treeGrid;
2707
+ // Check whether any of series is rendering for the first time,
2708
+ // visibility has changed, or its data is dirty,
2709
+ // and only then update. #10570, #10580
2710
+ isDirty = axis.series.some(function (series) {
2711
+ return !series.hasRendered ||
2712
+ series.isDirtyData ||
2713
+ series.isDirty;
2714
+ });
2715
+
2716
+ if (isDirty) {
2615
2717
  // Concatenate data from all series assigned to this axis.
2616
2718
  data = axis.series.reduce(function (arr, s) {
2617
2719
  if (s.visible) {
@@ -2631,7 +2733,7 @@
2631
2733
  }
2632
2734
  }
2633
2735
  return arr;
2634
- }, []),
2736
+ }, []);
2635
2737
  // setScale is fired after all the series is initialized,
2636
2738
  // which is an ideal time to update the axis.categories.
2637
2739
  treeGrid = getTreeGridFromData(
@@ -2640,48 +2742,52 @@
2640
2742
  (uniqueNames === true) ? numberOfSeries : 1
2641
2743
  );
2642
2744
 
2643
- // Assign values to the axis.
2644
- axis.categories = treeGrid.categories;
2645
- axis.mapOfPosToGridNode = treeGrid.mapOfPosToGridNode;
2646
- axis.hasNames = true;
2647
- axis.tree = treeGrid.tree;
2648
-
2649
- // Update yData now that we have calculated the y values
2650
- axis.series.forEach(function (series) {
2651
- var data = series.options.data.map(function (d) {
2652
- return isObject(d) ? merge(d) : d;
2653
- });
2654
-
2655
- // Avoid destroying points when series is not visible
2656
- if (series.visible) {
2657
- series.setData(data, false);
2658
- }
2659
- });
2745
+ // Assign values to the axis.
2746
+ axis.categories = treeGrid.categories;
2747
+ axis.mapOfPosToGridNode = treeGrid.mapOfPosToGridNode;
2748
+ axis.hasNames = true;
2749
+ axis.tree = treeGrid.tree;
2660
2750
 
2661
- // Calculate the label options for each level in the tree.
2662
- axis.mapOptionsToLevel = getLevelOptions({
2663
- defaults: labelOptions,
2664
- from: 1,
2665
- levels: labelOptions.levels,
2666
- to: axis.tree.height
2667
- });
2751
+ // Update yData now that we have calculated the y values
2752
+ axis.series.forEach(function (series) {
2753
+ var data = series.options.data.map(function (d) {
2754
+ return isObject(d) ? merge(d) : d;
2755
+ });
2668
2756
 
2669
- // Collapse all the nodes belonging to a point where collapsed
2670
- // equals true.
2671
- // Can be called from beforeRender, if getBreakFromNode removes
2672
- // its dependency on axis.max.
2673
- removeFoundExtremesEvent =
2674
- H.addEvent(axis, 'foundExtremes', function () {
2675
- treeGrid.collapsedNodes.forEach(function (node) {
2676
- var breaks = collapse(axis, node);
2757
+ // Avoid destroying points when series is not visible
2758
+ if (series.visible) {
2759
+ series.setData(data, false);
2760
+ }
2761
+ });
2677
2762
 
2678
- axis.setBreaks(breaks, false);
2679
- });
2680
- removeFoundExtremesEvent();
2763
+ // Calculate the label options for each level in the tree.
2764
+ axis.mapOptionsToLevel = getLevelOptions({
2765
+ defaults: labelOptions,
2766
+ from: 1,
2767
+ levels: labelOptions.levels,
2768
+ to: axis.tree.height
2681
2769
  });
2770
+
2771
+ // Collapse all the nodes belonging to a point where collapsed
2772
+ // equals true. Only do this on init.
2773
+ // Can be called from beforeRender, if getBreakFromNode removes
2774
+ // its dependency on axis.max.
2775
+ if (e.type === 'beforeRender') {
2776
+ removeFoundExtremesEvent =
2777
+ H.addEvent(axis, 'foundExtremes', function () {
2778
+ treeGrid.collapsedNodes.forEach(function (node) {
2779
+ var breaks = collapse(axis, node);
2780
+
2781
+ axis.setBreaks(breaks, false);
2782
+ });
2783
+ removeFoundExtremesEvent();
2784
+ });
2785
+ }
2786
+ }
2682
2787
  });
2683
2788
  };
2684
2789
 
2790
+
2685
2791
  override(GridAxis.prototype, {
2686
2792
  init: function (proceed, chart, userOptions) {
2687
2793
  var axis = this,
@@ -3403,8 +3509,8 @@
3403
3509
  // If we are going back again, switch direction to get around start
3404
3510
  // obstacle.
3405
3511
  if (
3406
- waypoint[dir] > start[dir] === // Going towards max from start
3407
- waypoint[dir] > endPoint[dir] // Going towards min to end
3512
+ waypoint[dir] >= start[dir] === // Going towards max from start
3513
+ waypoint[dir] >= endPoint[dir] // Going towards min to end
3408
3514
  ) {
3409
3515
  dir = dir === 'y' ? 'x' : 'y';
3410
3516
  useMax = start[dir] < end[dir];
@@ -5593,10 +5699,9 @@
5593
5699
  if (isObject(amount)) {
5594
5700
  amount = amount.amount;
5595
5701
  }
5596
- if (!defined(amount)) {
5597
- amount = 0;
5702
+ if (isNumber(amount) && amount > 0) {
5703
+ return correctFloat(amount * 100) + '%';
5598
5704
  }
5599
- return correctFloat(amount * 100) + '%';
5600
5705
  },
5601
5706
  /** @ignore-option */
5602
5707
  inside: true,
@@ -5624,15 +5729,16 @@
5624
5729
  cropShoulder: 1,
5625
5730
  getExtremesFromAll: true,
5626
5731
  autoIncrement: H.noop,
5732
+ buildKDTree: H.noop,
5627
5733
  /**
5628
- * Borrow the column series metrics, but with swapped axes. This gives free
5629
- * access to features like groupPadding, grouping, pointWidth etc.
5630
- *
5631
- * @private
5632
- * @function Higcharts.Series#getColumnMetrics
5633
- *
5634
- * @return {Highcharts.ColumnMetricsObject}
5635
- */
5734
+ * Borrow the column series metrics, but with swapped axes. This gives
5735
+ * free access to features like groupPadding, grouping, pointWidth etc.
5736
+ *
5737
+ * @private
5738
+ * @function Higcharts.Series#getColumnMetrics
5739
+ *
5740
+ * @return {Highcharts.ColumnMetricsObject}
5741
+ */
5636
5742
  getColumnMetrics: function () {
5637
5743
  var metrics,
5638
5744
  chart = this.chart;
@@ -5656,24 +5762,24 @@
5656
5762
  },
5657
5763
 
5658
5764
  /**
5659
- * Override cropData to show a point where x or x2 is outside visible range,
5660
- * but one of them is inside.
5661
- *
5662
- * @private
5663
- * @function Highcharts.Series#cropData
5664
- *
5665
- * @param {Array<number>} xData
5666
- *
5667
- * @param {Array<number>} yData
5668
- *
5669
- * @param {number} min
5670
- *
5671
- * @param {number} max
5672
- *
5673
- * @param {number} [cropShoulder]
5674
- *
5675
- * @return {*}
5676
- */
5765
+ * Override cropData to show a point where x or x2 is outside visible
5766
+ * range, but one of them is inside.
5767
+ *
5768
+ * @private
5769
+ * @function Highcharts.Series#cropData
5770
+ *
5771
+ * @param {Array<number>} xData
5772
+ *
5773
+ * @param {Array<number>} yData
5774
+ *
5775
+ * @param {number} min
5776
+ *
5777
+ * @param {number} max
5778
+ *
5779
+ * @param {number} [cropShoulder]
5780
+ *
5781
+ * @return {*}
5782
+ */
5677
5783
  cropData: function (xData, yData, min, max) {
5678
5784
 
5679
5785
  // Replace xData with x2Data to find the appropriate cropStart
@@ -5731,11 +5837,11 @@
5731
5837
  return pointIndex;
5732
5838
  },
5733
5839
  /**
5734
- * @private
5735
- * @function Highcharts.Series#translatePoint
5736
- *
5737
- * @param {Highcharts.Point} point
5738
- */
5840
+ * @private
5841
+ * @function Highcharts.Series#translatePoint
5842
+ *
5843
+ * @param {Highcharts.Point} point
5844
+ */
5739
5845
  translatePoint: function (point) {
5740
5846
  var series = this,
5741
5847
  xAxis = series.xAxis,
@@ -5874,9 +5980,9 @@
5874
5980
  },
5875
5981
 
5876
5982
  /**
5877
- * @private
5878
- * @function Highcharts.Series#translate
5879
- */
5983
+ * @private
5984
+ * @function Highcharts.Series#translate
5985
+ */
5880
5986
  translate: function () {
5881
5987
  columnType.prototype.translate.apply(this, arguments);
5882
5988
  this.points.forEach(function (point) {
@@ -5885,20 +5991,20 @@
5885
5991
  },
5886
5992
 
5887
5993
  /**
5888
- * Draws a single point in the series. Needed for partial fill.
5889
- *
5890
- * This override turns point.graphic into a group containing the original
5891
- * graphic and an overlay displaying the partial fill.
5892
- *
5893
- * @private
5894
- * @function Highcharts.Series#drawPoint
5895
- *
5896
- * @param {Highcharts.Point} point
5897
- * An instance of Point in the series.
5898
- *
5899
- * @param {"animate"|"attr"} verb
5900
- * 'animate' (animates changes) or 'attr' (sets options)
5901
- */
5994
+ * Draws a single point in the series. Needed for partial fill.
5995
+ *
5996
+ * This override turns point.graphic into a group containing the
5997
+ * original graphic and an overlay displaying the partial fill.
5998
+ *
5999
+ * @private
6000
+ * @function Highcharts.Series#drawPoint
6001
+ *
6002
+ * @param {Highcharts.Point} point
6003
+ * An instance of Point in the series.
6004
+ *
6005
+ * @param {"animate"|"attr"} verb
6006
+ * 'animate' (animates changes) or 'attr' (sets options)
6007
+ */
5902
6008
  drawPoint: function (point, verb) {
5903
6009
  var series = this,
5904
6010
  seriesOpts = series.options,
@@ -5912,7 +6018,7 @@
5912
6018
  cutOff = seriesOpts.stacking && !seriesOpts.borderRadius,
5913
6019
  pointState = point.state,
5914
6020
  stateOpts = seriesOpts.states[pointState || 'normal'] || {},
5915
- attrOrAnim = pointState === undefined ? 'attr' : 'animate',
6021
+ pointStateVerb = pointState === undefined ? 'attr' : verb,
5916
6022
  pointAttr = series.pointAttribs(point, pointState),
5917
6023
  animation = pick(
5918
6024
  series.chart.options.chart.animation,
@@ -5942,7 +6048,7 @@
5942
6048
  point.graphicOverlay[verb](
5943
6049
  merge(partShapeArgs)
5944
6050
  );
5945
- point.clipRect.animate(
6051
+ point.clipRect[verb](
5946
6052
  merge(clipRectArgs)
5947
6053
  );
5948
6054
 
@@ -5965,8 +6071,11 @@
5965
6071
 
5966
6072
  // Presentational
5967
6073
  if (!series.chart.styledMode) {
5968
- point.graphicOriginal
5969
- .animate(pointAttr, animation)
6074
+ point
6075
+ .graphicOriginal[verb](
6076
+ pointAttr,
6077
+ animation
6078
+ )
5970
6079
  .shadow(seriesOpts.shadow, null, cutOff);
5971
6080
 
5972
6081
  if (partShapeArgs) {
@@ -5988,7 +6097,11 @@
5988
6097
  );
5989
6098
 
5990
6099
  pointAttr.fill = fill;
5991
- point.graphicOverlay[attrOrAnim](pointAttr, animation)
6100
+ point
6101
+ .graphicOverlay[pointStateVerb](
6102
+ pointAttr,
6103
+ animation
6104
+ )
5992
6105
  .shadow(seriesOpts.shadow, null, cutOff);
5993
6106
  }
5994
6107
  }
@@ -5999,9 +6112,9 @@
5999
6112
  },
6000
6113
 
6001
6114
  /**
6002
- * @private
6003
- * @function Highcharts.Series#drawPoints
6004
- */
6115
+ * @private
6116
+ * @function Highcharts.Series#drawPoints
6117
+ */
6005
6118
  drawPoints: function () {
6006
6119
  var series = this,
6007
6120
  verb = series.getAnimationVerb();
@@ -6014,14 +6127,14 @@
6014
6127
 
6015
6128
 
6016
6129
  /**
6017
- * Returns "animate", or "attr" if the number of points is above the
6018
- * animation limit.
6019
- *
6020
- * @private
6021
- * @function Highcharts.Series#getAnimationVerb
6022
- *
6023
- * @return {string}
6024
- */
6130
+ * Returns "animate", or "attr" if the number of points is above the
6131
+ * animation limit.
6132
+ *
6133
+ * @private
6134
+ * @function Highcharts.Series#getAnimationVerb
6135
+ *
6136
+ * @return {string}
6137
+ */
6025
6138
  getAnimationVerb: function () {
6026
6139
  return (
6027
6140
  this.chart.pointCount < (this.options.animationLimit || 250) ?
@@ -6031,26 +6144,27 @@
6031
6144
  }
6032
6145
 
6033
6146
  /*
6034
- // Override to remove stroke from points. For partial fill.
6035
- pointAttribs: function () {
6036
- var series = this,
6037
- retVal = columnType.prototype.pointAttribs.apply(series, arguments);
6147
+ // Override to remove stroke from points. For partial fill.
6148
+ pointAttribs: function () {
6149
+ var series = this,
6150
+ retVal = columnType.prototype.pointAttribs
6151
+ .apply(series, arguments);
6038
6152
 
6039
- //retVal['stroke-width'] = 0;
6040
- return retVal;
6041
- }
6042
- //*/
6153
+ //retVal['stroke-width'] = 0;
6154
+ return retVal;
6155
+ }
6156
+ //*/
6043
6157
 
6044
6158
  }, { // Point class properties
6045
- /**
6046
- * Extend applyOptions so that `colorByPoint` for x-range means that one
6047
- * color is applied per Y axis category.
6048
- *
6049
- * @private
6050
- * @function Highcharts.Point#applyOptions
6051
- *
6052
- * @return {Highcharts.Series}
6053
- */
6159
+ /**
6160
+ * Extend applyOptions so that `colorByPoint` for x-range means that one
6161
+ * color is applied per Y axis category.
6162
+ *
6163
+ * @private
6164
+ * @function Highcharts.Point#applyOptions
6165
+ *
6166
+ * @return {Highcharts.Series}
6167
+ */
6054
6168
  resolveColor: function () {
6055
6169
  var series = this.series,
6056
6170
  colorByPoint;
@@ -6071,13 +6185,13 @@
6071
6185
 
6072
6186
  },
6073
6187
  /**
6074
- * Extend init to have y default to 0.
6075
- *
6076
- * @private
6077
- * @function Highcharts.Point#init
6078
- *
6079
- * @return {Highcharts.Series}
6080
- */
6188
+ * Extend init to have y default to 0.
6189
+ *
6190
+ * @private
6191
+ * @function Highcharts.Point#init
6192
+ *
6193
+ * @return {Highcharts.Series}
6194
+ */
6081
6195
  init: function () {
6082
6196
  Point.prototype.init.apply(this, arguments);
6083
6197
 
@@ -6089,9 +6203,9 @@
6089
6203
  },
6090
6204
 
6091
6205
  /**
6092
- * @private
6093
- * @function Highcharts.Point#setState
6094
- */
6206
+ * @private
6207
+ * @function Highcharts.Point#setState
6208
+ */
6095
6209
  setState: function () {
6096
6210
  Point.prototype.setState.apply(this, arguments);
6097
6211
 
@@ -6099,11 +6213,11 @@
6099
6213
  },
6100
6214
 
6101
6215
  /**
6102
- * @private
6103
- * @function Highcharts.Point#getLabelConfig
6104
- *
6105
- * @return {Highcharts.PointLabelObject}
6106
- */
6216
+ * @private
6217
+ * @function Highcharts.Point#getLabelConfig
6218
+ *
6219
+ * @return {Highcharts.PointLabelObject}
6220
+ */
6107
6221
  // Add x2 and yCategory to the available properties for tooltip formats
6108
6222
  getLabelConfig: function () {
6109
6223
  var point = this,
@@ -6117,11 +6231,11 @@
6117
6231
  tooltipDateKeys: ['x', 'x2'],
6118
6232
 
6119
6233
  /**
6120
- * @private
6121
- * @function Highcharts.Point#isValid
6122
- *
6123
- * @return {boolean}
6124
- */
6234
+ * @private
6235
+ * @function Highcharts.Point#isValid
6236
+ *
6237
+ * @return {boolean}
6238
+ */
6125
6239
  isValid: function () {
6126
6240
  return typeof this.x === 'number' &&
6127
6241
  typeof this.x2 === 'number';
@@ -6276,13 +6390,11 @@
6276
6390
 
6277
6391
 
6278
6392
  var dateFormat = H.dateFormat,
6279
- isObject = H.isObject,
6280
6393
  isNumber = H.isNumber,
6281
6394
  merge = H.merge,
6282
6395
  pick = H.pick,
6283
6396
  seriesType = H.seriesType,
6284
6397
  seriesTypes = H.seriesTypes,
6285
- stop = H.stop,
6286
6398
  Series = H.Series,
6287
6399
  parent = seriesTypes.xrange;
6288
6400
 
@@ -6310,19 +6422,7 @@
6310
6422
 
6311
6423
  dataLabels: {
6312
6424
  /** @ignore-option */
6313
- enabled: true,
6314
- /** @ignore-option */
6315
- formatter: function () {
6316
- var point = this,
6317
- amount = point.point.partialFill;
6318
-
6319
- if (isObject(amount)) {
6320
- amount = amount.amount;
6321
- }
6322
- if (isNumber(amount) && amount > 0) {
6323
- return (amount * 100) + '%';
6324
- }
6325
- }
6425
+ enabled: true
6326
6426
  },
6327
6427
  tooltip: {
6328
6428
  headerFormat: '<span style="font-size: 10px">{series.name}</span><br/>',
@@ -6332,12 +6432,10 @@
6332
6432
  series = point.series,
6333
6433
  tooltip = series.chart.tooltip,
6334
6434
  xAxis = series.xAxis,
6335
- options = xAxis.options,
6336
- formats = options.dateTimeLabelFormats,
6435
+ formats = series.tooltipOptions.dateTimeLabelFormats,
6337
6436
  startOfWeek = xAxis.options.startOfWeek,
6338
6437
  ttOptions = series.tooltipOptions,
6339
6438
  format = ttOptions.xDateFormat,
6340
- range = point.end ? point.end - point.start : 0,
6341
6439
  start,
6342
6440
  end,
6343
6441
  milestone = point.options.milestone,
@@ -6350,7 +6448,7 @@
6350
6448
  if (!format) {
6351
6449
  format = H.splat(
6352
6450
  tooltip.getDateFormat(
6353
- range,
6451
+ xAxis.closestPointRange,
6354
6452
  point.start,
6355
6453
  startOfWeek,
6356
6454
  formats
@@ -6367,7 +6465,7 @@
6367
6465
  retVal += 'Start: ' + start + '<br/>';
6368
6466
  retVal += 'End: ' + end + '<br/>';
6369
6467
  } else {
6370
- retVal += 'Date ' + start + '<br/>';
6468
+ retVal += start + '<br/>';
6371
6469
  }
6372
6470
 
6373
6471
  return retVal;
@@ -6456,7 +6554,6 @@
6456
6554
  );
6457
6555
 
6458
6556
  if (graphic) {
6459
- stop(graphic);
6460
6557
  graphic[verb]({
6461
6558
  d: diamondShape
6462
6559
  });
@@ -6524,6 +6621,19 @@
6524
6621
  retVal = parent.prototype.pointClass.prototype.applyOptions
6525
6622
  .call(point, retVal, x);
6526
6623
  return retVal;
6624
+ },
6625
+ isValid: function () {
6626
+ return (
6627
+ (
6628
+ typeof this.start === 'number' ||
6629
+ typeof this.x === 'number'
6630
+ ) &&
6631
+ (
6632
+ typeof this.end === 'number' ||
6633
+ typeof this.x2 === 'number' ||
6634
+ this.milestone
6635
+ )
6636
+ );
6527
6637
  }
6528
6638
  }));
6529
6639
 
@@ -7865,7 +7975,9 @@
7865
7975
  pick(axis.dataMax, axis.max) // #6930
7866
7976
  ),
7867
7977
  scrollbar = axis.scrollbar,
7868
- titleOffset = axis.titleOffset || 0,
7978
+ offset = axis.axisTitleMargin + (axis.titleOffset || 0),
7979
+ scrollbarsOffsets = axis.chart.scrollbarsOffsets,
7980
+ axisMargin = axis.options.margin || 0,
7869
7981
  offsetsIndex,
7870
7982
  from,
7871
7983
  to;
@@ -7873,49 +7985,62 @@
7873
7985
  if (scrollbar) {
7874
7986
 
7875
7987
  if (axis.horiz) {
7988
+
7989
+ // Reserve space for labels/title
7990
+ if (!axis.opposite) {
7991
+ scrollbarsOffsets[1] += offset;
7992
+ }
7993
+
7876
7994
  scrollbar.position(
7877
7995
  axis.left,
7878
- axis.top + axis.height + 2 +
7879
- axis.chart.scrollbarsOffsets[1] +
7880
- (axis.opposite ?
7881
- 0 :
7882
- titleOffset + axis.axisTitleMargin + axis.offset
7883
- ),
7996
+ axis.top + axis.height + 2 + scrollbarsOffsets[1] -
7997
+ (axis.opposite ? axisMargin : 0),
7884
7998
  axis.width,
7885
7999
  axis.height
7886
8000
  );
8001
+
8002
+ // Next scrollbar should reserve space for margin (if set)
8003
+ if (!axis.opposite) {
8004
+ scrollbarsOffsets[1] += axisMargin;
8005
+ }
8006
+
7887
8007
  offsetsIndex = 1;
7888
8008
  } else {
8009
+
8010
+ // Reserve space for labels/title
8011
+ if (axis.opposite) {
8012
+ scrollbarsOffsets[0] += offset;
8013
+ }
8014
+
7889
8015
  scrollbar.position(
7890
- axis.left + axis.width + 2 +
7891
- axis.chart.scrollbarsOffsets[0] +
7892
- (axis.opposite ?
7893
- titleOffset + axis.axisTitleMargin + axis.offset :
7894
- 0
7895
- ),
8016
+ axis.left + axis.width + 2 + scrollbarsOffsets[0] -
8017
+ (axis.opposite ? 0 : axisMargin),
7896
8018
  axis.top,
7897
8019
  axis.width,
7898
8020
  axis.height
7899
8021
  );
8022
+
8023
+ // Next scrollbar should reserve space for margin (if set)
8024
+ if (axis.opposite) {
8025
+ scrollbarsOffsets[0] += axisMargin;
8026
+ }
8027
+
7900
8028
  offsetsIndex = 0;
7901
8029
  }
7902
8030
 
7903
- if (
7904
- (!axis.opposite && !axis.horiz) || (axis.opposite && axis.horiz)
7905
- ) {
7906
- axis.chart.scrollbarsOffsets[offsetsIndex] +=
7907
- axis.scrollbar.size + axis.scrollbar.options.margin;
7908
- }
8031
+ scrollbarsOffsets[offsetsIndex] += scrollbar.size +
8032
+ scrollbar.options.margin;
7909
8033
 
7910
8034
  if (
7911
8035
  isNaN(scrollMin) ||
7912
8036
  isNaN(scrollMax) ||
7913
8037
  !defined(axis.min) ||
7914
- !defined(axis.max)
8038
+ !defined(axis.max) ||
8039
+ axis.min === axis.max // #10733
7915
8040
  ) {
7916
- // default action: when there is not extremes on the axis, but
7917
- // scrollbar exists, make it full size
7918
- scrollbar.setRange(0, 0);
8041
+ // default action: when extremes are the same or there is not
8042
+ // extremes on the axis, but scrollbar exists, make it full size
8043
+ scrollbar.setRange(0, 1);
7919
8044
  } else {
7920
8045
  from = (axis.min - scrollMin) / (scrollMax - scrollMin);
7921
8046
  to = (axis.max - scrollMin) / (scrollMax - scrollMin);
@@ -9183,13 +9308,15 @@
9183
9308
  };
9184
9309
  // Hide away the input box
9185
9310
  input.onblur = function () {
9311
+ // update extermes only when inputs are active
9186
9312
  if (input === H.doc.activeElement) { // Only when focused
9187
9313
  // Update also when no `change` event is triggered, like when
9188
9314
  // clicking inside the SVG (#4710)
9189
9315
  updateExtremes();
9190
- rangeSelector.hideInput(name);
9191
- input.blur(); // #4606
9192
9316
  }
9317
+ // #10404 - move hide and blur outside focus
9318
+ rangeSelector.hideInput(name);
9319
+ input.blur(); // #4606
9193
9320
  };
9194
9321
 
9195
9322
  // handle changes in the input boxes
@@ -9769,7 +9896,7 @@
9769
9896
  time.set(timeName, date, basePeriod + count);
9770
9897
 
9771
9898
  if (basePeriod === time.get(timeName, date)) {
9772
- date.setDate(0); // #6537
9899
+ time.set('Date', date, 0); // #6537
9773
9900
  }
9774
9901
 
9775
9902
  return date.getTime() - base;