highcharts-rails 5.0.11 → 5.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.markdown +32 -0
  3. data/app/assets/javascripts/highcharts.js +1199 -379
  4. data/app/assets/javascripts/highcharts/highcharts-3d.js +1542 -209
  5. data/app/assets/javascripts/highcharts/highcharts-more.js +6 -1
  6. data/app/assets/javascripts/highcharts/modules/accessibility.js +13 -6
  7. data/app/assets/javascripts/highcharts/modules/annotations.js +1 -1
  8. data/app/assets/javascripts/highcharts/modules/boost.js +66 -24
  9. data/app/assets/javascripts/highcharts/modules/broken-axis.js +1 -1
  10. data/app/assets/javascripts/highcharts/modules/data.js +1 -1
  11. data/app/assets/javascripts/highcharts/modules/drilldown.js +6 -44
  12. data/app/assets/javascripts/highcharts/modules/exporting.js +8 -4
  13. data/app/assets/javascripts/highcharts/modules/funnel.js +1 -8
  14. data/app/assets/javascripts/highcharts/modules/grid-axis.js +1 -1
  15. data/app/assets/javascripts/highcharts/modules/heatmap.js +17 -51
  16. data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +19 -10
  17. data/app/assets/javascripts/highcharts/modules/offline-exporting.js +7 -2
  18. data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +1 -1
  19. data/app/assets/javascripts/highcharts/modules/series-label.js +1 -1
  20. data/app/assets/javascripts/highcharts/modules/solid-gauge.js +7 -51
  21. data/app/assets/javascripts/highcharts/modules/stock.js +82 -9
  22. data/app/assets/javascripts/highcharts/modules/treemap.js +1 -1
  23. data/app/assets/javascripts/highcharts/modules/xrange-series.js +1 -1
  24. data/lib/highcharts/version.rb +1 -1
  25. metadata +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.11 (2017-05-04)
2
+ * @license Highcharts JS v5.0.12 (2017-05-24)
3
3
  * Plugin for displaying a message when there is no data visible in chart.
4
4
  *
5
5
  * (c) 2010-2017 Highsoft AS
@@ -56,19 +56,28 @@
56
56
  };
57
57
 
58
58
 
59
- /**
60
- * Define hasData functions for series. These return true if there are data points on this series within the plot area
61
- */
62
- function hasDataPie() {
63
- return !!this.points.length; /* != 0 */
64
- }
65
59
 
66
- each(['pie', 'gauge', 'waterfall', 'bubble', 'treemap'], function(type) {
60
+ // Define hasData function for non-cartesian seris. Returns true if the series
61
+ // has points at all.
62
+ each([
63
+ 'bubble',
64
+ 'gauge',
65
+ 'heatmap',
66
+ 'pie',
67
+ 'treemap',
68
+ 'waterfall'
69
+ ], function(type) {
67
70
  if (seriesTypes[type]) {
68
- seriesTypes[type].prototype.hasData = hasDataPie;
71
+ seriesTypes[type].prototype.hasData = function() {
72
+ return !!this.points.length; /* != 0 */
73
+ };
69
74
  }
70
75
  });
71
76
 
77
+ /**
78
+ * Define hasData functions for series. These return true if there are data
79
+ * points on this series within the plot area.
80
+ */
72
81
  H.Series.prototype.hasData = function() {
73
82
  return this.visible && this.dataMax !== undefined && this.dataMin !== undefined; // #3703
74
83
  };
@@ -134,7 +143,7 @@
134
143
  }
135
144
  }
136
145
 
137
- return false;
146
+ return chart.loadingShown; // #4588
138
147
  };
139
148
 
140
149
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.11 (2017-05-04)
2
+ * @license Highcharts JS v5.0.12 (2017-05-24)
3
3
  * Client side exporting module
4
4
  *
5
5
  * (c) 2015 Torstein Honsi / Oystein Moseng
@@ -480,6 +480,11 @@
480
480
  }
481
481
  };
482
482
 
483
+ // If we are on IE and in styled mode, add a whitelist to the renderer
484
+ // for inline styles that we want to pass through. There are so many
485
+ // styles by default in IE that we don't want to blacklist them all.
486
+
487
+
483
488
  // Always fall back on:
484
489
  // - MS browsers: Embedded images JPEG/PNG, or any PDF
485
490
  // - Edge: PNG/JPEG all cases
@@ -508,7 +513,7 @@
508
513
 
509
514
  // Extend the default options to use the local exporter logic
510
515
  merge(true, Highcharts.getOptions().exporting, {
511
- libURL: 'https://code.highcharts.com/5.0.11/lib/',
516
+ libURL: 'https://code.highcharts.com/5.0.12/lib/',
512
517
  buttons: {
513
518
  contextButton: {
514
519
  menuItems: [{
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.11 (2017-05-04)
2
+ * @license Highcharts JS v5.0.12 (2017-05-24)
3
3
  *
4
4
  * (c) 2009-2017 Torstein Honsi
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.11 (2017-05-04)
2
+ * @license Highcharts JS v5.0.12 (2017-05-24)
3
3
  *
4
4
  * (c) 2009-2017 Torstein Honsi
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.11 (2017-05-04)
2
+ * @license Highcharts JS v5.0.12 (2017-05-24)
3
3
  * Solid angular gauge module
4
4
  *
5
5
  * (c) 2010-2017 Torstein Honsi
@@ -70,8 +70,7 @@
70
70
 
71
71
 
72
72
  initDataClasses: function(userOptions) {
73
- var axis = this,
74
- chart = this.chart,
73
+ var chart = this.chart,
75
74
  dataClasses,
76
75
  colorCounter = 0,
77
76
  options = this.options;
@@ -91,7 +90,10 @@
91
90
  colorCounter = 0;
92
91
  }
93
92
  } else {
94
- dataClass.color = axis.tweenColors(H.color(options.minColor), H.color(options.maxColor), i / (userOptions.dataClasses.length - 1));
93
+ dataClass.color = H.color(options.minColor).tweenTo(
94
+ H.color(options.maxColor),
95
+ i / (userOptions.dataClasses.length - 1)
96
+ );
95
97
  }
96
98
  }
97
99
  });
@@ -152,61 +154,15 @@
152
154
  // The position within the gradient
153
155
  pos = 1 - (to[0] - pos) / ((to[0] - from[0]) || 1);
154
156
 
155
- color = this.tweenColors(
156
- from.color,
157
+ color = from.color.tweenTo(
157
158
  to.color,
158
159
  pos
159
160
  );
160
161
  }
161
162
  return color;
162
- },
163
- /*
164
- * Return an intermediate color between two colors, according to pos where 0
165
- * is the from color and 1 is the to color.
166
- */
167
- tweenColors: function(from, to, pos) {
168
- // Check for has alpha, because rgba colors perform worse due to lack of
169
- // support in WebKit.
170
- var hasAlpha,
171
- ret;
172
-
173
- // Unsupported color, return to-color (#3920)
174
- if (!to.rgba.length || !from.rgba.length) {
175
- ret = to.input || 'none';
176
-
177
- // Interpolate
178
- } else {
179
- from = from.rgba;
180
- to = to.rgba;
181
- hasAlpha = (to[3] !== 1 || from[3] !== 1);
182
- ret = (hasAlpha ? 'rgba(' : 'rgb(') +
183
- Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
184
- Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
185
- Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
186
- (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
187
- }
188
- return ret;
189
163
  }
190
164
  };
191
165
 
192
- /**
193
- * Handle animation of the color attributes directly
194
- */
195
- each(['fill', 'stroke'], function(prop) {
196
- H.Fx.prototype[prop + 'Setter'] = function() {
197
- this.elem.attr(
198
- prop,
199
- colorAxisMethods.tweenColors(
200
- H.color(this.start),
201
- H.color(this.end),
202
- this.pos
203
- ),
204
- null,
205
- true
206
- );
207
- };
208
- });
209
-
210
166
  // The solidgauge series type
211
167
  H.seriesType('solidgauge', 'gauge', {
212
168
  colorByPoint: true
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.11 (2017-05-04)
2
+ * @license Highcharts JS v5.0.12 (2017-05-24)
3
3
  * Highstock as a plugin for Highcharts
4
4
  *
5
5
  * (c) 2017 Torstein Honsi
@@ -1246,6 +1246,8 @@
1246
1246
 
1247
1247
  if (isNumber(low) || isNumber(high)) {
1248
1248
  return [low, high];
1249
+ } else if (low === null && high === null) {
1250
+ return null;
1249
1251
  }
1250
1252
  // else, return is undefined
1251
1253
  }
@@ -1421,6 +1423,7 @@
1421
1423
  hasGroupedData = true;
1422
1424
 
1423
1425
  series.isDirty = true; // force recreation of point instances in series.translate, #5699
1426
+ series.points = null; // #6709
1424
1427
 
1425
1428
  var extremes = xAxis.getExtremes(),
1426
1429
  xMin = extremes.min,
@@ -1677,7 +1680,17 @@
1677
1680
  };
1678
1681
 
1679
1682
  /**
1680
- * Force data grouping on all the axis' series.
1683
+ * Highstock only. Force data grouping on all the axis' series.
1684
+ *
1685
+ * @param {SeriesDatagroupingOptions} [dataGrouping]
1686
+ * A `dataGrouping` configuration. Use `false` to disable data grouping
1687
+ * dynamically.
1688
+ * @param {Boolean} [redraw=true]
1689
+ * Whether to redraw the chart or wait for a later call to {@link
1690
+ * Chart#redraw}.
1691
+ *
1692
+ * @function setDataGrouping
1693
+ * @memberOf Axis.prototype
1681
1694
  */
1682
1695
  Axis.prototype.setDataGrouping = function(dataGrouping, redraw) {
1683
1696
  var i;
@@ -3611,7 +3624,7 @@
3611
3624
  (index === 1 ? '-inside' : '-outside'))
3612
3625
 
3613
3626
  .attr({
3614
- fill: hasMask ? navigatorOptions.maskFill : 'transparent'
3627
+ fill: hasMask ? navigatorOptions.maskFill : 'rgba(0,0,0,0)'
3615
3628
  })
3616
3629
  .css(index === 1 && mouseCursor)
3617
3630
 
@@ -3783,7 +3796,10 @@
3783
3796
  if (inverted) {
3784
3797
  scrollbarTop = navigator.top - scrollbarHeight;
3785
3798
  scrollbarLeft = navigator.left - scrollbarHeight +
3786
- (navigatorEnabled ? 0 : (scrollbarXAxis.titleOffset || 0) +
3799
+ (navigatorEnabled || !scrollbarXAxis.opposite ? 0 :
3800
+ // Multiple axes has offsets:
3801
+ (scrollbarXAxis.titleOffset || 0) +
3802
+ // Self margin from the axis.title
3787
3803
  scrollbarXAxis.axisTitleMargin
3788
3804
  );
3789
3805
  scrollbarHeight = navigatorSize + 2 * scrollbarHeight;
@@ -5782,8 +5798,39 @@
5782
5798
  seriesInit = seriesProto.init,
5783
5799
  seriesProcessData = seriesProto.processData,
5784
5800
  pointTooltipFormatter = Point.prototype.tooltipFormatter;
5801
+
5785
5802
  /**
5786
- * A wrapper for Chart with all the default values for a Stock chart
5803
+ * Factory function for creating new stock charts. Creates a new {@link Chart|
5804
+ * Chart} object with different default options than the basic Chart.
5805
+ *
5806
+ * @function #stockChart
5807
+ * @memberOf Highcharts
5808
+ *
5809
+ * @param {String|HTMLDOMElement} renderTo
5810
+ * The DOM element to render to, or its id.
5811
+ * @param {Options} options
5812
+ * The chart options structure as described in the {@link
5813
+ * https://api.highcharts.com/highstock|options reference}.
5814
+ * @param {Function} callback
5815
+ * A function to execute when the chart object is finished loading and
5816
+ * rendering. In most cases the chart is built in one thread, but in
5817
+ * Internet Explorer version 8 or less the chart is sometimes initiated
5818
+ * before the document is ready, and in these cases the chart object
5819
+ * will not be finished synchronously. As a consequence, code that
5820
+ * relies on the newly built Chart object should always run in the
5821
+ * callback. Defining a {@link https://api.highcharts.com/highstock/chart.events.load|
5822
+ * chart.event.load} handler is equivalent.
5823
+ *
5824
+ * @return {Chart}
5825
+ * The chart object.
5826
+ *
5827
+ * @example
5828
+ * var chart = Highcharts.stockChart('container', {
5829
+ * series: [{
5830
+ * data: [1, 2, 3, 4, 5, 6, 7, 8, 9],
5831
+ * pointInterval: 24 * 60 * 60 * 1000
5832
+ * }]
5833
+ * });
5787
5834
  */
5788
5835
  H.StockChart = H.stockChart = function(a, b, c) {
5789
5836
  var hasRenderToArg = isString(a) || a.nodeName,
@@ -5994,8 +6041,8 @@
5994
6041
  });
5995
6042
  }
5996
6043
 
5997
- // Ignore in case of color Axis. #3360, #3524
5998
- if (axis.coll === 'colorAxis') {
6044
+ // Ignore in case of colorAxis or zAxis. #3360, #3524, #6720
6045
+ if (axis.coll !== 'xAxis' && axis.coll !== 'yAxis') {
5999
6046
  return proceed.apply(this, [].slice.call(arguments, 1));
6000
6047
  }
6001
6048
 
@@ -6300,7 +6347,17 @@
6300
6347
  };
6301
6348
 
6302
6349
  /**
6303
- * The setCompare method can be called also from the outside after render time
6350
+ * Highstock only. Set the {@link
6351
+ * http://api.highcharts.com/highstock/plotOptions.series.compare|
6352
+ * compare} mode of the series after render time. In most cases it is more
6353
+ * useful running {@link Axis#setCompare} on the X axis to update all its
6354
+ * series.
6355
+ *
6356
+ * @function setCompare
6357
+ * @memberOf Series.prototype
6358
+ *
6359
+ * @param {String} compare
6360
+ * Can be one of `null`, `"percent"` or `"value"`.
6304
6361
  */
6305
6362
  seriesProto.setCompare = function(compare) {
6306
6363
 
@@ -6401,7 +6458,23 @@
6401
6458
  });
6402
6459
 
6403
6460
  /**
6404
- * Add a utility method, setCompare, to the Y axis
6461
+ * Highstock only. Set the compare mode on all series belonging to an Y axis
6462
+ * after render time.
6463
+ *
6464
+ * @param {String} compare
6465
+ * The compare mode. Can be one of `null`, `"value"` or `"percent"`.
6466
+ * @param {Boolean} [redraw=true]
6467
+ * Whether to redraw the chart or to wait for a later call to {@link
6468
+ * Chart#redraw},
6469
+ *
6470
+ * @function setCompare
6471
+ * @memberOf Axis.prototype
6472
+ *
6473
+ * @see {@link https://api.highcharts.com/highstock/series.plotOptions.compare|
6474
+ * series.plotOptions.compare}
6475
+ *
6476
+ * @sample stock/members/axis-setcompare/
6477
+ * Set compoare
6405
6478
  */
6406
6479
  Axis.prototype.setCompare = function(compare, redraw) {
6407
6480
  if (!this.isXAxis) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.11 (2017-05-04)
2
+ * @license Highcharts JS v5.0.12 (2017-05-24)
3
3
  *
4
4
  * (c) 2014 Highsoft AS
5
5
  * Authors: Jon Arild Nygard / Oystein Moseng
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.11 (2017-05-04)
2
+ * @license Highcharts JS v5.0.12 (2017-05-24)
3
3
  * X-range series
4
4
  *
5
5
  * (c) 2010-2017 Torstein Honsi, Lars A. V. Cabrera
@@ -1,3 +1,3 @@
1
1
  module Highcharts
2
- VERSION = "5.0.11"
2
+ VERSION = "5.0.12"
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.11
4
+ version: 5.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Per Christian B. Viken