highcharts-rails 6.0.1 → 6.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.markdown +16 -0
  3. data/app/assets/javascripts/highcharts.js +188 -51
  4. data/app/assets/javascripts/highcharts/highcharts-3d.js +3 -4
  5. data/app/assets/javascripts/highcharts/highcharts-more.js +21 -5
  6. data/app/assets/javascripts/highcharts/modules/accessibility.js +4 -2
  7. data/app/assets/javascripts/highcharts/modules/annotations.js +2 -2
  8. data/app/assets/javascripts/highcharts/modules/boost-canvas.js +50 -195
  9. data/app/assets/javascripts/highcharts/modules/boost.js +202 -135
  10. data/app/assets/javascripts/highcharts/modules/broken-axis.js +1 -1
  11. data/app/assets/javascripts/highcharts/modules/bullet.js +1 -1
  12. data/app/assets/javascripts/highcharts/modules/data.js +88 -59
  13. data/app/assets/javascripts/highcharts/modules/drag-panes.js +1 -1
  14. data/app/assets/javascripts/highcharts/modules/drilldown.js +25 -2
  15. data/app/assets/javascripts/highcharts/modules/export-data.js +6 -2
  16. data/app/assets/javascripts/highcharts/modules/exporting.js +1 -1
  17. data/app/assets/javascripts/highcharts/modules/funnel.js +1 -1
  18. data/app/assets/javascripts/highcharts/modules/gantt.js +2 -2
  19. data/app/assets/javascripts/highcharts/modules/grid-axis.js +1 -1
  20. data/app/assets/javascripts/highcharts/modules/heatmap.js +826 -820
  21. data/app/assets/javascripts/highcharts/modules/histogram-bellcurve.js +1 -1
  22. data/app/assets/javascripts/highcharts/modules/item-series.js +1 -1
  23. data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +1 -1
  24. data/app/assets/javascripts/highcharts/modules/offline-exporting.js +2 -2
  25. data/app/assets/javascripts/highcharts/modules/oldie.js +16 -2
  26. data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +1 -1
  27. data/app/assets/javascripts/highcharts/modules/parallel-coordinates.js +1 -1
  28. data/app/assets/javascripts/highcharts/modules/pareto.js +1 -1
  29. data/app/assets/javascripts/highcharts/modules/sankey.js +39 -9
  30. data/app/assets/javascripts/highcharts/modules/series-label.js +8 -3
  31. data/app/assets/javascripts/highcharts/modules/solid-gauge.js +1 -1
  32. data/app/assets/javascripts/highcharts/modules/static-scale.js +6 -2
  33. data/app/assets/javascripts/highcharts/modules/stock.js +19 -47
  34. data/app/assets/javascripts/highcharts/modules/streamgraph.js +1 -1
  35. data/app/assets/javascripts/highcharts/modules/sunburst.js +40 -15
  36. data/app/assets/javascripts/highcharts/modules/tilemap.js +7 -6
  37. data/app/assets/javascripts/highcharts/modules/treemap.js +13 -3
  38. data/app/assets/javascripts/highcharts/modules/variable-pie.js +1 -1
  39. data/app/assets/javascripts/highcharts/modules/variwide.js +1 -1
  40. data/app/assets/javascripts/highcharts/modules/vector.js +1 -1
  41. data/app/assets/javascripts/highcharts/modules/windbarb.js +1 -1
  42. data/app/assets/javascripts/highcharts/modules/wordcloud.js +130 -37
  43. data/app/assets/javascripts/highcharts/modules/xrange.js +2 -2
  44. data/app/assets/javascripts/highcharts/themes/avocado.js +1 -1
  45. data/app/assets/javascripts/highcharts/themes/dark-blue.js +1 -1
  46. data/app/assets/javascripts/highcharts/themes/dark-green.js +1 -1
  47. data/app/assets/javascripts/highcharts/themes/dark-unica.js +1 -1
  48. data/app/assets/javascripts/highcharts/themes/gray.js +1 -1
  49. data/app/assets/javascripts/highcharts/themes/grid-light.js +1 -1
  50. data/app/assets/javascripts/highcharts/themes/grid.js +1 -1
  51. data/app/assets/javascripts/highcharts/themes/sand-signika.js +1 -1
  52. data/app/assets/javascripts/highcharts/themes/skies.js +1 -1
  53. data/app/assets/javascripts/highcharts/themes/sunset.js +1 -1
  54. data/lib/highcharts/version.rb +1 -1
  55. metadata +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
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.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  *
4
4
  * Item series type for Highcharts
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
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.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
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.1/lib/',
640
+ libURL: 'https://code.highcharts.com/6.0.2/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.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
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.1/gfx/vml-radial-gradient.png';
72
+ 'http://code.highcharts.com/6.0.2/gfx/vml-radial-gradient.png';
73
73
 
74
74
 
75
75
  // Utilites
@@ -157,6 +157,20 @@
157
157
  };
158
158
  }
159
159
 
160
+ if (!Object.prototype.keys) {
161
+ H.keysPolyfill = function(obj) {
162
+ var result = [],
163
+ hasOwnProperty = Object.prototype.hasOwnProperty,
164
+ prop;
165
+ for (prop in obj) {
166
+ if (hasOwnProperty.call(obj, prop)) {
167
+ result.push(prop);
168
+ }
169
+ }
170
+ return result;
171
+ };
172
+ }
173
+
160
174
 
161
175
  if (!Array.prototype.reduce) {
162
176
  H.reducePolyfill = function(func, initialValue) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  *
4
4
  * (c) 2009-2017 Torstein Honsi
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  *
4
4
  * Support for parallel coordinates in Highcharts
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  *
4
4
  * Pareto series type for Highcharts
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  * Sankey diagram module
4
4
  *
5
5
  * (c) 2010-2017 Torstein Honsi
@@ -16,7 +16,7 @@
16
16
  }(function(Highcharts) {
17
17
  (function(H) {
18
18
  /**
19
- * Solid angular gauge module
19
+ * Sankey diagram module
20
20
  *
21
21
  * (c) 2010-2017 Torstein Honsi
22
22
  *
@@ -72,17 +72,39 @@
72
72
  /**
73
73
  * The [format string](http://www.highcharts.com/docs/chart-concepts/labels-
74
74
  * and-string-formatting) specifying what to show for _nodes_ in the
75
- * sankey diagram.
75
+ * sankey diagram. By default the `nodeFormatter` returns
76
+ * `{point.name}`.
77
+ *
78
+ * @type {String}
76
79
  */
77
- nodeFormat: '{point.name}',
80
+ nodeFormat: undefined,
81
+
82
+ /**
83
+ * Callback to format data labels for _nodes_ in the sankey diagram.
84
+ * The `nodeFormat` option takes precedence over the `nodeFormatter`.
85
+ *
86
+ * @type {Function}
87
+ * @since 6.0.2
88
+ */
89
+ nodeFormatter: function() {
90
+ return this.point.name;
91
+ },
78
92
  /**
79
93
  * The [format string](http://www.highcharts.com/docs/chart-concepts/labels-
80
94
  * and-string-formatting) specifying what to show for _links_ in the
81
- * sankey diagram. Defaults to an empty string, in effect disabling the
82
- * labels.
83
- * @default ""
95
+ * sankey diagram. Defaults to an empty string returned from the
96
+ * `formatter`, in effect disabling the labels.
84
97
  */
85
- format: '',
98
+ format: undefined,
99
+ /**
100
+ * Callback to format data labels for _links_ in the sankey diagram.
101
+ * The `format` option takes precedence over the `formatter`.
102
+ *
103
+ * @since 6.0.2
104
+ */
105
+ formatter: function() {
106
+ return '';
107
+ },
86
108
  inside: true
87
109
  },
88
110
 
@@ -120,9 +142,17 @@
120
142
  /**
121
143
  * The [format string](http://www.highcharts.com/docs/chart-concepts/labels-
122
144
  * and-string-formatting) specifying what to show for _nodes_ in tooltip
123
- * of a sankey diagram series.
145
+ * of a sankey diagram series, as opposed to links.
124
146
  */
125
147
  nodeFormat: '{point.name}: <b>{point.sum}</b><br/>'
148
+ /**
149
+ * A callback for defining the format for _nodes_ in the sankey chart's
150
+ * tooltip, as opposed to links.
151
+ *
152
+ * @type {Function}
153
+ * @since 6.0.2
154
+ * @apioption plotOptions.sankey.tooltip.nodeFormatter
155
+ */
126
156
  }
127
157
 
128
158
  }, {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  *
4
4
  * (c) 2009-2017 Torstein Honsi
5
5
  *
@@ -559,7 +559,7 @@
559
559
  y >= paneTop && y <= paneTop + paneHeight - bBox.height;
560
560
  }
561
561
 
562
- if (series.visible && points) {
562
+ if (series.visible && !series.isSeriesBoosting && points) {
563
563
  if (!label) {
564
564
  series.labelBySeries = label = chart.renderer
565
565
  .label(series.name, 0, -9999, 'connector')
@@ -785,7 +785,12 @@
785
785
  label = series.labelBySeries,
786
786
  closest = label && label.closest;
787
787
 
788
- if (options.enabled && series.visible && (series.graph || series.area)) {
788
+ if (
789
+ options.enabled &&
790
+ series.visible &&
791
+ (series.graph || series.area) &&
792
+ !series.isSeriesBoosting
793
+ ) {
789
794
  chart.labelSeries.push(series);
790
795
 
791
796
  if (options.minFontSize && options.maxFontSize) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
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.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  * StaticScale
4
4
  *
5
5
  * (c) 2016 Torstein Honsi, Lars A. V. Cabrera
@@ -58,7 +58,11 @@
58
58
  });
59
59
  this.initiatedScale = true;
60
60
  };
61
- H.addEvent(Chart.prototype, 'render', Chart.prototype.adjustHeight);
61
+ Chart.prototype.callbacks.push(function(chart) {
62
+ H.addEvent(this, 'render', function() {
63
+ chart.adjustHeight();
64
+ });
65
+ });
62
66
 
63
67
  }(Highcharts));
64
68
  }));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  * Highstock as a plugin for Highcharts
4
4
  *
5
5
  * (c) 2017 Torstein Honsi
@@ -239,7 +239,7 @@
239
239
  slope,
240
240
  hasBreaks = axis.isXAxis && !!axis.options.breaks,
241
241
  isOrdinal = axis.options.ordinal,
242
- overscrollPointsRange = Number.MAX_SAFE_INTEGER,
242
+ overscrollPointsRange = Number.MAX_VALUE,
243
243
  ignoreHiddenSeries = axis.chart.options.chart.ignoreHiddenSeries,
244
244
  isNavigatorAxis = axis.options.className === 'highcharts-navigator-xaxis',
245
245
  i;
@@ -384,6 +384,7 @@
384
384
  axis.ordinalPositions = axis.ordinalSlope = axis.ordinalOffset = undefined;
385
385
  }
386
386
  }
387
+
387
388
  axis.isOrdinal = isOrdinal && useOrdinal; // #3818, #4196, #4926
388
389
  axis.groupIntervalFactor = null; // reset for next run
389
390
  },
@@ -4486,7 +4487,7 @@
4486
4487
  /**
4487
4488
  * Width for handles.
4488
4489
  *
4489
- * @type {umber}
4490
+ * @type {Number}
4490
4491
  * @default 7
4491
4492
  * @product highstock
4492
4493
  * @sample {highstock} stock/navigator/styled-handles/
@@ -6108,14 +6109,14 @@
6108
6109
 
6109
6110
  each(baseSeries, function(base) {
6110
6111
  // Link base series show/hide to navigator series visibility
6111
- addEvent(base, 'show', function() {
6112
+ addEvent(base, 'show', function(e) {
6112
6113
  if (this.navigatorSeries) {
6113
- this.navigatorSeries.show();
6114
+ this.navigatorSeries.setVisible(true, e.redraw);
6114
6115
  }
6115
6116
  });
6116
- addEvent(base, 'hide', function() {
6117
+ addEvent(base, 'hide', function(e) {
6117
6118
  if (this.navigatorSeries) {
6118
- this.navigatorSeries.hide();
6119
+ this.navigatorSeries.setVisible(false, e.redraw);
6119
6120
  }
6120
6121
  });
6121
6122
 
@@ -6987,12 +6988,14 @@
6987
6988
 
6988
6989
  addEvent(chart, 'load', function() {
6989
6990
  // If a data grouping is applied to the current button, release it when extremes change
6990
- addEvent(chart.xAxis[0], 'setExtremes', function(e) {
6991
- if (this.max - this.min !== chart.fixedRange && e.trigger !== 'rangeSelectorButton' &&
6992
- e.trigger !== 'updatedData' && rangeSelector.forcedDataGrouping) {
6993
- this.setDataGrouping(false, false);
6994
- }
6995
- });
6991
+ if (chart.xAxis && chart.xAxis[0]) {
6992
+ addEvent(chart.xAxis[0], 'setExtremes', function(e) {
6993
+ if (this.max - this.min !== chart.fixedRange && e.trigger !== 'rangeSelectorButton' &&
6994
+ e.trigger !== 'updatedData' && rangeSelector.forcedDataGrouping) {
6995
+ this.setDataGrouping(false, false);
6996
+ }
6997
+ });
6998
+ }
6996
6999
  });
6997
7000
  },
6998
7001
 
@@ -8046,12 +8049,12 @@
8046
8049
  * Defines if comparisson should start from the first point within the visible
8047
8050
  * range or should start from the first point <b>before</b> the range.
8048
8051
  * In other words, this flag determines if first point within the visible range
8049
- * will have 0% (base) or should have been already calculated according to the
8050
- * previous point.
8052
+ * will have 0% (`compareStart=true`) or should have been already calculated
8053
+ * according to the previous point (`compareStart=false`).
8051
8054
  *
8052
8055
  * @type {Boolean}
8053
8056
  * @sample {highstock} stock/plotoptions/series-comparestart/ Calculate compare within visible range
8054
- * @default undefined
8057
+ * @default false
8055
8058
  * @since 6.0.0
8056
8059
  * @product highstock
8057
8060
  * @apioption plotOptions.series.compareStart
@@ -8398,37 +8401,6 @@
8398
8401
  null; // #3557 getPlotLinePath in regular Highcharts also returns null
8399
8402
  });
8400
8403
 
8401
- // Override getPlotBandPath to allow for multipane charts
8402
- Axis.prototype.getPlotBandPath = function(from, to) {
8403
- var toPath = this.getPlotLinePath(to, null, null, true),
8404
- path = this.getPlotLinePath(from, null, null, true),
8405
- result = [],
8406
- i;
8407
-
8408
- if (path && toPath) {
8409
- if (path.toString() === toPath.toString()) {
8410
- // #6166
8411
- result = path;
8412
- result.flat = true;
8413
- } else {
8414
- // Go over each subpath
8415
- for (i = 0; i < path.length; i += 6) {
8416
- result.push(
8417
- 'M', path[i + 1], path[i + 2],
8418
- 'L', path[i + 4], path[i + 5],
8419
- toPath[i + 4], toPath[i + 5],
8420
- toPath[i + 1], toPath[i + 2],
8421
- 'z'
8422
- );
8423
- }
8424
- }
8425
- } else { // outside the axis area
8426
- result = null;
8427
- }
8428
-
8429
- return result;
8430
- };
8431
-
8432
8404
  // Function to crisp a line with multiple segments
8433
8405
  SVGRenderer.prototype.crispPolyLine = function(points, width) {
8434
8406
  // points format: ['M', 0, 0, 'L', 100, 0]
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  * Streamgraph module
4
4
  *
5
5
  * (c) 2010-2017 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v6.0.1 (2017-10-05)
2
+ * @license Highcharts JS v6.0.2 (2017-10-20)
3
3
  *
4
4
  * (c) 2016 Highsoft AS
5
5
  * Authors: Jon Arild Nygard
@@ -283,6 +283,9 @@
283
283
  each = H.each,
284
284
  getColor = mixinTreeSeries.getColor,
285
285
  grep = H.grep,
286
+ isBoolean = function(x) {
287
+ return typeof x === 'boolean';
288
+ },
286
289
  isNumber = H.isNumber,
287
290
  isString = H.isString,
288
291
  pick = H.pick,
@@ -469,7 +472,6 @@
469
472
  * to be level one. Otherwise the level will be the same as the tree
470
473
  * structure.
471
474
  *
472
- * @validvalue [true, false]
473
475
  * @type {Boolean}
474
476
  * @default true
475
477
  * @since 4.1.0
@@ -826,6 +828,14 @@
826
828
  setTreeValues: function(tree) {
827
829
  var series = this,
828
830
  options = series.options,
831
+ idRoot = series.rootNode,
832
+ mapIdToNode = series.nodeMap,
833
+ nodeRoot = mapIdToNode[idRoot],
834
+ levelIsConstant = (
835
+ isBoolean(options.levelIsConstant) ?
836
+ options.levelIsConstant :
837
+ true
838
+ ),
829
839
  childrenTotal = 0,
830
840
  children = [],
831
841
  val,
@@ -854,7 +864,7 @@
854
864
  // Ignore this node if point is not visible
855
865
  ignore: !(pick(point && point.visible, true) && (val > 0)),
856
866
  isLeaf: tree.visible && !childrenTotal,
857
- levelDynamic: tree.level - (options.levelIsConstant ? series.nodeMap[series.rootNode].level : 0),
867
+ levelDynamic: tree.level - (levelIsConstant ? 0 : nodeRoot.level),
858
868
  name: pick(point && point.name, ''),
859
869
  sortIndex: pick(point && point.sortIndex, -val),
860
870
  val: val
@@ -1818,13 +1828,7 @@
1818
1828
  };
1819
1829
 
1820
1830
  var getAnimation = function getAnimation(shape, params) {
1821
- var to = {
1822
- end: shape.end,
1823
- start: shape.start,
1824
- innerR: shape.innerR,
1825
- r: shape.r
1826
- },
1827
- from = {},
1831
+ var center = params.center,
1828
1832
  point = params.point,
1829
1833
  radians = params.radians,
1830
1834
  innerR = params.innerR,
@@ -1833,7 +1837,16 @@
1833
1837
  shapeExisting = params.shapeExisting,
1834
1838
  shapeRoot = params.shapeRoot,
1835
1839
  shapePreviousRoot = params.shapePreviousRoot,
1836
- visible = params.visible;
1840
+ visible = params.visible,
1841
+ from = {},
1842
+ to = {
1843
+ end: shape.end,
1844
+ start: shape.start,
1845
+ innerR: shape.innerR,
1846
+ r: shape.r,
1847
+ x: center.x,
1848
+ y: center.y
1849
+ };
1837
1850
  if (visible) {
1838
1851
  // Animate points in
1839
1852
  if (!point.graphic && shapePreviousRoot) {
@@ -2040,13 +2053,13 @@
2040
2053
  /**
2041
2054
  * Can set a `borderColor` on all points which lies on the same level.
2042
2055
  *
2043
- * @type {String}
2056
+ * @type {Color}
2044
2057
  * @apioption plotOptions.sunburst.levels.borderColor
2045
2058
  */
2046
2059
  /**
2047
2060
  * Can set a `borderWidth` on all points which lies on the same level.
2048
2061
  *
2049
- * @type {String}
2062
+ * @type {Number}
2050
2063
  * @apioption plotOptions.sunburst.levels.borderWidth
2051
2064
  */
2052
2065
  /**
@@ -2058,7 +2071,7 @@
2058
2071
  /**
2059
2072
  * Can set a `color` on all points which lies on the same level.
2060
2073
  *
2061
- * @type {String}
2074
+ * @type {Color}
2062
2075
  * @apioption plotOptions.sunburst.levels.color
2063
2076
  */
2064
2077
  /**
@@ -2077,7 +2090,7 @@
2077
2090
  * The ending value of a color variation. The last sibling will receive this
2078
2091
  * value.
2079
2092
  *
2080
- * @type {String}
2093
+ * @type {Number}
2081
2094
  * @apioption plotOptions.sunburst.levels.colorVariation.to
2082
2095
  */
2083
2096
  /**
@@ -2136,9 +2149,14 @@
2136
2149
  true
2137
2150
  ),
2138
2151
  positions = series.center,
2152
+ center = {
2153
+ x: positions[0],
2154
+ y: positions[1]
2155
+ },
2139
2156
  innerR = positions[3] / 2,
2140
2157
  renderer = series.chart.renderer,
2141
2158
  animateLabels,
2159
+ animateLabelsCalled = false,
2142
2160
  addedHack = false,
2143
2161
  hackDataLabelAnimation = !!(
2144
2162
  animation &&
@@ -2153,6 +2171,7 @@
2153
2171
  });
2154
2172
  animateLabels = function() {
2155
2173
  var s = series;
2174
+ animateLabelsCalled = true;
2156
2175
  if (s.dataLabelsGroup) {
2157
2176
  s.dataLabelsGroup.animate({
2158
2177
  opacity: 1,
@@ -2172,6 +2191,7 @@
2172
2191
  visible = !!(node.visible && node.shapeArgs);
2173
2192
  if (hasRendered && animation) {
2174
2193
  animationInfo = getAnimation(shape, {
2194
+ center: center,
2175
2195
  point: point,
2176
2196
  radians: radians,
2177
2197
  innerR: innerR,
@@ -2226,6 +2246,11 @@
2226
2246
  series.options.dataLabels.defer = true;
2227
2247
  Series.prototype.drawDataLabels.call(series);
2228
2248
  series.hasRendered = true;
2249
+ // If animateLabels is called before labels were hidden, then call
2250
+ // it again.
2251
+ if (animateLabelsCalled) {
2252
+ animateLabels();
2253
+ }
2229
2254
  } else {
2230
2255
  Series.prototype.drawDataLabels.call(series);
2231
2256
  }