highcharts-rails 6.0.0 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.markdown +7 -0
  3. data/Rakefile +9 -1
  4. data/app/assets/javascripts/highcharts.js +67 -48
  5. data/app/assets/javascripts/highcharts/highcharts-3d.js +1 -1
  6. data/app/assets/javascripts/highcharts/highcharts-more.js +13 -10
  7. data/app/assets/javascripts/highcharts/modules/accessibility.js +1 -1
  8. data/app/assets/javascripts/highcharts/modules/annotations.js +1 -1
  9. data/app/assets/javascripts/highcharts/modules/boost-canvas.js +1 -1
  10. data/app/assets/javascripts/highcharts/modules/boost.js +6 -3
  11. data/app/assets/javascripts/highcharts/modules/broken-axis.js +1 -1
  12. data/app/assets/javascripts/highcharts/modules/bullet.js +1 -1
  13. data/app/assets/javascripts/highcharts/modules/data.js +1 -1
  14. data/app/assets/javascripts/highcharts/modules/drag-panes.js +14 -5
  15. data/app/assets/javascripts/highcharts/modules/drilldown.js +1 -1
  16. data/app/assets/javascripts/highcharts/modules/export-data.js +1 -1
  17. data/app/assets/javascripts/highcharts/modules/exporting.js +1 -1
  18. data/app/assets/javascripts/highcharts/modules/funnel.js +1 -1
  19. data/app/assets/javascripts/highcharts/modules/gantt.js +1 -1
  20. data/app/assets/javascripts/highcharts/modules/grid-axis.js +1 -1
  21. data/app/assets/javascripts/highcharts/modules/heatmap.js +1 -1
  22. data/app/assets/javascripts/highcharts/modules/histogram-bellcurve.js +1 -1
  23. data/app/assets/javascripts/highcharts/modules/item-series.js +1 -1
  24. data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +1 -1
  25. data/app/assets/javascripts/highcharts/modules/offline-exporting.js +2 -2
  26. data/app/assets/javascripts/highcharts/modules/oldie.js +2 -14
  27. data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +1 -1
  28. data/app/assets/javascripts/highcharts/modules/parallel-coordinates.js +1 -1
  29. data/app/assets/javascripts/highcharts/modules/pareto.js +1 -1
  30. data/app/assets/javascripts/highcharts/modules/sankey.js +1 -1
  31. data/app/assets/javascripts/highcharts/modules/series-label.js +1 -1
  32. data/app/assets/javascripts/highcharts/modules/solid-gauge.js +1 -1
  33. data/app/assets/javascripts/highcharts/modules/static-scale.js +1 -1
  34. data/app/assets/javascripts/highcharts/modules/stock.js +57 -84
  35. data/app/assets/javascripts/highcharts/modules/streamgraph.js +1 -1
  36. data/app/assets/javascripts/highcharts/modules/sunburst.js +1 -1
  37. data/app/assets/javascripts/highcharts/modules/tilemap.js +1 -1
  38. data/app/assets/javascripts/highcharts/modules/treemap.js +1 -1
  39. data/app/assets/javascripts/highcharts/modules/variable-pie.js +1 -1
  40. data/app/assets/javascripts/highcharts/modules/variwide.js +1 -1
  41. data/app/assets/javascripts/highcharts/modules/vector.js +1 -1
  42. data/app/assets/javascripts/highcharts/modules/windbarb.js +1 -1
  43. data/app/assets/javascripts/highcharts/modules/wordcloud.js +1 -1
  44. data/app/assets/javascripts/highcharts/modules/xrange.js +1 -1
  45. data/app/assets/javascripts/highcharts/themes/avocado.js +1 -1
  46. data/app/assets/javascripts/highcharts/themes/dark-blue.js +1 -1
  47. data/app/assets/javascripts/highcharts/themes/dark-green.js +1 -1
  48. data/app/assets/javascripts/highcharts/themes/dark-unica.js +1 -1
  49. data/app/assets/javascripts/highcharts/themes/gray.js +1 -1
  50. data/app/assets/javascripts/highcharts/themes/grid-light.js +1 -1
  51. data/app/assets/javascripts/highcharts/themes/grid.js +1 -1
  52. data/app/assets/javascripts/highcharts/themes/sand-signika.js +1 -1
  53. data/app/assets/javascripts/highcharts/themes/skies.js +1 -1
  54. data/app/assets/javascripts/highcharts/themes/sunset.js +1 -1
  55. data/lib/highcharts/version.rb +1 -1
  56. metadata +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Accessibility module
4
4
  *
5
5
  * (c) 2010-2017 Highsoft AS
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Annotations module
4
4
  *
5
5
  * (c) 2009-2017 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Boost module
4
4
  *
5
5
  * (c) 2010-2017 Highsoft AS
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Boost module
4
4
  *
5
5
  * (c) 2010-2017 Highsoft AS
@@ -243,8 +243,11 @@
243
243
  /**
244
244
  * Set the point threshold for when a series should enter boost mode.
245
245
  *
246
- * Setting it to e.g. 2000 will cause the series to enter boost mode
247
- * when there are 2000 or more points in the series.
246
+ * Setting it to e.g. 2000 will cause the series to enter boost mode when there
247
+ * are 2000 or more points in the series.
248
+ *
249
+ * To disable boosting on the series, set the `boostThreshold` to 0. Setting it
250
+ * to 1 will force boosting.
248
251
  *
249
252
  * Requires `modules/boost.js`.
250
253
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  *
4
4
  * (c) 2009-2017 Torstein Honsi
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  *
4
4
  * Bullet graph series type for Highcharts
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Data module
4
4
  *
5
5
  * (c) 2012-2017 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Drag-panes module
4
4
  *
5
5
  * (c) 2010-2017 Highsoft AS
@@ -38,8 +38,6 @@
38
38
 
39
39
  /**
40
40
  * Default options for AxisResizer.
41
- * @product highstock
42
- * @optionparent yAxis
43
41
  */
44
42
  resizerOptions = {
45
43
  /**
@@ -48,8 +46,12 @@
48
46
  *
49
47
  * This feature requires the `drag-panes.js` module.
50
48
  *
49
+ * @product highstock
50
+ * @default 10%
51
+ *
51
52
  * @type {Number|String}
52
53
  * @sample {highstock} stock/yaxis/resize-min-max-length minLength and maxLength
54
+ * @apioption yAxis.minLength
53
55
  */
54
56
  minLength: '10%',
55
57
 
@@ -59,8 +61,12 @@
59
61
  *
60
62
  * This feature requires the `drag-panes.js` module.
61
63
  *
64
+ * @product highstock
65
+ * @default 100%
66
+ *
62
67
  * @type {String|Number}
63
68
  * @sample {highstock} stock/yaxis/resize-min-max-length minLength and maxLength
69
+ * @apioption yAxis.maxLength
64
70
  */
65
71
  maxLength: '100%',
66
72
 
@@ -68,6 +74,9 @@
68
74
  * Options for axis resizing for Drag Panes module.
69
75
  *
70
76
  * This feature requires the `drag-panes.js` module.
77
+ *
78
+ * @product highstock
79
+ * @optionparent yAxis.resize
71
80
  */
72
81
  resize: {
73
82
 
@@ -322,8 +331,8 @@
322
331
  */
323
332
  onMouseMove: function(e) {
324
333
  /*
325
- * In iOS, a mousemove event with e.pageX === 0 is fired when holding
326
- * the finger down in the center of the scrollbar. This should
334
+ * In iOS, a mousemove event with e.pageX === 0 is fired when holding
335
+ * the finger down in the center of the scrollbar. This should
327
336
  * be ignored. Borrowed from Navigator.
328
337
  */
329
338
  if (!e.touches || e.touches[0].pageX !== 0) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Highcharts Drilldown module
4
4
  *
5
5
  * Author: Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Exporting module
4
4
  *
5
5
  * (c) 2010-2017 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Exporting module
4
4
  *
5
5
  * (c) 2010-2017 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Highcharts funnel module
4
4
  *
5
5
  * (c) 2010-2017 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Gantt series
4
4
  *
5
5
  * (c) 2016 Lars A. V. Cabrera
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * GridAxis
4
4
  *
5
5
  * (c) 2016 Lars A. V. Cabrera
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  *
4
4
  * (c) 2009-2017 Torstein Honsi
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  *
4
4
  * (c) 2010-2017 Highsoft AS
5
5
  * Author: Sebastian Domas
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  *
4
4
  * Item series type for Highcharts
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Plugin for displaying a message when there is no data visible in chart.
4
4
  *
5
5
  * (c) 2010-2017 Highsoft AS
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Client side exporting module
4
4
  *
5
5
  * (c) 2015 Torstein Honsi / Oystein Moseng
@@ -637,7 +637,7 @@
637
637
 
638
638
  // Extend the default options to use the local exporter logic
639
639
  merge(true, Highcharts.getOptions().exporting, {
640
- libURL: 'https://code.highcharts.com/6.0.0/lib/',
640
+ libURL: 'https://code.highcharts.com/6.0.1/lib/',
641
641
 
642
642
  // When offline-exporting is loaded, redefine the menu item definitions
643
643
  // related to download.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Old IE (v6, v7, v8) module for Highcharts v6+.
4
4
  *
5
5
  * (c) 2010-2017 Highsoft AS
@@ -69,7 +69,7 @@
69
69
  * @since 2.3.0
70
70
  */
71
71
  H.getOptions().global.VMLRadialGradientURL =
72
- 'http://code.highcharts.com/6.0.0/gfx/vml-radial-gradient.png';
72
+ 'http://code.highcharts.com/6.0.1/gfx/vml-radial-gradient.png';
73
73
 
74
74
 
75
75
  // Utilites
@@ -157,18 +157,6 @@
157
157
  };
158
158
  }
159
159
 
160
- if (!Array.prototype.find) {
161
- H.findPolyfill = function(fn) {
162
- var i,
163
- length = this.length;
164
-
165
- for (i = 0; i < length; i++) {
166
- if (fn(this[i], i)) {
167
- return this[i];
168
- }
169
- }
170
- };
171
- }
172
160
 
173
161
  if (!Array.prototype.reduce) {
174
162
  H.reducePolyfill = function(func, initialValue) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  *
4
4
  * (c) 2009-2017 Torstein Honsi
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  *
4
4
  * Support for parallel coordinates in Highcharts
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  *
4
4
  * Pareto series type for Highcharts
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Sankey diagram module
4
4
  *
5
5
  * (c) 2010-2017 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  *
4
4
  * (c) 2009-2017 Torstein Honsi
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Solid angular gauge module
4
4
  *
5
5
  * (c) 2010-2017 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * StaticScale
4
4
  *
5
5
  * (c) 2016 Torstein Honsi, Lars A. V. Cabrera
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.0 (2017-10-04)
2
+ * @license Highcharts JS v6.0.1 (2017-10-05)
3
3
  * Highstock as a plugin for Highcharts
4
4
  *
5
5
  * (c) 2017 Torstein Honsi
@@ -7380,7 +7380,6 @@
7380
7380
  states = buttonTheme && buttonTheme.states,
7381
7381
  plotLeft = chart.plotLeft,
7382
7382
  buttonLeft,
7383
- pos = this.getPosition(),
7384
7383
  buttonGroup = rangeSelector.buttonGroup,
7385
7384
  group,
7386
7385
  groupHeight,
@@ -7390,13 +7389,13 @@
7390
7389
  legendOptions = legend && legend.options,
7391
7390
  buttonPositionY = buttonPosition.y,
7392
7391
  inputPositionY = inputPosition.y,
7392
+ animate = rendered || false,
7393
7393
  exportingX = 0,
7394
7394
  alignTranslateY,
7395
7395
  legendHeight,
7396
7396
  minPosition,
7397
- translateY,
7398
- translateX,
7399
- groupOffsetY;
7397
+ translateY = 0,
7398
+ translateX;
7400
7399
 
7401
7400
  if (options.enabled === false) {
7402
7401
  return;
@@ -7478,7 +7477,6 @@
7478
7477
  }
7479
7478
 
7480
7479
  plotLeft = chart.plotLeft - chart.spacing[3];
7481
-
7482
7480
  rangeSelector.updateButtonStates();
7483
7481
 
7484
7482
  // detect collisiton with exporting
@@ -7489,37 +7487,29 @@
7489
7487
  buttonPosition.align === 'right' &&
7490
7488
  (
7491
7489
  (buttonPosition.y + buttonGroup.getBBox().height - 12) <
7492
- ((navButtonOptions.y || 0) + navButtonOptions.height - chart.spacing[0])
7490
+ ((navButtonOptions.y || 0) + navButtonOptions.height)
7493
7491
  )
7494
7492
  ) {
7495
7493
  exportingX = -40;
7496
7494
  }
7497
7495
 
7498
- // align button group
7499
- buttonGroup.align(extend({
7500
- y: pos.buttonTop,
7501
- width: buttonGroup.getBBox().width,
7502
- x: exportingX
7503
- }, buttonPosition), true, chart.spacingBox);
7504
-
7505
- translateX = buttonGroup.alignAttr.translateX + exportingX;
7506
-
7507
- // detect left offset (axis title) or margin
7508
7496
  if (buttonPosition.align === 'left') {
7509
- translateX += ((plotLeft < 0) || (H.isNumber(chart.margin[3])) ? 0 : plotLeft) - chart.spacing[3];
7497
+ translateX = buttonPosition.x - chart.spacing[3];
7510
7498
  } else if (buttonPosition.align === 'right') {
7511
- translateX -= chart.spacing[1] + (H.isNumber(chart.margin[3]) ? plotLeft : 0);
7499
+ translateX = buttonPosition.x + exportingX - chart.spacing[1];
7512
7500
  }
7513
7501
 
7514
- // Set / update the group position
7515
- buttonGroup.attr({
7516
- translateY: pos.buttonTop,
7517
- translateX: translateX
7518
- });
7502
+ // align button group
7503
+ buttonGroup.align({
7504
+ y: buttonPosition.y,
7505
+ width: buttonGroup.getBBox().width,
7506
+ align: buttonPosition.align,
7507
+ x: translateX
7508
+ }, true, chart.spacingBox);
7519
7509
 
7520
7510
  // skip animation
7521
- rangeSelector.group.placed = false;
7522
- rangeSelector.buttonGroup.placed = false;
7511
+ rangeSelector.group.placed = animate;
7512
+ rangeSelector.buttonGroup.placed = animate;
7523
7513
 
7524
7514
  if (inputEnabled !== false) {
7525
7515
 
@@ -7535,7 +7525,7 @@
7535
7525
  verticalAlign === 'top' &&
7536
7526
  inputPosition.align === 'right' &&
7537
7527
  (
7538
- (pos.inputTop - inputGroup.getBBox().height - 12) <
7528
+ (inputPosition.y - inputGroup.getBBox().height - 12) <
7539
7529
  ((navButtonOptions.y || 0) + navButtonOptions.height + chart.spacing[0])
7540
7530
  )
7541
7531
  ) {
@@ -7544,35 +7534,27 @@
7544
7534
  exportingX = 0;
7545
7535
  }
7546
7536
 
7547
- // Update the alignment to the updated spacing box
7548
- inputGroup.align(extend({
7549
- y: pos.inputTop,
7550
- width: inputGroup.getBBox().width
7551
- }, inputPosition), true, chart.spacingBox);
7552
-
7553
- translateX = inputGroup.alignAttr.translateX + exportingX;
7554
-
7555
7537
  if (inputPosition.align === 'left') {
7556
- translateX += plotLeft;
7557
- } else if (
7558
- inputPosition.align === 'right'
7559
- ) {
7560
- translateX = translateX - chart.axisOffset[1]; // yAxis offset
7538
+ translateX = plotLeft;
7539
+ } else if (inputPosition.align === 'right') {
7540
+ translateX = -Math.max(chart.axisOffset[1], -exportingX); // yAxis offset
7561
7541
  }
7562
7542
 
7563
- // add y from user options
7564
- inputGroup.attr({
7565
- translateY: pos.inputTop + 10,
7566
- translateX: translateX - (inputPosition.align === 'right' ? 2 : 0) // fix wrong getBBox() value on right align
7567
- });
7543
+ // Update the alignment to the updated spacing box
7544
+ inputGroup.align({
7545
+ y: inputPosition.y,
7546
+ width: inputGroup.getBBox().width,
7547
+ align: inputPosition.align,
7548
+ x: inputPosition.x + translateX - 2 // fix wrong getBBox() value on right align
7549
+ }, true, chart.spacingBox);
7568
7550
 
7569
7551
  // detect collision
7570
- inputGroupX = inputGroup.translateX + inputGroup.alignOptions.x -
7552
+ inputGroupX = inputGroup.alignAttr.translateX + inputGroup.alignOptions.x -
7571
7553
  exportingX + inputGroup.getBBox().x + 2; // getBBox for detecing left margin, 2px padding to not overlap input and label
7572
7554
 
7573
7555
  inputGroupWidth = inputGroup.alignOptions.width;
7574
7556
 
7575
- buttonGroupX = buttonGroup.translateX + buttonGroup.getBBox().x;
7557
+ buttonGroupX = buttonGroup.alignAttr.translateX + buttonGroup.getBBox().x;
7576
7558
  buttonGroupWidth = buttonGroup.getBBox().width + 20; // 20 is minimal spacing between elements
7577
7559
 
7578
7560
  if (
@@ -7584,11 +7566,11 @@
7584
7566
  )
7585
7567
  ) {
7586
7568
 
7587
- // move the element to the second line
7588
7569
  inputGroup.attr({
7589
- translateX: inputGroup.translateX,
7590
- translateY: inputGroup.translateY + buttonGroup.getBBox().height + 10
7570
+ translateX: inputGroup.alignAttr.translateX + (chart.axisOffset[1] >= -exportingX ? 0 : -exportingX),
7571
+ translateY: inputGroup.alignAttr.translateY + buttonGroup.getBBox().height + 10
7591
7572
  });
7573
+
7592
7574
  }
7593
7575
 
7594
7576
  // Set or reset the input values
@@ -7596,7 +7578,7 @@
7596
7578
  rangeSelector.setInputValue('max', max);
7597
7579
 
7598
7580
  // skip animation
7599
- rangeSelector.inputGroup.placed = false;
7581
+ rangeSelector.inputGroup.placed = animate;
7600
7582
  }
7601
7583
 
7602
7584
  // vertical align
@@ -7606,6 +7588,7 @@
7606
7588
 
7607
7589
  // set position
7608
7590
  groupHeight = rangeSelector.group.getBBox().height + 20; // # 20 padding
7591
+ alignTranslateY = rangeSelector.group.alignAttr.translateY;
7609
7592
 
7610
7593
  // calculate bottom position
7611
7594
  if (verticalAlign === 'bottom') {
@@ -7613,25 +7596,21 @@
7613
7596
  !legendOptions.floating ? legend.legendHeight + pick(legendOptions.margin, 10) : 0;
7614
7597
 
7615
7598
  groupHeight = groupHeight + legendHeight - 20;
7616
- }
7617
-
7618
- groupOffsetY = Math[verticalAlign === 'middle' ? 'max' : 'min'](inputPositionY, buttonPositionY);
7599
+ translateY = alignTranslateY - groupHeight - (floating ? 0 : options.y) - 10; // 10 spacing
7619
7600
 
7620
- if (inputGroup && (inputPositionY < buttonPositionY) && verticalAlign === 'bottom') {
7621
- groupOffsetY += inputGroup.getBBox().height;
7622
7601
  }
7623
7602
 
7624
- // fix the position
7625
- alignTranslateY = rangeSelector.group.alignAttr.translateY;
7626
- minPosition = (inputPositionY < 0 && buttonPositionY < 0) ? 0 : groupOffsetY;
7627
- translateY = Math.floor(alignTranslateY - groupHeight - minPosition);
7628
-
7629
7603
  if (verticalAlign === 'top') {
7630
7604
  if (floating) {
7631
7605
  translateY = 0;
7632
- } else if (chart.spacing[0] !== chart.options.chart.spacing[0]) { // detect if spacing is customised
7633
- translateY -= (chart.spacing[0] - chart.options.chart.spacing[0]);
7634
7606
  }
7607
+
7608
+ if (chart.titleOffset) {
7609
+ translateY = chart.titleOffset + chart.options.title.margin;
7610
+ }
7611
+
7612
+ translateY += ((chart.margin[0] - chart.spacing[0]) || 0);
7613
+
7635
7614
  } else if (verticalAlign === 'middle') {
7636
7615
  if (inputPositionY === buttonPositionY) {
7637
7616
  if (inputPositionY < 0) {
@@ -7648,13 +7627,10 @@
7648
7627
  }
7649
7628
  }
7650
7629
 
7651
- translateY = Math.floor(translateY);
7652
-
7653
- if (floating) {
7654
- translateY += options.y;
7655
- }
7656
-
7657
- rangeSelector.group.translate(0 + options.x, translateY - 3); // floor to avoid crisp edges, 3px to keep back compatibility
7630
+ rangeSelector.group.translate(
7631
+ options.x,
7632
+ options.y + Math.floor(translateY)
7633
+ );
7658
7634
 
7659
7635
  // translate HTML inputs
7660
7636
  if (inputEnabled !== false) {
@@ -7672,16 +7648,17 @@
7672
7648
  getHeight: function() {
7673
7649
  var rangeSelector = this,
7674
7650
  options = rangeSelector.options,
7651
+ rangeSelectorGroup = rangeSelector.group,
7675
7652
  inputPosition = options.inputPosition,
7676
7653
  buttonPosition = options.buttonPosition,
7677
7654
  yPosition = options.y,
7678
- rangeSelectorGroup = rangeSelector.group,
7679
7655
  buttonPositionY = buttonPosition.y,
7680
7656
  inputPositionY = inputPosition.y,
7681
7657
  rangeSelectorHeight = 0,
7682
7658
  minPosition;
7683
7659
 
7684
7660
  rangeSelectorHeight = rangeSelectorGroup ? (rangeSelectorGroup.getBBox(true).height) + 13 + yPosition : 0; // 13px to keep back compatibility
7661
+
7685
7662
  minPosition = Math.min(inputPositionY, buttonPositionY);
7686
7663
 
7687
7664
  if (
@@ -7700,19 +7677,7 @@
7700
7677
  * @return {Boolean} Returns collision status
7701
7678
  */
7702
7679
  titleCollision: function(chart) {
7703
- var status = false;
7704
-
7705
- if (
7706
- (!H.isObject(chart.title) ||
7707
- (chart.title && chart.title.getBBox().y > chart.plotTop)
7708
- ) && (!H.isObject(chart.subtitle) ||
7709
- (chart.subtitle && chart.subtitle.getBBox().y > chart.plotTop)
7710
- )
7711
- ) {
7712
- status = true;
7713
- }
7714
-
7715
- return status;
7680
+ return !(chart.options.title.text || chart.options.subtitle.text);
7716
7681
  },
7717
7682
 
7718
7683
  /**
@@ -7874,11 +7839,19 @@
7874
7839
  wrap(Chart.prototype, 'render', function(proceed, options, callback) {
7875
7840
 
7876
7841
  var chart = this,
7842
+ axes = chart.axes,
7877
7843
  rangeSelector = chart.rangeSelector,
7878
7844
  verticalAlign;
7879
7845
 
7880
7846
  if (rangeSelector) {
7881
7847
 
7848
+ each(axes, function(axis) {
7849
+ axis.updateNames();
7850
+ axis.setScale();
7851
+ });
7852
+
7853
+ chart.getAxisMargins();
7854
+
7882
7855
  rangeSelector.render();
7883
7856
  verticalAlign = rangeSelector.options.verticalAlign;
7884
7857