highcharts-rails 5.0.7 → 5.0.8

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 (26) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.markdown +41 -0
  3. data/README.markdown +3 -6
  4. data/app/assets/javascripts/highcharts.js +758 -455
  5. data/app/assets/javascripts/highcharts/highcharts-3d.js +58 -50
  6. data/app/assets/javascripts/highcharts/highcharts-more.js +21 -35
  7. data/app/assets/javascripts/highcharts/modules/accessibility.js +69 -39
  8. data/app/assets/javascripts/highcharts/modules/annotations.js +2 -2
  9. data/app/assets/javascripts/highcharts/modules/boost.js +2316 -337
  10. data/app/assets/javascripts/highcharts/modules/broken-axis.js +17 -3
  11. data/app/assets/javascripts/highcharts/modules/data.js +2 -2
  12. data/app/assets/javascripts/highcharts/modules/drilldown.js +6 -6
  13. data/app/assets/javascripts/highcharts/modules/exporting.js +4 -4
  14. data/app/assets/javascripts/highcharts/modules/funnel.js +4 -4
  15. data/app/assets/javascripts/highcharts/modules/grid-axis.js +6 -6
  16. data/app/assets/javascripts/highcharts/modules/heatmap.js +10 -7
  17. data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +2 -2
  18. data/app/assets/javascripts/highcharts/modules/offline-exporting.js +3 -3
  19. data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +3 -3
  20. data/app/assets/javascripts/highcharts/modules/series-label.js +2 -2
  21. data/app/assets/javascripts/highcharts/modules/solid-gauge.js +40 -4
  22. data/app/assets/javascripts/highcharts/modules/stock.js +100 -81
  23. data/app/assets/javascripts/highcharts/modules/treemap.js +36 -9
  24. data/app/assets/javascripts/highcharts/modules/xrange-series.js +2 -2
  25. data/lib/highcharts/version.rb +1 -1
  26. metadata +2 -2
@@ -1,10 +1,11 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  *
4
4
  * 3D features for Highcharts JS
5
5
  *
6
6
  * @license: www.highcharts.com/license
7
7
  */
8
+ 'use strict';
8
9
  (function(factory) {
9
10
  if (typeof module === 'object' && module.exports) {
10
11
  module.exports = factory;
@@ -18,7 +19,6 @@
18
19
  *
19
20
  * License: www.highcharts.com/license
20
21
  */
21
- 'use strict';
22
22
  /**
23
23
  * Mathematical Functionility
24
24
  */
@@ -141,7 +141,6 @@
141
141
  *
142
142
  * License: www.highcharts.com/license
143
143
  */
144
- 'use strict';
145
144
  var cos = Math.cos,
146
145
  PI = Math.PI,
147
146
  sin = Math.sin;
@@ -300,6 +299,13 @@
300
299
  };
301
300
 
302
301
  result.attr = function(args) {
302
+
303
+ // Resolve setting attributes by string name
304
+ if (typeof args === 'string' && arguments[1] !== undefined) {
305
+ args = {};
306
+ args[arguments[0]] = arguments[1];
307
+ }
308
+
303
309
  if (args.shapeArgs || defined(args.x)) {
304
310
  var shapeArgs = args.shapeArgs || args;
305
311
  var paths = this.renderer.cuboidPath(shapeArgs);
@@ -384,38 +390,46 @@
384
390
 
385
391
  // The 8 corners of the cube
386
392
  var pArr = [{
387
- x: x,
388
- y: y,
389
- z: z
390
- }, {
391
- x: x + w,
392
- y: y,
393
- z: z
394
- }, {
395
- x: x + w,
396
- y: y + h,
397
- z: z
398
- }, {
399
- x: x,
400
- y: y + h,
401
- z: z
402
- }, {
403
- x: x,
404
- y: y + h,
405
- z: z + d
406
- }, {
407
- x: x + w,
408
- y: y + h,
409
- z: z + d
410
- }, {
411
- x: x + w,
412
- y: y,
413
- z: z + d
414
- }, {
415
- x: x,
416
- y: y,
417
- z: z + d
418
- }];
393
+ x: x,
394
+ y: y,
395
+ z: z
396
+ },
397
+ {
398
+ x: x + w,
399
+ y: y,
400
+ z: z
401
+ },
402
+ {
403
+ x: x + w,
404
+ y: y + h,
405
+ z: z
406
+ },
407
+ {
408
+ x: x,
409
+ y: y + h,
410
+ z: z
411
+ },
412
+ {
413
+ x: x,
414
+ y: y + h,
415
+ z: z + d
416
+ },
417
+ {
418
+ x: x + w,
419
+ y: y + h,
420
+ z: z + d
421
+ },
422
+ {
423
+ x: x + w,
424
+ y: y,
425
+ z: z + d
426
+ },
427
+ {
428
+ x: x,
429
+ y: y,
430
+ z: z + d
431
+ }
432
+ ];
419
433
 
420
434
  // apply perspective
421
435
  pArr = perspective(pArr, chart, shapeArgs.insidePlotArea);
@@ -860,7 +874,6 @@
860
874
  *
861
875
  * License: www.highcharts.com/license
862
876
  */
863
- 'use strict';
864
877
  var Chart = H.Chart,
865
878
  each = H.each,
866
879
  merge = H.merge,
@@ -1099,7 +1112,6 @@
1099
1112
  *
1100
1113
  * License: www.highcharts.com/license
1101
1114
  */
1102
- 'use strict';
1103
1115
  var ZAxis,
1104
1116
 
1105
1117
  Axis = H.Axis,
@@ -1118,7 +1130,7 @@
1118
1130
  wrap(Axis.prototype, 'setOptions', function(proceed, userOptions) {
1119
1131
  var options;
1120
1132
  proceed.call(this, userOptions);
1121
- if (this.chart.is3d()) {
1133
+ if (this.chart.is3d() && this.coll !== 'colorAxis') {
1122
1134
  options = this.options;
1123
1135
  options.tickWidth = pick(options.tickWidth, 0);
1124
1136
  options.gridLineWidth = pick(options.gridLineWidth, 1);
@@ -1129,7 +1141,7 @@
1129
1141
  proceed.apply(this, [].slice.call(arguments, 1));
1130
1142
 
1131
1143
  // Do not do this if the chart is not 3D
1132
- if (!this.chart.is3d()) {
1144
+ if (!this.chart.is3d() || this.coll === 'colorAxis') {
1133
1145
  return;
1134
1146
  }
1135
1147
 
@@ -1232,7 +1244,7 @@
1232
1244
  var path = proceed.apply(this, [].slice.call(arguments, 1));
1233
1245
 
1234
1246
  // Do not do this if the chart is not 3D
1235
- if (!this.chart.is3d()) {
1247
+ if (!this.chart.is3d() || this.coll === 'colorAxis') {
1236
1248
  return path;
1237
1249
  }
1238
1250
 
@@ -1283,7 +1295,7 @@
1283
1295
 
1284
1296
  wrap(Axis.prototype, 'getPlotBandPath', function(proceed) {
1285
1297
  // Do not do this if the chart is not 3D
1286
- if (!this.chart.is3d()) {
1298
+ if (!this.chart.is3d() || this.coll === 'colorAxis') {
1287
1299
  return proceed.apply(this, [].slice.call(arguments, 1));
1288
1300
  }
1289
1301
 
@@ -1323,7 +1335,7 @@
1323
1335
  var path = proceed.apply(this, [].slice.call(arguments, 1));
1324
1336
 
1325
1337
  // Do not do this if the chart is not 3D
1326
- if (!this.axis.chart.is3d()) {
1338
+ if (!this.axis.chart.is3d() || this.coll === 'colorAxis') {
1327
1339
  return path;
1328
1340
  }
1329
1341
 
@@ -1352,7 +1364,7 @@
1352
1364
  var pos = proceed.apply(this, [].slice.call(arguments, 1));
1353
1365
 
1354
1366
  // Do not do this if the chart is not 3D
1355
- if (this.axis.chart.is3d()) {
1367
+ if (this.axis.chart.is3d() && this.coll !== 'colorAxis') {
1356
1368
  pos = perspective([this.axis.swapZ({
1357
1369
  x: pos.x,
1358
1370
  y: pos.y,
@@ -1363,7 +1375,7 @@
1363
1375
  });
1364
1376
 
1365
1377
  H.wrap(Axis.prototype, 'getTitlePosition', function(proceed) {
1366
- var is3d = this.chart.is3d(),
1378
+ var is3d = this.chart.is3d() && this.coll !== 'colorAxis',
1367
1379
  pos,
1368
1380
  axisTitleMargin;
1369
1381
 
@@ -1431,11 +1443,11 @@
1431
1443
  };
1432
1444
 
1433
1445
  ZAxis = H.ZAxis = function() {
1434
- this.isZAxis = true;
1435
1446
  this.init.apply(this, arguments);
1436
1447
  };
1437
1448
  extend(ZAxis.prototype, Axis.prototype);
1438
1449
  extend(ZAxis.prototype, {
1450
+ isZAxis: true,
1439
1451
  setOptions: function(userOptions) {
1440
1452
  userOptions = merge({
1441
1453
  offset: 0,
@@ -1474,7 +1486,7 @@
1474
1486
  axis.hasVisibleSeries = true;
1475
1487
 
1476
1488
  // Validate threshold in logarithmic axes
1477
- if (axis.isLog && threshold <= 0) {
1489
+ if (axis.positiveValuesOnly && threshold <= 0) {
1478
1490
  threshold = null;
1479
1491
  }
1480
1492
 
@@ -1518,7 +1530,6 @@
1518
1530
  *
1519
1531
  * License: www.highcharts.com/license
1520
1532
  */
1521
- 'use strict';
1522
1533
  var each = H.each,
1523
1534
  perspective = H.perspective,
1524
1535
  pick = H.pick,
@@ -1774,7 +1785,6 @@
1774
1785
  *
1775
1786
  * License: www.highcharts.com/license
1776
1787
  */
1777
- 'use strict';
1778
1788
  var deg2rad = H.deg2rad,
1779
1789
  each = H.each,
1780
1790
  pick = H.pick,
@@ -1965,7 +1975,6 @@
1965
1975
  *
1966
1976
  * License: www.highcharts.com/license
1967
1977
  */
1968
- 'use strict';
1969
1978
  var perspective = H.perspective,
1970
1979
  pick = H.pick,
1971
1980
  Point = H.Point,
@@ -2081,7 +2090,6 @@
2081
2090
  *
2082
2091
  * License: www.highcharts.com/license
2083
2092
  */
2084
- 'use strict';
2085
2093
 
2086
2094
  var Axis = H.Axis,
2087
2095
  SVGRenderer = H.SVGRenderer,
@@ -1,10 +1,11 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  *
4
4
  * (c) 2009-2016 Torstein Honsi
5
5
  *
6
6
  * License: www.highcharts.com/license
7
7
  */
8
+ 'use strict';
8
9
  (function(factory) {
9
10
  if (typeof module === 'object' && module.exports) {
10
11
  module.exports = factory;
@@ -18,7 +19,6 @@
18
19
  *
19
20
  * License: www.highcharts.com/license
20
21
  */
21
- 'use strict';
22
22
  var each = H.each,
23
23
  extend = H.extend,
24
24
  merge = H.merge,
@@ -84,7 +84,7 @@
84
84
  center: ['50%', '50%'],
85
85
  size: '85%',
86
86
  startAngle: 0
87
- //endAngle: startAngle + 360
87
+ //endAngle: startAngle + 360
88
88
  },
89
89
 
90
90
  /**
@@ -126,7 +126,6 @@
126
126
  *
127
127
  * License: www.highcharts.com/license
128
128
  */
129
- 'use strict';
130
129
  var Axis = H.Axis,
131
130
  CenteredSeriesMixin = H.CenteredSeriesMixin,
132
131
  each = H.each,
@@ -711,7 +710,6 @@
711
710
  *
712
711
  * License: www.highcharts.com/license
713
712
  */
714
- 'use strict';
715
713
  var each = H.each,
716
714
  noop = H.noop,
717
715
  pick = H.pick,
@@ -1029,7 +1027,6 @@
1029
1027
  *
1030
1028
  * License: www.highcharts.com/license
1031
1029
  */
1032
- 'use strict';
1033
1030
 
1034
1031
  var seriesType = H.seriesType,
1035
1032
  seriesTypes = H.seriesTypes;
@@ -1048,7 +1045,6 @@
1048
1045
  *
1049
1046
  * License: www.highcharts.com/license
1050
1047
  */
1051
- 'use strict';
1052
1048
  var defaultPlotOptions = H.defaultPlotOptions,
1053
1049
  each = H.each,
1054
1050
  merge = H.merge,
@@ -1158,7 +1154,6 @@
1158
1154
  *
1159
1155
  * License: www.highcharts.com/license
1160
1156
  */
1161
- 'use strict';
1162
1157
  var each = H.each,
1163
1158
  isNumber = H.isNumber,
1164
1159
  merge = H.merge,
@@ -1423,7 +1418,6 @@
1423
1418
  *
1424
1419
  * License: www.highcharts.com/license
1425
1420
  */
1426
- 'use strict';
1427
1421
  var each = H.each,
1428
1422
  noop = H.noop,
1429
1423
  pick = H.pick,
@@ -1727,7 +1721,6 @@
1727
1721
  *
1728
1722
  * License: www.highcharts.com/license
1729
1723
  */
1730
- 'use strict';
1731
1724
  var each = H.each,
1732
1725
  noop = H.noop,
1733
1726
  seriesType = H.seriesType,
@@ -1787,7 +1780,6 @@
1787
1780
  *
1788
1781
  * License: www.highcharts.com/license
1789
1782
  */
1790
- 'use strict';
1791
1783
  var correctFloat = H.correctFloat,
1792
1784
  isNumber = H.isNumber,
1793
1785
  noop = H.noop,
@@ -1839,11 +1831,9 @@
1839
1831
  previousIntermediate,
1840
1832
  range,
1841
1833
  minPointLength = pick(options.minPointLength, 5),
1834
+ halfMinPointLength = minPointLength / 2,
1842
1835
  threshold = options.threshold,
1843
1836
  stacking = options.stacking,
1844
- // Separate offsets for negative and positive columns:
1845
- positiveOffset = 0,
1846
- negativeOffset = 0,
1847
1837
  stackIndicator,
1848
1838
  tooltipY;
1849
1839
 
@@ -1881,12 +1871,12 @@
1881
1871
  if (point.isSum) {
1882
1872
  shapeArgs.y = yAxis.toPixels(range[1], true);
1883
1873
  shapeArgs.height = Math.min(yAxis.toPixels(range[0], true), yAxis.len) -
1884
- shapeArgs.y + positiveOffset + negativeOffset; // #4256
1874
+ shapeArgs.y; // #4256
1885
1875
 
1886
1876
  } else if (point.isIntermediateSum) {
1887
1877
  shapeArgs.y = yAxis.toPixels(range[1], true);
1888
1878
  shapeArgs.height = Math.min(yAxis.toPixels(previousIntermediate, true), yAxis.len) -
1889
- shapeArgs.y + positiveOffset + negativeOffset;
1879
+ shapeArgs.y;
1890
1880
  previousIntermediate = range[1];
1891
1881
 
1892
1882
  // If it's not the sum point, update previous stack end position and get
@@ -1907,25 +1897,22 @@
1907
1897
  shapeArgs.height = Math.max(Math.round(shapeArgs.height), 0.001); // #3151
1908
1898
  point.yBottom = shapeArgs.y + shapeArgs.height;
1909
1899
 
1910
- // Before minPointLength, apply negative offset:
1911
- shapeArgs.y -= negativeOffset;
1912
-
1913
-
1914
1900
  if (shapeArgs.height <= minPointLength && !point.isNull) {
1915
1901
  shapeArgs.height = minPointLength;
1902
+ shapeArgs.y -= halfMinPointLength;
1903
+ point.plotY = shapeArgs.y;
1916
1904
  if (point.y < 0) {
1917
- negativeOffset -= minPointLength;
1905
+ point.minPointLengthOffset = -halfMinPointLength;
1918
1906
  } else {
1919
- positiveOffset += minPointLength;
1907
+ point.minPointLengthOffset = halfMinPointLength;
1920
1908
  }
1909
+ } else {
1910
+ point.minPointLengthOffset = 0;
1921
1911
  }
1922
1912
 
1923
- // After minPointLength is updated, apply positive offset:
1924
- shapeArgs.y -= positiveOffset;
1925
-
1926
1913
  // Correct tooltip placement (#3014)
1927
- tooltipY = point.plotY - negativeOffset - positiveOffset +
1928
- (point.negative && negativeOffset >= 0 ? shapeArgs.height : 0);
1914
+ tooltipY = point.plotY + (point.negative ? shapeArgs.height : 0);
1915
+
1929
1916
  if (series.chart.inverted) {
1930
1917
  point.tooltipPos[0] = yAxis.len - tooltipY;
1931
1918
  } else {
@@ -2043,9 +2030,11 @@
2043
2030
 
2044
2031
  d = [
2045
2032
  'M',
2046
- prevArgs.x + prevArgs.width, prevArgs.y + normalizer,
2033
+ prevArgs.x + prevArgs.width,
2034
+ prevArgs.y + data[i - 1].minPointLengthOffset + normalizer,
2047
2035
  'L',
2048
- pointArgs.x, prevArgs.y + normalizer
2036
+ pointArgs.x,
2037
+ prevArgs.y + data[i - 1].minPointLengthOffset + normalizer
2049
2038
  ];
2050
2039
 
2051
2040
  if (data[i - 1].y < 0) {
@@ -2107,7 +2096,6 @@
2107
2096
  *
2108
2097
  * License: www.highcharts.com/license
2109
2098
  */
2110
- 'use strict';
2111
2099
  var LegendSymbolMixin = H.LegendSymbolMixin,
2112
2100
  noop = H.noop,
2113
2101
  Series = H.Series,
@@ -2167,7 +2155,6 @@
2167
2155
  *
2168
2156
  * License: www.highcharts.com/license
2169
2157
  */
2170
- 'use strict';
2171
2158
  var arrayMax = H.arrayMax,
2172
2159
  arrayMin = H.arrayMin,
2173
2160
  Axis = H.Axis,
@@ -2361,11 +2348,11 @@
2361
2348
 
2362
2349
  if (isNumber(radius) && radius >= this.minPxSize / 2) {
2363
2350
  // Shape arguments
2364
- point.marker = {
2351
+ point.marker = H.extend(point.marker, {
2365
2352
  radius: radius,
2366
2353
  width: 2 * radius,
2367
2354
  height: 2 * radius
2368
- };
2355
+ });
2369
2356
 
2370
2357
  // Alignment box for the data label
2371
2358
  point.dlBox = {
@@ -2389,7 +2376,7 @@
2389
2376
  haloPath: function(size) {
2390
2377
  return Point.prototype.haloPath.call(
2391
2378
  this,
2392
- size === 0 ? 0 : this.marker.radius + size // #6067
2379
+ size === 0 ? 0 : (this.marker ? this.marker.radius || 0 : 0) + size // #6067
2393
2380
  );
2394
2381
  },
2395
2382
  ttBelow: false
@@ -2510,7 +2497,6 @@
2510
2497
  *
2511
2498
  * License: www.highcharts.com/license
2512
2499
  */
2513
- 'use strict';
2514
2500
 
2515
2501
  /**
2516
2502
  * Extensions for polar charts. Additionally, much of the geometry required for polar charts is