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
  * (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
 
23
23
  var pick = H.pick,
24
24
  wrap = H.wrap,
@@ -172,6 +172,7 @@
172
172
  brk,
173
173
  min = axis.userMin || axis.min,
174
174
  max = axis.userMax || axis.max,
175
+ pointRangePadding = pick(axis.pointRangePadding, 0),
175
176
  start,
176
177
  i,
177
178
  j;
@@ -247,9 +248,22 @@
247
248
 
248
249
  axis.breakArray = breakArray;
249
250
 
251
+ // Used with staticScale, and below, the actual axis length when
252
+ // breaks are substracted.
253
+ axis.unitLength = max - min - length + pointRangePadding;
254
+
250
255
  fireEvent(axis, 'afterBreaks');
251
256
 
252
- axis.transA *= ((max - axis.min) / (max - min - length));
257
+ if (axis.options.staticScale) {
258
+ axis.transA = axis.options.staticScale;
259
+ } else {
260
+ axis.transA *= (max - axis.min + pointRangePadding) /
261
+ axis.unitLength;
262
+ }
263
+
264
+ if (pointRangePadding) {
265
+ axis.minPixelPadding = axis.transA * axis.minPointOffset;
266
+ }
253
267
 
254
268
  axis.min = min;
255
269
  axis.max = max;
@@ -1,11 +1,12 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  * Data module
4
4
  *
5
5
  * (c) 2012-2016 Torstein Honsi
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
9
+ 'use strict';
9
10
  (function(factory) {
10
11
  if (typeof module === 'object' && module.exports) {
11
12
  module.exports = factory;
@@ -23,7 +24,6 @@
23
24
  */
24
25
 
25
26
  /* global jQuery */
26
- 'use strict';
27
27
 
28
28
  // Utilities
29
29
  var win = Highcharts.win,
@@ -1,11 +1,12 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  * Highcharts Drilldown module
4
4
  *
5
5
  * Author: Torstein Honsi
6
6
  * License: www.highcharts.com/license
7
7
  *
8
8
  */
9
+ 'use strict';
9
10
  (function(factory) {
10
11
  if (typeof module === 'object' && module.exports) {
11
12
  module.exports = factory;
@@ -22,7 +23,6 @@
22
23
  *
23
24
  */
24
25
 
25
- 'use strict';
26
26
 
27
27
  var noop = H.noop,
28
28
  color = H.color,
@@ -696,11 +696,11 @@
696
696
  label
697
697
  .addClass('highcharts-drilldown-axis-label')
698
698
 
699
- .css(axis.chart.options.drilldown.activeAxisLabelStyle)
699
+ .css(axis.chart.options.drilldown.activeAxisLabelStyle)
700
700
 
701
- .on('click', function(e) {
702
- axis.drilldownCategory(pos, e);
703
- });
701
+ .on('click', function(e) {
702
+ axis.drilldownCategory(pos, e);
703
+ });
704
704
 
705
705
  } else if (label && label.drillable) {
706
706
 
@@ -1,11 +1,12 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  * Exporting module
4
4
  *
5
5
  * (c) 2010-2016 Torstein Honsi
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
9
+ 'use strict';
9
10
  (function(factory) {
10
11
  if (typeof module === 'object' && module.exports) {
11
12
  module.exports = factory;
@@ -23,7 +24,6 @@
23
24
  */
24
25
 
25
26
  /* eslint indent:0 */
26
- 'use strict';
27
27
 
28
28
  // create shortcuts
29
29
  var defaultOptions = H.defaultOptions,
@@ -244,8 +244,8 @@
244
244
  return s2 +'.'+ s3[0];
245
245
  })*/
246
246
 
247
- // Replace HTML entities, issue #347
248
- .replace(/ /g, '\u00A0') // no-break space
247
+ // Replace HTML entities, issue #347
248
+ .replace(/ /g, '\u00A0') // no-break space
249
249
  .replace(/­/g, '\u00AD'); // soft hyphen
250
250
 
251
251
 
@@ -1,11 +1,12 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  * Highcharts funnel module
4
4
  *
5
5
  * (c) 2010-2016 Torstein Honsi
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
9
+ 'use strict';
9
10
  (function(factory) {
10
11
  if (typeof module === 'object' && module.exports) {
11
12
  module.exports = factory;
@@ -22,7 +23,6 @@
22
23
  * License: www.highcharts.com/license
23
24
  */
24
25
  /* eslint indent:0 */
25
- 'use strict';
26
26
 
27
27
  // create shortcuts
28
28
  var seriesType = Highcharts.seriesType,
@@ -46,7 +46,7 @@
46
46
  dataLabels: {
47
47
  //position: 'right',
48
48
  connectorWidth: 1
49
- //connectorColor: null
49
+ //connectorColor: null
50
50
  },
51
51
  states: {
52
52
  select: {
@@ -68,7 +68,7 @@
68
68
  translate: function() {
69
69
 
70
70
  var
71
- // Get positions - either an integer or a percentage string must be given
71
+ // Get positions - either an integer or a percentage string must be given
72
72
  getLength = function(length, relativeTo) {
73
73
  return (/%$/).test(length) ?
74
74
  relativeTo * parseInt(length, 10) / 100 :
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  * GridAxis
4
4
  *
5
5
  * (c) 2016 Lars A. V. Cabrera
@@ -8,6 +8,7 @@
8
8
  *
9
9
  * License: www.highcharts.com/license
10
10
  */
11
+ 'use strict';
11
12
  (function(factory) {
12
13
  if (typeof module === 'object' && module.exports) {
13
14
  module.exports = factory;
@@ -22,7 +23,6 @@
22
23
  *
23
24
  * License: www.highcharts.com/license
24
25
  */
25
- 'use strict';
26
26
 
27
27
  var dateFormat = H.dateFormat,
28
28
  each = H.each,
@@ -168,11 +168,11 @@
168
168
  })
169
169
  .addClass('highcharts-axis-title')
170
170
 
171
- .css(axisTitleOptions.style)
171
+ .css(axisTitleOptions.style)
172
172
 
173
- // Add to axisParent instead of axisGroup, to ignore the space
174
- // it takes
175
- .add(axisParent);
173
+ // Add to axisParent instead of axisGroup, to ignore the space
174
+ // it takes
175
+ .add(axisParent);
176
176
  axis.axisTitle.isNew = true;
177
177
  }
178
178
 
@@ -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 Axis = H.Axis,
23
23
  Chart = H.Chart,
24
24
  color = H.color,
@@ -69,9 +69,14 @@
69
69
  showInLegend: true
70
70
  },
71
71
 
72
- // Properties to preserve after destroy, for Axis.update (#5881)
73
- keepProps: ['legendGroup', 'legendItem', 'legendSymbol']
74
- .concat(Axis.prototype.keepProps),
72
+ // Properties to preserve after destroy, for Axis.update (#5881, #6025)
73
+ keepProps: [
74
+ 'legendGroup',
75
+ 'legendItemHeight',
76
+ 'legendItemWidth',
77
+ 'legendItem',
78
+ 'legendSymbol'
79
+ ].concat(Axis.prototype.keepProps),
75
80
 
76
81
  /**
77
82
  * Initialize the color axis
@@ -596,7 +601,6 @@
596
601
  *
597
602
  * License: www.highcharts.com/license
598
603
  */
599
- 'use strict';
600
604
  var defined = H.defined,
601
605
  each = H.each,
602
606
  noop = H.noop,
@@ -691,7 +695,6 @@
691
695
  *
692
696
  * License: www.highcharts.com/license
693
697
  */
694
- 'use strict';
695
698
  var colorPointMixin = H.colorPointMixin,
696
699
  colorSeriesMixin = H.colorSeriesMixin,
697
700
  each = H.each,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  * Plugin for displaying a message when there is no data visible in chart.
4
4
  *
5
5
  * (c) 2010-2016 Highsoft AS
@@ -7,6 +7,7 @@
7
7
  *
8
8
  * License: www.highcharts.com/license
9
9
  */
10
+ 'use strict';
10
11
  (function(factory) {
11
12
  if (typeof module === 'object' && module.exports) {
12
13
  module.exports = factory;
@@ -23,7 +24,6 @@
23
24
  *
24
25
  * License: www.highcharts.com/license
25
26
  */
26
- 'use strict';
27
27
 
28
28
  var seriesTypes = H.seriesTypes,
29
29
  chartPrototype = H.Chart.prototype,
@@ -1,11 +1,12 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  * Client side exporting module
4
4
  *
5
5
  * (c) 2015 Torstein Honsi / Oystein Moseng
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
9
+ 'use strict';
9
10
  (function(factory) {
10
11
  if (typeof module === 'object' && module.exports) {
11
12
  module.exports = factory;
@@ -22,7 +23,6 @@
22
23
  * License: www.highcharts.com/license
23
24
  */
24
25
 
25
- 'use strict';
26
26
  /*global MSBlobBuilder */
27
27
 
28
28
  var merge = Highcharts.merge,
@@ -500,7 +500,7 @@
500
500
 
501
501
  // Extend the default options to use the local exporter logic
502
502
  merge(true, Highcharts.getOptions().exporting, {
503
- libURL: 'https://code.highcharts.com/5.0.7/lib/',
503
+ libURL: 'https://code.highcharts.com/5.0.8/lib/',
504
504
  buttons: {
505
505
  contextButton: {
506
506
  menuItems: [{
@@ -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
  /**
23
23
  * Highcharts module to hide overlapping data labels. This module is included in Highcharts.
24
24
  */
@@ -33,7 +33,7 @@
33
33
  function collectAndHide() {
34
34
  var labels = [];
35
35
 
36
- each(chart.series, function(series) {
36
+ each(chart.series || [], function(series) {
37
37
  var dlOptions = series.options.dataLabels,
38
38
  collections = series.dataLabelCollections || ['dataLabel']; // Range series have two collections
39
39
  if ((dlOptions.enabled || series._hasPointLabels) && !dlOptions.allowOverlap && series.visible) { // #3866
@@ -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;
@@ -33,7 +34,6 @@
33
34
  * http://jsfiddle.net/highcharts/y5A37/
34
35
  */
35
36
 
36
- 'use strict';
37
37
 
38
38
  var labelDistance = 3,
39
39
  wrap = H.wrap,
@@ -1,11 +1,12 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.7 (2017-01-17)
2
+ * @license Highcharts JS v5.0.8 (2017-03-08)
3
3
  * Solid angular gauge module
4
4
  *
5
5
  * (c) 2010-2016 Torstein Honsi
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
9
+ 'use strict';
9
10
  (function(factory) {
10
11
  if (typeof module === 'object' && module.exports) {
11
12
  module.exports = factory;
@@ -22,14 +23,47 @@
22
23
  * License: www.highcharts.com/license
23
24
  */
24
25
 
25
- 'use strict';
26
26
 
27
27
  var pInt = H.pInt,
28
28
  pick = H.pick,
29
29
  each = H.each,
30
30
  isNumber = H.isNumber,
31
+ wrap = H.wrap,
32
+ Renderer = H.Renderer,
31
33
  colorAxisMethods;
32
34
 
35
+ /**
36
+ * Symbol definition of an arc with round edges.
37
+ *
38
+ * @param {Number} x - The X coordinate for the top left position.
39
+ * @param {Number} y - The Y coordinate for the top left position.
40
+ * @param {Number} w - The pixel width.
41
+ * @param {Number} h - The pixel height.
42
+ * @param {Object} [options] - Additional options, depending on the actual
43
+ * symbol drawn.
44
+ * @param {boolean} [options.rounded] - Whether to draw rounded edges.
45
+ * @return {Array} Path of the created arc.
46
+ */
47
+ wrap(Renderer.prototype.symbols, 'arc', function(proceed, x, y, w, h, options) {
48
+ var arc = proceed,
49
+ path = arc(x, y, w, h, options);
50
+ if (options.rounded) {
51
+ var r = options.r || w,
52
+ smallR = (r - options.innerR) / 2,
53
+ x1 = path[1],
54
+ y1 = path[2],
55
+ x2 = path[12],
56
+ y2 = path[13],
57
+ roundStart = ['A', smallR, smallR, 0, 1, 1, x1, y1],
58
+ roundEnd = ['A', smallR, smallR, 0, 1, 1, x2, y2];
59
+ // Insert rounded edge on end, and remove line.
60
+ path.splice.apply(path, [path.length - 1, 0].concat(roundStart));
61
+ // Insert rounded edge on end, and remove line.
62
+ path.splice.apply(path, [11, 3].concat(roundEnd));
63
+ }
64
+ return path;
65
+ });
66
+
33
67
  // These methods are defined in the ColorAxis object, and copied here.
34
68
  // If we implement an AMD system we should make ColorAxis a dependency.
35
69
  colorAxisMethods = {
@@ -265,13 +299,15 @@
265
299
  innerR: innerRadius,
266
300
  start: minAngle,
267
301
  end: maxAngle,
268
- fill: toColor
302
+ rounded: options.rounded
269
303
  };
270
304
  point.startR = radius; // For PieSeries.animate
271
305
 
272
306
  if (graphic) {
273
307
  d = shapeArgs.d;
274
- graphic.animate(shapeArgs);
308
+ graphic.animate(H.extend({
309
+ fill: toColor
310
+ }, shapeArgs));
275
311
  if (d) {
276
312
  shapeArgs.d = d; // animate alters it
277
313
  }