highcharts-rails 5.0.3 → 5.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bb1c30d1b3bc92c0cc0db517f4bf3e3bd22f78e
4
- data.tar.gz: 3b6f5bc13d3f1f1bd5912339badab828fb1e43df
3
+ metadata.gz: 795f04a64d8258b4aff9c34f5a50b5d96b5e1cb2
4
+ data.tar.gz: 67cdb5e6fee754b308dfee7a36b90035ccfeb0a5
5
5
  SHA512:
6
- metadata.gz: 5e0da627752003c02498412185f2bdc5579d77e3295ac31228d58556ddf0c791cb2bce4fccca230c61f5a107ff59f6065cc47a11b0467234fcd691cf39ab3e11
7
- data.tar.gz: 6b8791aab3fc9992e26d6105ef0d9a5953ad538c41a50da586c7994ed5c407a2383dacac0ef6492cfc8a311d403a623552d3b9208b940d1820995ec142317670
6
+ metadata.gz: 48c49d9e0aa65d573a878faa2f284df8e291934643f826ff48ab7b0b31c2545ec39a13915738cd70c34409d59e3dbf57142c637c062d8e5506fb132ba6b4077e
7
+ data.tar.gz: 5fdf501e659c673b6c27e919ae6242c73a854fe3076b2203d0f910b6e590bca2368816160f6a956800d862607dc124e45b7450e4a8eec79cebb3a4c9dcf5477b
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,14 @@
1
+ # 5.0.4 / 2017-01-25
2
+
3
+ * Updated Highcharts to 5.0.4 (2016-11-22)
4
+ * Refactored animation and attr logic to always stop the single property being set. This prevents an animation from continuing after the same property has been set either through .attr or .animate.
5
+ * Bug fixes
6
+ * Fixed #5788, artifacts when animating splines before previous animation was done.
7
+ * Fixed #5982, additional series options were not set in exporting.
8
+ * Fixed #5985, issue with allowHTML in offline exporting.
9
+ * Fixed #5989, tooltip did not hide on touch.
10
+ * Fixed #6008, regression causing rotated data labels to break chart in Firefox.
11
+
1
12
  # 5.0.3 / 2017-01-25
2
13
 
3
14
  * Updated Highcharts to 5.0.3 (2016-11-18)
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  *
4
4
  * (c) 2009-2016 Torstein Honsi
5
5
  *
@@ -21,7 +21,6 @@
21
21
  *
22
22
  * License: www.highcharts.com/license
23
23
  */
24
- 'use strict';
25
24
  /* global window */
26
25
  var win = window,
27
26
  doc = win.document;
@@ -36,7 +35,7 @@
36
35
 
37
36
  var Highcharts = win.Highcharts ? win.Highcharts.error(16, true) : {
38
37
  product: 'Highcharts',
39
- version: '5.0.3',
38
+ version: '5.0.4',
40
39
  deg2rad: Math.PI * 2 / 360,
41
40
  doc: doc,
42
41
  hasBidiBug: hasBidiBug,
@@ -58,6 +57,7 @@
58
57
  return undefined;
59
58
  }
60
59
  };
60
+
61
61
  return Highcharts;
62
62
  }());
63
63
  (function(H) {
@@ -67,7 +67,6 @@
67
67
  * License: www.highcharts.com/license
68
68
  */
69
69
  /* eslint max-len: ["warn", 80, 4] */
70
- 'use strict';
71
70
 
72
71
  /**
73
72
  * The Highcharts object is the placeholder for all other members, and various
@@ -153,7 +152,9 @@
153
152
  } else {
154
153
  ret = end;
155
154
  }
155
+ this.elem.animProp = 'd';
156
156
  this.elem.attr('d', ret);
157
+ this.elem.animProp = null;
157
158
  },
158
159
 
159
160
  /**
@@ -175,7 +176,9 @@
175
176
  // Other animations on SVGElement
176
177
  } else if (elem.attr) {
177
178
  if (elem.element) {
179
+ elem.animProp = prop;
178
180
  elem.attr(prop, now);
181
+ elem.animProp = null;
179
182
  }
180
183
 
181
184
  // HTML styles, raw HTML content like container size
@@ -214,6 +217,7 @@
214
217
  this.pos = 0;
215
218
 
216
219
  timer.elem = this.elem;
220
+ timer.prop = this.prop;
217
221
 
218
222
  if (timer() && timers.push(timer) === 1) {
219
223
  timer.timerId = setInterval(function() {
@@ -310,12 +314,20 @@
310
314
  reverse;
311
315
 
312
316
  /**
313
- * In splines make move points have six parameters like bezier curves
317
+ * In splines make moveTo and lineTo points have six parameters like
318
+ * bezier curves, to allow animation one-to-one.
314
319
  */
315
320
  function sixify(arr) {
321
+ var isOperator,
322
+ nextIsOperator;
316
323
  i = arr.length;
317
324
  while (i--) {
318
- if (arr[i] === 'M' || arr[i] === 'L') {
325
+
326
+ // Fill in dummy coordinates only if the next operator comes
327
+ // three places behind (#5788)
328
+ isOperator = arr[i] === 'M' || arr[i] === 'L';
329
+ nextIsOperator = /[a-zA-Z]/.test(arr[i + 3]);
330
+ if (isOperator && !nextIsOperator) {
319
331
  arr.splice(
320
332
  i + 1, 0,
321
333
  arr[i + 1], arr[i + 2],
@@ -1543,15 +1555,17 @@
1543
1555
  * @function #stop
1544
1556
  * @memberOf Highcharts
1545
1557
  * @param {SVGElement} el - The SVGElement to stop animation on.
1558
+ * @param {string} [prop] - The property to stop animating. If given, the stop
1559
+ * method will stop a single property from animating, while others continue.
1546
1560
  * @returns {void}
1547
1561
  */
1548
- H.stop = function(el) {
1562
+ H.stop = function(el, prop) {
1549
1563
 
1550
1564
  var i = timers.length;
1551
1565
 
1552
1566
  // Remove timers related to this element (#4519)
1553
1567
  while (i--) {
1554
- if (timers[i].elem === el) {
1568
+ if (timers[i].elem === el && (!prop || prop === timers[i].prop)) {
1555
1569
  timers[i].stopped = true; // #4667
1556
1570
  }
1557
1571
  }
@@ -1828,6 +1842,10 @@
1828
1842
  opt.curAnim = H.merge(params);
1829
1843
 
1830
1844
  for (prop in params) {
1845
+
1846
+ // Stop current running animation of this property
1847
+ H.stop(el, prop);
1848
+
1831
1849
  fx = new H.Fx(el, opt, prop);
1832
1850
  end = null;
1833
1851
 
@@ -2045,7 +2063,6 @@
2045
2063
  *
2046
2064
  * License: www.highcharts.com/license
2047
2065
  */
2048
- 'use strict';
2049
2066
  var each = H.each,
2050
2067
  isNumber = H.isNumber,
2051
2068
  map = H.map,
@@ -2214,7 +2231,6 @@
2214
2231
  *
2215
2232
  * License: www.highcharts.com/license
2216
2233
  */
2217
- 'use strict';
2218
2234
  var SVGElement,
2219
2235
  SVGRenderer,
2220
2236
 
@@ -2324,7 +2340,6 @@
2324
2340
  */
2325
2341
  animate: function(params, options, complete) {
2326
2342
  var animOptions = pick(options, this.renderer.globalAnimation, true);
2327
- stop(this); // stop regardless of animation actually running, or reverting to .attr (#607)
2328
2343
  if (animOptions) {
2329
2344
  if (complete) { // allows using a callback with the global animation without overwriting it
2330
2345
  animOptions.complete = complete;
@@ -2564,8 +2579,6 @@
2564
2579
  }
2565
2580
  });
2566
2581
 
2567
- this.realBox = elem.getBBox();
2568
-
2569
2582
  // For each of the tspans, create a stroked copy behind it.
2570
2583
  each(tspans, function(tspan, y) {
2571
2584
  var clone;
@@ -2678,7 +2691,11 @@
2678
2691
  value = hash[key];
2679
2692
  skipAttr = false;
2680
2693
 
2681
-
2694
+ // Unless .attr is from the animator update, stop current
2695
+ // running animation of this property
2696
+ if (key !== this.animProp) {
2697
+ stop(this, key);
2698
+ }
2682
2699
 
2683
2700
  if (this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(key)) {
2684
2701
  if (!hasSetSymbolSize) {
@@ -3942,7 +3959,7 @@
3942
3959
 
3943
3960
  // Add description
3944
3961
  desc = this.createElement('desc').add();
3945
- desc.element.appendChild(doc.createTextNode('Created with Highcharts 5.0.3'));
3962
+ desc.element.appendChild(doc.createTextNode('Created with Highcharts 5.0.4'));
3946
3963
 
3947
3964
 
3948
3965
  renderer.defs = this.createElement('defs').add();
@@ -5652,7 +5669,6 @@
5652
5669
  *
5653
5670
  * License: www.highcharts.com/license
5654
5671
  */
5655
- 'use strict';
5656
5672
  var attr = H.attr,
5657
5673
  createElement = H.createElement,
5658
5674
  css = H.css,
@@ -6009,7 +6025,6 @@
6009
6025
  *
6010
6026
  * License: www.highcharts.com/license
6011
6027
  */
6012
- 'use strict';
6013
6028
 
6014
6029
  var VMLRenderer,
6015
6030
  VMLRendererExtension,
@@ -7161,7 +7176,6 @@
7161
7176
  *
7162
7177
  * License: www.highcharts.com/license
7163
7178
  */
7164
- 'use strict';
7165
7179
  var color = H.color,
7166
7180
  each = H.each,
7167
7181
  getTZOffset = H.getTZOffset,
@@ -7197,7 +7211,7 @@
7197
7211
  useUTC: true,
7198
7212
  //timezoneOffset: 0,
7199
7213
 
7200
- VMLRadialGradientURL: 'http://code.highcharts.com/5.0.3/gfx/vml-radial-gradient.png'
7214
+ VMLRadialGradientURL: 'http://code.highcharts.com/5.0.4/gfx/vml-radial-gradient.png'
7201
7215
 
7202
7216
  },
7203
7217
  chart: {
@@ -7521,7 +7535,6 @@
7521
7535
  *
7522
7536
  * License: www.highcharts.com/license
7523
7537
  */
7524
- 'use strict';
7525
7538
  var arrayMax = H.arrayMax,
7526
7539
  arrayMin = H.arrayMin,
7527
7540
  defined = H.defined,
@@ -7847,14 +7860,12 @@
7847
7860
  *
7848
7861
  * License: www.highcharts.com/license
7849
7862
  */
7850
- 'use strict';
7851
7863
  var correctFloat = H.correctFloat,
7852
7864
  defined = H.defined,
7853
7865
  destroyObjectProperties = H.destroyObjectProperties,
7854
7866
  isNumber = H.isNumber,
7855
7867
  merge = H.merge,
7856
7868
  pick = H.pick,
7857
- stop = H.stop,
7858
7869
  deg2rad = H.deg2rad;
7859
7870
 
7860
7871
  /**
@@ -8241,7 +8252,6 @@
8241
8252
  xy.opacity = opacity;
8242
8253
  label[tick.isNew ? 'attr' : 'animate'](xy);
8243
8254
  } else {
8244
- stop(label); // #5332
8245
8255
  label.attr('y', -9999); // #1338
8246
8256
  }
8247
8257
  tick.isNew = false;
@@ -8263,7 +8273,6 @@
8263
8273
  *
8264
8274
  * License: www.highcharts.com/license
8265
8275
  */
8266
- 'use strict';
8267
8276
 
8268
8277
  var addEvent = H.addEvent,
8269
8278
  animObject = H.animObject,
@@ -10832,7 +10841,6 @@
10832
10841
  *
10833
10842
  * License: www.highcharts.com/license
10834
10843
  */
10835
- 'use strict';
10836
10844
  var Axis = H.Axis,
10837
10845
  Date = H.Date,
10838
10846
  dateFormat = H.dateFormat,
@@ -11086,7 +11094,6 @@
11086
11094
  *
11087
11095
  * License: www.highcharts.com/license
11088
11096
  */
11089
- 'use strict';
11090
11097
  var Axis = H.Axis,
11091
11098
  getMagnitude = H.getMagnitude,
11092
11099
  map = H.map,
@@ -11210,7 +11217,6 @@
11210
11217
  *
11211
11218
  * License: www.highcharts.com/license
11212
11219
  */
11213
- 'use strict';
11214
11220
  var dateFormat = H.dateFormat,
11215
11221
  each = H.each,
11216
11222
  extend = H.extend,
@@ -11220,7 +11226,6 @@
11220
11226
  merge = H.merge,
11221
11227
  pick = H.pick,
11222
11228
  splat = H.splat,
11223
- stop = H.stop,
11224
11229
  syncTimeout = H.syncTimeout,
11225
11230
  timeUnits = H.timeUnits;
11226
11231
  /**
@@ -11673,7 +11678,6 @@
11673
11678
 
11674
11679
  // show it
11675
11680
  if (tooltip.isHidden) {
11676
- stop(label);
11677
11681
  label.attr({
11678
11682
  opacity: 1
11679
11683
  }).show();
@@ -11954,7 +11958,6 @@
11954
11958
  *
11955
11959
  * License: www.highcharts.com/license
11956
11960
  */
11957
- 'use strict';
11958
11961
  var addEvent = H.addEvent,
11959
11962
  attr = H.attr,
11960
11963
  charts = H.charts,
@@ -12733,7 +12736,6 @@
12733
12736
  *
12734
12737
  * License: www.highcharts.com/license
12735
12738
  */
12736
- 'use strict';
12737
12739
  var charts = H.charts,
12738
12740
  each = H.each,
12739
12741
  extend = H.extend,
@@ -12938,6 +12940,11 @@
12938
12940
  pinchDown,
12939
12941
  isInside;
12940
12942
 
12943
+ if (chart.index !== H.hoverChartIndex) {
12944
+ this.onContainerMouseLeave({
12945
+ relatedTarget: true
12946
+ });
12947
+ }
12941
12948
  H.hoverChartIndex = chart.index;
12942
12949
 
12943
12950
  if (e.touches.length === 1) {
@@ -13006,7 +13013,6 @@
13006
13013
  *
13007
13014
  * License: www.highcharts.com/license
13008
13015
  */
13009
- 'use strict';
13010
13016
  var addEvent = H.addEvent,
13011
13017
  charts = H.charts,
13012
13018
  css = H.css,
@@ -13126,7 +13132,6 @@
13126
13132
  *
13127
13133
  * License: www.highcharts.com/license
13128
13134
  */
13129
- 'use strict';
13130
13135
  var Legend,
13131
13136
 
13132
13137
  addEvent = H.addEvent,
@@ -14066,7 +14071,6 @@
14066
14071
  *
14067
14072
  * License: www.highcharts.com/license
14068
14073
  */
14069
- 'use strict';
14070
14074
  var addEvent = H.addEvent,
14071
14075
  animate = H.animate,
14072
14076
  animObject = H.animObject,
@@ -15621,7 +15625,6 @@
15621
15625
  *
15622
15626
  * License: www.highcharts.com/license
15623
15627
  */
15624
- 'use strict';
15625
15628
  var Point,
15626
15629
 
15627
15630
  each = H.each,
@@ -15968,7 +15971,6 @@
15968
15971
  *
15969
15972
  * License: www.highcharts.com/license
15970
15973
  */
15971
- 'use strict';
15972
15974
  var addEvent = H.addEvent,
15973
15975
  animObject = H.animObject,
15974
15976
  arrayMax = H.arrayMax,
@@ -17986,7 +17988,6 @@
17986
17988
  *
17987
17989
  * License: www.highcharts.com/license
17988
17990
  */
17989
- 'use strict';
17990
17991
  var Axis = H.Axis,
17991
17992
  Chart = H.Chart,
17992
17993
  correctFloat = H.correctFloat,
@@ -18472,7 +18473,6 @@
18472
18473
  *
18473
18474
  * License: www.highcharts.com/license
18474
18475
  */
18475
- 'use strict';
18476
18476
  var addEvent = H.addEvent,
18477
18477
  animate = H.animate,
18478
18478
  Axis = H.Axis,
@@ -19183,7 +19183,6 @@
19183
19183
  *
19184
19184
  * License: www.highcharts.com/license
19185
19185
  */
19186
- 'use strict';
19187
19186
  var color = H.color,
19188
19187
  each = H.each,
19189
19188
  LegendSymbolMixin = H.LegendSymbolMixin,
@@ -19513,7 +19512,6 @@
19513
19512
  *
19514
19513
  * License: www.highcharts.com/license
19515
19514
  */
19516
- 'use strict';
19517
19515
  var pick = H.pick,
19518
19516
  seriesType = H.seriesType;
19519
19517
 
@@ -19649,7 +19647,6 @@
19649
19647
  *
19650
19648
  * License: www.highcharts.com/license
19651
19649
  */
19652
- 'use strict';
19653
19650
  var areaProto = H.seriesTypes.area.prototype,
19654
19651
  defaultPlotOptions = H.defaultPlotOptions,
19655
19652
  LegendSymbolMixin = H.LegendSymbolMixin,
@@ -19672,7 +19669,6 @@
19672
19669
  *
19673
19670
  * License: www.highcharts.com/license
19674
19671
  */
19675
- 'use strict';
19676
19672
  var animObject = H.animObject,
19677
19673
  color = H.color,
19678
19674
  each = H.each,
@@ -19684,7 +19680,6 @@
19684
19680
  pick = H.pick,
19685
19681
  Series = H.Series,
19686
19682
  seriesType = H.seriesType,
19687
- stop = H.stop,
19688
19683
  svg = H.svg;
19689
19684
  /**
19690
19685
  * The column series type.
@@ -20040,7 +20035,6 @@
20040
20035
  shapeArgs = point.shapeArgs;
20041
20036
 
20042
20037
  if (graphic) { // update
20043
- stop(graphic);
20044
20038
  graphic[chart.pointCount < animationLimit ? 'animate' : 'attr'](
20045
20039
  merge(shapeArgs)
20046
20040
  );
@@ -20135,7 +20129,6 @@
20135
20129
  *
20136
20130
  * License: www.highcharts.com/license
20137
20131
  */
20138
- 'use strict';
20139
20132
 
20140
20133
  var seriesType = H.seriesType;
20141
20134
 
@@ -20153,7 +20146,6 @@
20153
20146
  *
20154
20147
  * License: www.highcharts.com/license
20155
20148
  */
20156
- 'use strict';
20157
20149
  var Series = H.Series,
20158
20150
  seriesType = H.seriesType;
20159
20151
  /**
@@ -20191,7 +20183,6 @@
20191
20183
  *
20192
20184
  * License: www.highcharts.com/license
20193
20185
  */
20194
- 'use strict';
20195
20186
  var pick = H.pick,
20196
20187
  relativeLength = H.relativeLength;
20197
20188
 
@@ -20241,7 +20232,6 @@
20241
20232
  *
20242
20233
  * License: www.highcharts.com/license
20243
20234
  */
20244
- 'use strict';
20245
20235
  var addEvent = H.addEvent,
20246
20236
  CenteredSeriesMixin = H.CenteredSeriesMixin,
20247
20237
  defined = H.defined,
@@ -20739,7 +20729,6 @@
20739
20729
  *
20740
20730
  * License: www.highcharts.com/license
20741
20731
  */
20742
- 'use strict';
20743
20732
  var addEvent = H.addEvent,
20744
20733
  arrayMax = H.arrayMax,
20745
20734
  defined = H.defined,
@@ -20753,8 +20742,7 @@
20753
20742
  relativeLength = H.relativeLength,
20754
20743
  Series = H.Series,
20755
20744
  seriesTypes = H.seriesTypes,
20756
- stableSort = H.stableSort,
20757
- stop = H.stop;
20745
+ stableSort = H.stableSort;
20758
20746
 
20759
20747
 
20760
20748
  /**
@@ -21142,7 +21130,6 @@
21142
21130
 
21143
21131
  // Show or hide based on the final aligned position
21144
21132
  if (!visible) {
21145
- stop(dataLabel);
21146
21133
  dataLabel.attr({
21147
21134
  y: -9999
21148
21135
  });
@@ -21598,7 +21585,6 @@
21598
21585
  *
21599
21586
  * License: www.highcharts.com/license
21600
21587
  */
21601
- 'use strict';
21602
21588
  /**
21603
21589
  * Highcharts module to hide overlapping data labels. This module is included in Highcharts.
21604
21590
  */
@@ -21747,7 +21733,6 @@
21747
21733
  *
21748
21734
  * License: www.highcharts.com/license
21749
21735
  */
21750
- 'use strict';
21751
21736
  var addEvent = H.addEvent,
21752
21737
  Chart = H.Chart,
21753
21738
  createElement = H.createElement,
@@ -22438,7 +22423,6 @@
22438
22423
  // #5818, #5903
22439
22424
  .add(hasMarkers ? series.markerGroup : series.group);
22440
22425
  }
22441
- H.stop(halo);
22442
22426
  halo[move ? 'animate' : 'attr']({
22443
22427
  d: point.haloPath(haloOptions.size)
22444
22428
  });
@@ -22705,7 +22689,6 @@
22705
22689
  *
22706
22690
  * License: www.highcharts.com/license
22707
22691
  */
22708
- 'use strict';
22709
22692
  var Chart = H.Chart,
22710
22693
  each = H.each,
22711
22694
  inArray = H.inArray,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  *
4
4
  * 3D features for Highcharts JS
5
5
  *
@@ -18,7 +18,6 @@
18
18
  *
19
19
  * License: www.highcharts.com/license
20
20
  */
21
- 'use strict';
22
21
  /**
23
22
  * Mathematical Functionility
24
23
  */
@@ -141,7 +140,6 @@
141
140
  *
142
141
  * License: www.highcharts.com/license
143
142
  */
144
- 'use strict';
145
143
  var cos = Math.cos,
146
144
  PI = Math.PI,
147
145
  sin = Math.sin;
@@ -859,7 +857,6 @@
859
857
  *
860
858
  * License: www.highcharts.com/license
861
859
  */
862
- 'use strict';
863
860
  var Chart = H.Chart,
864
861
  each = H.each,
865
862
  merge = H.merge,
@@ -1097,7 +1094,6 @@
1097
1094
  *
1098
1095
  * License: www.highcharts.com/license
1099
1096
  */
1100
- 'use strict';
1101
1097
  var ZAxis,
1102
1098
 
1103
1099
  Axis = H.Axis,
@@ -1507,7 +1503,6 @@
1507
1503
  *
1508
1504
  * License: www.highcharts.com/license
1509
1505
  */
1510
- 'use strict';
1511
1506
  var each = H.each,
1512
1507
  perspective = H.perspective,
1513
1508
  pick = H.pick,
@@ -1763,7 +1758,6 @@
1763
1758
  *
1764
1759
  * License: www.highcharts.com/license
1765
1760
  */
1766
- 'use strict';
1767
1761
  var deg2rad = H.deg2rad,
1768
1762
  each = H.each,
1769
1763
  pick = H.pick,
@@ -1954,7 +1948,6 @@
1954
1948
  *
1955
1949
  * License: www.highcharts.com/license
1956
1950
  */
1957
- 'use strict';
1958
1951
  var perspective = H.perspective,
1959
1952
  pick = H.pick,
1960
1953
  seriesTypes = H.seriesTypes,
@@ -2059,7 +2052,6 @@
2059
2052
  *
2060
2053
  * License: www.highcharts.com/license
2061
2054
  */
2062
- 'use strict';
2063
2055
 
2064
2056
  var Axis = H.Axis,
2065
2057
  SVGRenderer = H.SVGRenderer,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  *
4
4
  * (c) 2009-2016 Torstein Honsi
5
5
  *
@@ -18,7 +18,6 @@
18
18
  *
19
19
  * License: www.highcharts.com/license
20
20
  */
21
- 'use strict';
22
21
  var each = H.each,
23
22
  extend = H.extend,
24
23
  merge = H.merge,
@@ -126,7 +125,6 @@
126
125
  *
127
126
  * License: www.highcharts.com/license
128
127
  */
129
- 'use strict';
130
128
  var Axis = H.Axis,
131
129
  CenteredSeriesMixin = H.CenteredSeriesMixin,
132
130
  each = H.each,
@@ -711,7 +709,6 @@
711
709
  *
712
710
  * License: www.highcharts.com/license
713
711
  */
714
- 'use strict';
715
712
  var each = H.each,
716
713
  noop = H.noop,
717
714
  pick = H.pick,
@@ -1021,7 +1018,6 @@
1021
1018
  *
1022
1019
  * License: www.highcharts.com/license
1023
1020
  */
1024
- 'use strict';
1025
1021
 
1026
1022
  var seriesType = H.seriesType,
1027
1023
  seriesTypes = H.seriesTypes;
@@ -1040,7 +1036,6 @@
1040
1036
  *
1041
1037
  * License: www.highcharts.com/license
1042
1038
  */
1043
- 'use strict';
1044
1039
  var defaultPlotOptions = H.defaultPlotOptions,
1045
1040
  each = H.each,
1046
1041
  merge = H.merge,
@@ -1148,7 +1143,6 @@
1148
1143
  *
1149
1144
  * License: www.highcharts.com/license
1150
1145
  */
1151
- 'use strict';
1152
1146
  var each = H.each,
1153
1147
  isNumber = H.isNumber,
1154
1148
  merge = H.merge,
@@ -1413,7 +1407,6 @@
1413
1407
  *
1414
1408
  * License: www.highcharts.com/license
1415
1409
  */
1416
- 'use strict';
1417
1410
  var each = H.each,
1418
1411
  noop = H.noop,
1419
1412
  pick = H.pick,
@@ -1717,7 +1710,6 @@
1717
1710
  *
1718
1711
  * License: www.highcharts.com/license
1719
1712
  */
1720
- 'use strict';
1721
1713
  var each = H.each,
1722
1714
  noop = H.noop,
1723
1715
  seriesType = H.seriesType,
@@ -1777,7 +1769,6 @@
1777
1769
  *
1778
1770
  * License: www.highcharts.com/license
1779
1771
  */
1780
- 'use strict';
1781
1772
  var correctFloat = H.correctFloat,
1782
1773
  isNumber = H.isNumber,
1783
1774
  noop = H.noop,
@@ -2082,7 +2073,6 @@
2082
2073
  *
2083
2074
  * License: www.highcharts.com/license
2084
2075
  */
2085
- 'use strict';
2086
2076
  var LegendSymbolMixin = H.LegendSymbolMixin,
2087
2077
  noop = H.noop,
2088
2078
  Series = H.Series,
@@ -2142,7 +2132,6 @@
2142
2132
  *
2143
2133
  * License: www.highcharts.com/license
2144
2134
  */
2145
- 'use strict';
2146
2135
  var arrayMax = H.arrayMax,
2147
2136
  arrayMin = H.arrayMin,
2148
2137
  Axis = H.Axis,
@@ -2498,7 +2487,6 @@
2498
2487
  *
2499
2488
  * License: www.highcharts.com/license
2500
2489
  */
2501
- 'use strict';
2502
2490
 
2503
2491
  /**
2504
2492
  * Extensions for polar charts. Additionally, much of the geometry required for polar charts is
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * Accessibility module
4
4
  *
5
5
  * (c) 2010-2016 Highsoft AS
@@ -23,7 +23,6 @@
23
23
  *
24
24
  * License: www.highcharts.com/license
25
25
  */
26
- 'use strict';
27
26
 
28
27
  var win = H.win,
29
28
  doc = win.document,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  *
4
4
  * (c) 2009-2016 Torstein Honsi
5
5
  *
@@ -18,7 +18,6 @@
18
18
  *
19
19
  * License: www.highcharts.com/license
20
20
  */
21
- 'use strict';
22
21
 
23
22
  var defined = H.defined,
24
23
  isNumber = H.isNumber,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * Boost module
4
4
  *
5
5
  * (c) 2010-2016 Highsoft AS
@@ -52,6 +52,7 @@
52
52
  * - Point markers are not drawn on line-type series
53
53
  * - Lines are not drawn on scatter charts
54
54
  * - Zones and negativeColor don't work
55
+ * - Initial point colors aren't rendered
55
56
  * - Columns are always one pixel wide. Don't set the threshold too low.
56
57
  *
57
58
  * Optimizing tips for users
@@ -64,7 +65,6 @@
64
65
  * use optimizations.
65
66
  */
66
67
 
67
- 'use strict';
68
68
 
69
69
  var win = H.win,
70
70
  doc = win.document,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  *
4
4
  * (c) 2009-2016 Torstein Honsi
5
5
  *
@@ -18,7 +18,6 @@
18
18
  *
19
19
  * License: www.highcharts.com/license
20
20
  */
21
- 'use strict';
22
21
 
23
22
  var pick = H.pick,
24
23
  wrap = H.wrap,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * Data module
4
4
  *
5
5
  * (c) 2012-2016 Torstein Honsi
@@ -23,7 +23,6 @@
23
23
  */
24
24
 
25
25
  /* global jQuery */
26
- 'use strict';
27
26
 
28
27
  // Utilities
29
28
  var win = Highcharts.win,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * Highcharts Drilldown module
4
4
  *
5
5
  * Author: Torstein Honsi
@@ -22,7 +22,6 @@
22
22
  *
23
23
  */
24
24
 
25
- 'use strict';
26
25
 
27
26
  var noop = H.noop,
28
27
  color = H.color,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * Exporting module
4
4
  *
5
5
  * (c) 2010-2016 Torstein Honsi
@@ -23,7 +23,6 @@
23
23
  */
24
24
 
25
25
  /* eslint indent:0 */
26
- 'use strict';
27
26
 
28
27
  // create shortcuts
29
28
  var defaultOptions = H.defaultOptions,
@@ -39,7 +38,6 @@
39
38
  pick = H.pick,
40
39
  each = H.each,
41
40
  extend = H.extend,
42
- splat = H.splat,
43
41
  isTouchDevice = H.isTouchDevice,
44
42
  win = H.win,
45
43
  SVGRenderer = H.SVGRenderer;
@@ -207,10 +205,25 @@
207
205
  extend(Chart.prototype, {
208
206
 
209
207
  /**
210
- * A collection of regex fixes on the produces SVG to account for expando properties,
208
+ * A collection of fixes on the produced SVG to account for expando properties,
211
209
  * browser bugs, VML problems and other. Returns a cleaned SVG.
212
210
  */
213
- sanitizeSVG: function(svg) {
211
+ sanitizeSVG: function(svg, options) {
212
+ // Move HTML into a foreignObject
213
+ if (options && options.exporting && options.exporting.allowHTML) {
214
+ var html = svg.match(/<\/svg>(.*?$)/);
215
+ if (html) {
216
+ html = '<foreignObject x="0" y="0" ' +
217
+ 'width="' + options.chart.width + '" ' +
218
+ 'height="' + options.chart.height + '">' +
219
+ '<body xmlns="http://www.w3.org/1999/xhtml">' +
220
+ html[1] +
221
+ '</body>' +
222
+ '</foreignObject>';
223
+ svg = svg.replace('</svg>', html + '</svg>');
224
+ }
225
+ }
226
+
214
227
  svg = svg
215
228
  .replace(/zIndex="[^"]+"/g, '')
216
229
  .replace(/isShadow="[^"]+"/g, '')
@@ -263,9 +276,13 @@
263
276
  },
264
277
 
265
278
  /**
266
- * Return an SVG representation of the chart
279
+ * Return an SVG representation of the chart.
267
280
  *
268
- * @param additionalOptions {Object} Additional chart options for the generated SVG representation
281
+ * @param additionalOptions {Object} Additional chart options for the
282
+ * generated SVG representation. For collections like `xAxis`, `yAxis` or
283
+ * `series`, the additional options is either merged in to the orininal
284
+ * item of the same `id`, or to the first item if a commin id is not
285
+ * found.
269
286
  */
270
287
  getSVG: function(additionalOptions) {
271
288
  var chart = this,
@@ -277,9 +294,7 @@
277
294
  sourceHeight,
278
295
  cssWidth,
279
296
  cssHeight,
280
- html,
281
- options = merge(chart.options, additionalOptions), // copy the options and add extra options
282
- allowHTML = options.exporting.allowHTML;
297
+ options = merge(chart.options, additionalOptions); // copy the options and add extra options
283
298
 
284
299
 
285
300
  // IE compatibility hack for generating SVG content that it doesn't really understand
@@ -336,18 +351,20 @@
336
351
  }
337
352
  });
338
353
 
339
- // Axis options must be merged in one by one, since it may be an array or an object (#2022, #3900)
354
+ // generate the chart copy
355
+ chartCopy = new H.Chart(options, chart.callback);
356
+
357
+ // Axis options and series options (#2022, #3900, #5982)
340
358
  if (additionalOptions) {
341
- each(['xAxis', 'yAxis'], function(axisType) {
342
- each(splat(additionalOptions[axisType]), function(axisOptions, i) {
343
- options[axisType][i] = merge(options[axisType][i], axisOptions);
344
- });
359
+ each(['xAxis', 'yAxis', 'series'], function(coll) {
360
+ var collOptions = {};
361
+ if (additionalOptions[coll]) {
362
+ collOptions[coll] = additionalOptions[coll];
363
+ chartCopy.update(collOptions);
364
+ }
345
365
  });
346
366
  }
347
367
 
348
- // generate the chart copy
349
- chartCopy = new H.Chart(options, chart.callback);
350
-
351
368
  // reflect axis extremes in the export
352
369
  each(['xAxis', 'yAxis'], function(axisType) {
353
370
  each(chart[axisType], function(axis, i) {
@@ -362,36 +379,16 @@
362
379
  });
363
380
  });
364
381
 
365
- // get the SVG from the container's innerHTML
382
+ // Get the SVG from the container's innerHTML
366
383
  svg = chartCopy.getChartHTML();
367
384
 
385
+ svg = chart.sanitizeSVG(svg, options);
386
+
368
387
  // free up memory
369
388
  options = null;
370
389
  chartCopy.destroy();
371
390
  discardElement(sandbox);
372
391
 
373
- // Move HTML into a foreignObject
374
- if (allowHTML) {
375
- html = svg.match(/<\/svg>(.*?$)/);
376
- if (html) {
377
- html = '<foreignObject x="0" y="0" ' +
378
- 'width="' + sourceWidth + '" ' +
379
- 'height="' + sourceHeight + '">' +
380
- '<body xmlns="http://www.w3.org/1999/xhtml">' +
381
- html[1] +
382
- '</body>' +
383
- '</foreignObject>';
384
- svg = svg.replace('</svg>', html + '</svg>');
385
- }
386
- }
387
-
388
- // sanitize
389
- svg = this.sanitizeSVG(svg);
390
-
391
- // IE9 beta bugs with innerHTML. Test again with final IE9.
392
- svg = svg.replace(/(url\(#highcharts-[0-9]+)&quot;/g, '$1')
393
- .replace(/&quot;/g, '\'');
394
-
395
392
  return svg;
396
393
  },
397
394
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * Highcharts funnel module
4
4
  *
5
5
  * (c) 2010-2016 Torstein Honsi
@@ -22,7 +22,6 @@
22
22
  * License: www.highcharts.com/license
23
23
  */
24
24
  /* eslint indent:0 */
25
- 'use strict';
26
25
 
27
26
  // create shortcuts
28
27
  var seriesType = Highcharts.seriesType,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * GridAxis
4
4
  *
5
5
  * (c) 2016 Lars A. V. Cabrera
@@ -22,7 +22,6 @@
22
22
  *
23
23
  * License: www.highcharts.com/license
24
24
  */
25
- 'use strict';
26
25
 
27
26
  var dateFormat = H.dateFormat,
28
27
  each = H.each,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  *
4
4
  * (c) 2009-2016 Torstein Honsi
5
5
  *
@@ -18,7 +18,6 @@
18
18
  *
19
19
  * License: www.highcharts.com/license
20
20
  */
21
- 'use strict';
22
21
  var Axis = H.Axis,
23
22
  Chart = H.Chart,
24
23
  color = H.color,
@@ -582,7 +581,6 @@
582
581
  *
583
582
  * License: www.highcharts.com/license
584
583
  */
585
- 'use strict';
586
584
  var defined = H.defined,
587
585
  each = H.each,
588
586
  noop = H.noop,
@@ -669,7 +667,6 @@
669
667
  *
670
668
  * License: www.highcharts.com/license
671
669
  */
672
- 'use strict';
673
670
  var colorPointMixin = H.colorPointMixin,
674
671
  colorSeriesMixin = H.colorSeriesMixin,
675
672
  each = H.each,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * Plugin for displaying a message when there is no data visible in chart.
4
4
  *
5
5
  * (c) 2010-2016 Highsoft AS
@@ -23,7 +23,6 @@
23
23
  *
24
24
  * License: www.highcharts.com/license
25
25
  */
26
- 'use strict';
27
26
 
28
27
  var seriesTypes = H.seriesTypes,
29
28
  chartPrototype = H.Chart.prototype,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * Client side exporting module
4
4
  *
5
5
  * (c) 2015 Torstein Honsi / Oystein Moseng
@@ -22,7 +22,6 @@
22
22
  * License: www.highcharts.com/license
23
23
  */
24
24
 
25
- 'use strict';
26
25
  /*global MSBlobBuilder */
27
26
 
28
27
  var merge = Highcharts.merge,
@@ -327,9 +326,14 @@
327
326
  images,
328
327
  imagesEmbedded = 0,
329
328
  chartCopyContainer,
329
+ chartCopyOptions,
330
330
  el,
331
331
  i,
332
332
  l,
333
+ // After grabbing the SVG of the chart's copy container we need to do sanitation on the SVG
334
+ sanitize = function(svg) {
335
+ return chart.sanitizeSVG(svg, chartCopyOptions);
336
+ },
333
337
  // Success handler, we converted image to base64!
334
338
  embeddedSuccess = function(imageURL, imageType, callbackArgs) {
335
339
  ++imagesEmbedded;
@@ -339,7 +343,7 @@
339
343
 
340
344
  // When done with last image we have our SVG
341
345
  if (imagesEmbedded === images.length) {
342
- successCallback(chart.sanitizeSVG(chartCopyContainer.innerHTML));
346
+ successCallback(sanitize(chartCopyContainer.innerHTML));
343
347
  }
344
348
  };
345
349
 
@@ -352,6 +356,7 @@
352
356
  this,
353
357
  Array.prototype.slice.call(arguments, 1)
354
358
  );
359
+ chartCopyOptions = this.options;
355
360
  chartCopyContainer = this.container.cloneNode(true);
356
361
  return ret;
357
362
  }
@@ -364,7 +369,7 @@
364
369
  try {
365
370
  // If there are no images to embed, the SVG is okay now.
366
371
  if (!images.length) {
367
- successCallback(chart.sanitizeSVG(chartCopyContainer.innerHTML)); // Use SVG of chart copy
372
+ successCallback(sanitize(chartCopyContainer.innerHTML)); // Use SVG of chart copy
368
373
  return;
369
374
  }
370
375
 
@@ -406,12 +411,25 @@
406
411
  }
407
412
  },
408
413
  svgSuccess = function(svg) {
409
- Highcharts.downloadSVGLocal(svg, options, fallbackToExportServer);
414
+ // If SVG contains foreignObjects all exports except SVG will fail,
415
+ // as both CanVG and svg2pdf choke on this. Gracefully fall back.
416
+ if (
417
+ svg.indexOf('<foreignObject') > -1 &&
418
+ options.type !== 'image/svg+xml'
419
+ ) {
420
+ fallbackToExportServer();
421
+ } else {
422
+ Highcharts.downloadSVGLocal(svg, options, fallbackToExportServer);
423
+ }
410
424
  };
411
425
 
412
- // If we have embedded images and are exporting to JPEG/PNG, Microsoft browsers won't handle it, so fall back.
413
- // Also fall back for embedded images with PDF.
414
- if ((isMSBrowser && options.type !== 'image/svg+xml' || options.type === 'application/pdf') && chart.container.getElementsByTagName('image').length) {
426
+ // If we have embedded images and are exporting to JPEG/PNG, Microsoft
427
+ // browsers won't handle it, so fall back.
428
+ if (
429
+ (isMSBrowser && options.type !== 'image/svg+xml' ||
430
+ options.type === 'application/pdf') &&
431
+ chart.container.getElementsByTagName('image').length
432
+ ) {
415
433
  fallbackToExportServer();
416
434
  return;
417
435
  }
@@ -421,7 +439,7 @@
421
439
 
422
440
  // Extend the default options to use the local exporter logic
423
441
  merge(true, Highcharts.getOptions().exporting, {
424
- libURL: 'https://code.highcharts.com/5.0.3/lib/',
442
+ libURL: 'https://code.highcharts.com/5.0.4/lib/',
425
443
  buttons: {
426
444
  contextButton: {
427
445
  menuItems: [{
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  *
4
4
  * (c) 2009-2016 Torstein Honsi
5
5
  *
@@ -18,7 +18,6 @@
18
18
  *
19
19
  * License: www.highcharts.com/license
20
20
  */
21
- 'use strict';
22
21
  /**
23
22
  * Highcharts module to hide overlapping data labels. This module is included in Highcharts.
24
23
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  *
4
4
  * (c) 2009-2016 Torstein Honsi
5
5
  *
@@ -33,7 +33,6 @@
33
33
  * http://jsfiddle.net/highcharts/y5A37/
34
34
  */
35
35
 
36
- 'use strict';
37
36
 
38
37
  var labelDistance = 3,
39
38
  wrap = H.wrap,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * Solid angular gauge module
4
4
  *
5
5
  * (c) 2010-2016 Torstein Honsi
@@ -22,7 +22,6 @@
22
22
  * License: www.highcharts.com/license
23
23
  */
24
24
 
25
- 'use strict';
26
25
 
27
26
  var pInt = H.pInt,
28
27
  pick = H.pick,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  *
4
4
  * (c) 2014 Highsoft AS
5
5
  * Authors: Jon Arild Nygard / Oystein Moseng
@@ -20,7 +20,6 @@
20
20
  *
21
21
  * License: www.highcharts.com/license
22
22
  */
23
- 'use strict';
24
23
 
25
24
  var seriesType = H.seriesType,
26
25
  seriesTypes = H.seriesTypes,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.3 (2016-11-18)
2
+ * @license Highcharts JS v5.0.4 (2016-11-25)
3
3
  * X-range series
4
4
  *
5
5
  * (c) 2010-2016 Torstein Honsi, Lars A. V. Cabrera
@@ -22,7 +22,6 @@
22
22
  *
23
23
  * License: www.highcharts.com/license
24
24
  */
25
- 'use strict';
26
25
 
27
26
  var defaultPlotOptions = H.getOptions().plotOptions,
28
27
  color = H.Color,
@@ -34,7 +33,6 @@
34
33
  merge = H.merge,
35
34
  pick = H.pick,
36
35
  seriesTypes = H.seriesTypes,
37
- stop = H.stop,
38
36
  wrap = H.wrap,
39
37
  Axis = H.Axis,
40
38
  Point = H.Point,
@@ -190,7 +188,6 @@
190
188
 
191
189
  if (isNumber(plotY) && point.y !== null) {
192
190
  if (graphic) { // update
193
- stop(graphic);
194
191
  point.graphicOriginal[verb](
195
192
  merge(shapeArgs)
196
193
  );
@@ -1,3 +1,3 @@
1
1
  module Highcharts
2
- VERSION = "5.0.3"
2
+ VERSION = "5.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: highcharts-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.3
4
+ version: 5.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Per Christian B. Viken