highcharts-rails 5.0.9 → 5.0.10

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 (25) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.markdown +48 -0
  3. data/app/assets/javascripts/highcharts.js +547 -270
  4. data/app/assets/javascripts/highcharts/highcharts-3d.js +13 -11
  5. data/app/assets/javascripts/highcharts/highcharts-more.js +373 -181
  6. data/app/assets/javascripts/highcharts/modules/accessibility.js +3 -3
  7. data/app/assets/javascripts/highcharts/modules/annotations.js +3 -3
  8. data/app/assets/javascripts/highcharts/modules/boost.js +11 -5
  9. data/app/assets/javascripts/highcharts/modules/broken-axis.js +3 -3
  10. data/app/assets/javascripts/highcharts/modules/data.js +3 -3
  11. data/app/assets/javascripts/highcharts/modules/drilldown.js +1 -1
  12. data/app/assets/javascripts/highcharts/modules/exporting.js +70 -28
  13. data/app/assets/javascripts/highcharts/modules/funnel.js +3 -3
  14. data/app/assets/javascripts/highcharts/modules/grid-axis.js +1 -1
  15. data/app/assets/javascripts/highcharts/modules/heatmap.js +5 -5
  16. data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +3 -3
  17. data/app/assets/javascripts/highcharts/modules/offline-exporting.js +2 -2
  18. data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +43 -20
  19. data/app/assets/javascripts/highcharts/modules/series-label.js +3 -3
  20. data/app/assets/javascripts/highcharts/modules/solid-gauge.js +3 -3
  21. data/app/assets/javascripts/highcharts/modules/stock.js +83 -42
  22. data/app/assets/javascripts/highcharts/modules/treemap.js +1 -1
  23. data/app/assets/javascripts/highcharts/modules/xrange-series.js +3 -3
  24. data/lib/highcharts/version.rb +1 -1
  25. metadata +1 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.9 (2017-03-08)
2
+ * @license Highcharts JS v5.0.10 (2017-03-31)
3
3
  *
4
- * (c) 2009-2016 Torstein Honsi
4
+ * (c) 2009-2017 Torstein Honsi
5
5
  *
6
6
  * License: www.highcharts.com/license
7
7
  */
@@ -15,7 +15,7 @@
15
15
  }(function(Highcharts) {
16
16
  (function(H) {
17
17
  /**
18
- * (c) 2009-2016 Torstein Honsi
18
+ * (c) 2009-2017 Torstein Honsi
19
19
  *
20
20
  * License: www.highcharts.com/license
21
21
  */
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.9 (2017-03-08)
2
+ * @license Highcharts JS v5.0.10 (2017-03-31)
3
3
  * Solid angular gauge module
4
4
  *
5
- * (c) 2010-2016 Torstein Honsi
5
+ * (c) 2010-2017 Torstein Honsi
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
@@ -18,7 +18,7 @@
18
18
  /**
19
19
  * Solid angular gauge module
20
20
  *
21
- * (c) 2010-2016 Torstein Honsi
21
+ * (c) 2010-2017 Torstein Honsi
22
22
  *
23
23
  * License: www.highcharts.com/license
24
24
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.9 (2017-03-08)
2
+ * @license Highcharts JS v5.0.10 (2017-03-31)
3
3
  * Highstock as a plugin for Highcharts
4
4
  *
5
5
  * (c) 2017 Torstein Honsi
@@ -16,7 +16,7 @@
16
16
  }(function(Highcharts) {
17
17
  (function(H) {
18
18
  /**
19
- * (c) 2010-2016 Torstein Honsi
19
+ * (c) 2010-2017 Torstein Honsi
20
20
  *
21
21
  * License: www.highcharts.com/license
22
22
  */
@@ -725,7 +725,7 @@
725
725
  }(Highcharts));
726
726
  (function(H) {
727
727
  /**
728
- * (c) 2009-2016 Torstein Honsi
728
+ * (c) 2009-2017 Torstein Honsi
729
729
  *
730
730
  * License: www.highcharts.com/license
731
731
  */
@@ -1063,7 +1063,7 @@
1063
1063
  }());
1064
1064
  (function(H) {
1065
1065
  /**
1066
- * (c) 2010-2016 Torstein Honsi
1066
+ * (c) 2010-2017 Torstein Honsi
1067
1067
  *
1068
1068
  * License: www.highcharts.com/license
1069
1069
  */
@@ -1695,7 +1695,7 @@
1695
1695
  }(Highcharts));
1696
1696
  (function(H) {
1697
1697
  /**
1698
- * (c) 2010-2016 Torstein Honsi
1698
+ * (c) 2010-2017 Torstein Honsi
1699
1699
  *
1700
1700
  * License: www.highcharts.com/license
1701
1701
  */
@@ -1727,11 +1727,13 @@
1727
1727
  hover: {
1728
1728
  lineWidth: 3
1729
1729
  }
1730
- }
1730
+ },
1731
+ stickyTracking: true
1731
1732
  //upColor: undefined
1732
1733
 
1733
1734
 
1734
1735
  }, /** @lends seriesTypes.ohlc */ {
1736
+ directTouch: false,
1735
1737
  pointArrayMap: ['open', 'high', 'low', 'close'], // array point configs are mapped to this
1736
1738
  toYData: function(point) { // return a plain array for speedy calculation
1737
1739
  return [point.open, point.high, point.low, point.close];
@@ -1775,18 +1777,18 @@
1775
1777
  var series = this,
1776
1778
  yAxis = series.yAxis,
1777
1779
  hasModifyValue = !!series.modifyValue,
1778
- translatedOLC = ['plotOpen', 'yBottom', 'plotClose'];
1780
+ translated = ['plotOpen', 'plotHigh', 'plotLow', 'plotClose', 'yBottom']; // translate OHLC for
1779
1781
 
1780
1782
  seriesTypes.column.prototype.translate.apply(series);
1781
1783
 
1782
1784
  // Do the translation
1783
1785
  each(series.points, function(point) {
1784
- each([point.open, point.low, point.close], function(value, i) {
1786
+ each([point.open, point.high, point.low, point.close, point.low], function(value, i) {
1785
1787
  if (value !== null) {
1786
1788
  if (hasModifyValue) {
1787
1789
  value = series.modifyValue(value);
1788
1790
  }
1789
- point[translatedOLC[i]] = yAxis.toPixels(value, true);
1791
+ point[translated[i]] = yAxis.toPixels(value, true);
1790
1792
  }
1791
1793
  });
1792
1794
  });
@@ -1896,7 +1898,7 @@
1896
1898
  }(Highcharts));
1897
1899
  (function(H) {
1898
1900
  /**
1899
- * (c) 2010-2016 Torstein Honsi
1901
+ * (c) 2010-2017 Torstein Honsi
1900
1902
  *
1901
1903
  * License: www.highcharts.com/license
1902
1904
  */
@@ -1923,7 +1925,8 @@
1923
1925
 
1924
1926
  lineColor: '#000000',
1925
1927
  lineWidth: 1,
1926
- upColor: '#ffffff'
1928
+ upColor: '#ffffff',
1929
+ stickyTracking: true
1927
1930
  // upLineColor: null
1928
1931
 
1929
1932
 
@@ -2052,7 +2055,7 @@
2052
2055
  }(Highcharts));
2053
2056
  (function(H) {
2054
2057
  /**
2055
- * (c) 2010-2016 Torstein Honsi
2058
+ * (c) 2010-2017 Torstein Honsi
2056
2059
  *
2057
2060
  * License: www.highcharts.com/license
2058
2061
  */
@@ -2067,7 +2070,8 @@
2067
2070
  SVGRenderer = H.SVGRenderer,
2068
2071
  TrackerMixin = H.TrackerMixin,
2069
2072
  VMLRenderer = H.VMLRenderer,
2070
- symbols = SVGRenderer.prototype.symbols;
2073
+ symbols = SVGRenderer.prototype.symbols,
2074
+ stableSort = H.stableSort;
2071
2075
 
2072
2076
  /**
2073
2077
  * The flags series type.
@@ -2160,6 +2164,7 @@
2160
2164
  onData = onSeries && onSeries.points,
2161
2165
  i = onData && onData.length,
2162
2166
  xAxis = series.xAxis,
2167
+ yAxis = series.yAxis,
2163
2168
  xAxisExt = xAxis.getExtremes(),
2164
2169
  xOffset = 0,
2165
2170
  leftPoint,
@@ -2174,7 +2179,7 @@
2174
2179
  lastX = onData[i - 1].x + (currentDataGrouping ? currentDataGrouping.totalRange : 0); // #2374
2175
2180
 
2176
2181
  // sort the data points
2177
- points.sort(function(a, b) {
2182
+ stableSort(points, function(a, b) {
2178
2183
  return (a.x - b.x);
2179
2184
  });
2180
2185
 
@@ -2211,12 +2216,16 @@
2211
2216
 
2212
2217
  var stackIndex;
2213
2218
 
2214
- // Undefined plotY means the point is either on axis, outside series range or hidden series.
2215
- // If the series is outside the range of the x axis it should fall through with
2216
- // an undefined plotY, but then we must remove the shapeArgs (#847).
2219
+ // Undefined plotY means the point is either on axis, outside series
2220
+ // range or hidden series. If the series is outside the range of the
2221
+ // x axis it should fall through with an undefined plotY, but then
2222
+ // we must remove the shapeArgs (#847).
2217
2223
  if (point.plotY === undefined) {
2218
- if (point.x >= xAxisExt.min && point.x <= xAxisExt.max) { // we're inside xAxis range
2219
- point.plotY = chart.chartHeight - xAxis.bottom - (xAxis.opposite ? xAxis.height : 0) + xAxis.offset - chart.plotTop;
2224
+ if (point.x >= xAxisExt.min && point.x <= xAxisExt.max) {
2225
+ // we're inside xAxis range
2226
+ point.plotY = chart.chartHeight - xAxis.bottom -
2227
+ (xAxis.opposite ? xAxis.height : 0) +
2228
+ xAxis.offset - yAxis.top; // #3517
2220
2229
  } else {
2221
2230
  point.shapeArgs = {}; // 847
2222
2231
  }
@@ -2302,6 +2311,11 @@
2302
2311
  .addClass('highcharts-point')
2303
2312
  .add(series.markerGroup);
2304
2313
 
2314
+ // Add reference to the point for tracker (#6303)
2315
+ if (point.graphic.div) {
2316
+ point.graphic.div.point = point;
2317
+ }
2318
+
2305
2319
 
2306
2320
  graphic.shadow(options.shadow);
2307
2321
 
@@ -2329,6 +2343,15 @@
2329
2343
 
2330
2344
  }
2331
2345
 
2346
+ // Might be a mix of SVG and HTML and we need events for both (#6303)
2347
+ if (options.useHTML) {
2348
+ H.wrap(series.markerGroup, 'on', function(proceed) {
2349
+ return H.SVGElement.prototype.on.apply(
2350
+ proceed.apply(this, [].slice.call(arguments, 1)), // for HTML
2351
+ [].slice.call(arguments, 1)); // and for SVG
2352
+ });
2353
+ }
2354
+
2332
2355
  },
2333
2356
 
2334
2357
  /**
@@ -2437,7 +2460,7 @@
2437
2460
  }(Highcharts));
2438
2461
  (function(H) {
2439
2462
  /**
2440
- * (c) 2010-2016 Torstein Honsi
2463
+ * (c) 2010-2017 Torstein Honsi
2441
2464
  *
2442
2465
  * License: www.highcharts.com/license
2443
2466
  */
@@ -2770,8 +2793,7 @@
2770
2793
  }
2771
2794
 
2772
2795
  from = Math.max(from, 0);
2773
-
2774
- fromPX = fullWidth * from;
2796
+ fromPX = Math.ceil(fullWidth * from);
2775
2797
  toPX = fullWidth * Math.min(to, 1);
2776
2798
  scroller.calculatedWidth = newSize = correctFloat(toPX - fromPX);
2777
2799
 
@@ -3064,7 +3086,7 @@
3064
3086
  */
3065
3087
  wrap(Axis.prototype, 'init', function(proceed) {
3066
3088
  var axis = this;
3067
- proceed.apply(axis, [].slice.call(arguments, 1));
3089
+ proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
3068
3090
 
3069
3091
  if (axis.options.scrollbar && axis.options.scrollbar.enabled) {
3070
3092
  // Predefined options:
@@ -3102,26 +3124,37 @@
3102
3124
  scrollMin = Math.min(pick(axis.options.min, axis.min), axis.min, axis.dataMin),
3103
3125
  scrollMax = Math.max(pick(axis.options.max, axis.max), axis.max, axis.dataMax),
3104
3126
  scrollbar = axis.scrollbar,
3127
+ offsetsIndex,
3105
3128
  from,
3106
3129
  to;
3107
3130
 
3108
- proceed.apply(axis, [].slice.call(arguments, 1));
3131
+ proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
3109
3132
 
3110
3133
  if (scrollbar) {
3134
+
3111
3135
  if (axis.horiz) {
3112
3136
  scrollbar.position(
3113
3137
  axis.left,
3114
- axis.top + axis.height + axis.offset + 2 + (axis.opposite ? 0 : axis.axisTitleMargin),
3138
+ axis.top + axis.height + 2 + axis.chart.scrollbarsOffsets[1] +
3139
+ (axis.opposite ? 0 : axis.axisTitleMargin + axis.offset),
3115
3140
  axis.width,
3116
3141
  axis.height
3117
3142
  );
3143
+ offsetsIndex = 1;
3118
3144
  } else {
3119
3145
  scrollbar.position(
3120
- axis.left + axis.width + 2 + axis.offset + (axis.opposite ? axis.axisTitleMargin : 0),
3146
+ axis.left + axis.width + 2 + axis.chart.scrollbarsOffsets[0] +
3147
+ (axis.opposite ? axis.axisTitleMargin + axis.offset : 0),
3121
3148
  axis.top,
3122
3149
  axis.width,
3123
3150
  axis.height
3124
3151
  );
3152
+ offsetsIndex = 0;
3153
+ }
3154
+
3155
+ if ((!axis.opposite && !axis.horiz) || (axis.opposite && axis.horiz)) {
3156
+ axis.chart.scrollbarsOffsets[offsetsIndex] +=
3157
+ axis.scrollbar.size + axis.scrollbar.options.margin;
3125
3158
  }
3126
3159
 
3127
3160
  if (isNaN(scrollMin) || isNaN(scrollMax) || !defined(axis.min) || !defined(axis.max)) {
@@ -3147,9 +3180,10 @@
3147
3180
  index = axis.horiz ? 2 : 1,
3148
3181
  scrollbar = axis.scrollbar;
3149
3182
 
3150
- proceed.apply(axis, [].slice.call(arguments, 1));
3183
+ proceed.apply(axis, Array.prototype.slice.call(arguments, 1));
3151
3184
 
3152
3185
  if (scrollbar) {
3186
+ axis.chart.scrollbarsOffsets = [0, 0]; // reset scrollbars offsets
3153
3187
  axis.chart.axisOffset[index] += scrollbar.size + scrollbar.options.margin;
3154
3188
  }
3155
3189
  });
@@ -3162,7 +3196,7 @@
3162
3196
  this.scrollbar = this.scrollbar.destroy();
3163
3197
  }
3164
3198
 
3165
- proceed.apply(this, [].slice.call(arguments, 1));
3199
+ proceed.apply(this, Array.prototype.slice.call(arguments, 1));
3166
3200
  });
3167
3201
 
3168
3202
  H.Scrollbar = Scrollbar;
@@ -3170,7 +3204,7 @@
3170
3204
  }(Highcharts));
3171
3205
  (function(H) {
3172
3206
  /**
3173
- * (c) 2010-2016 Torstein Honsi
3207
+ * (c) 2010-2017 Torstein Honsi
3174
3208
  *
3175
3209
  * License: www.highcharts.com/license
3176
3210
  */
@@ -3727,8 +3761,9 @@
3727
3761
  );
3728
3762
  // Keep scale 0-1
3729
3763
  navigator.scrollbar.setRange(
3730
- zoomedMin / navigatorSize,
3731
- zoomedMax / navigatorSize
3764
+ // Use real value, not rounded because range can be very small (#1716)
3765
+ navigator.zoomedMin / navigatorSize,
3766
+ navigator.zoomedMax / navigatorSize
3732
3767
  );
3733
3768
  }
3734
3769
  navigator.rendered = true;
@@ -3743,10 +3778,7 @@
3743
3778
  container = chart.container,
3744
3779
  eventsToUnbind = [],
3745
3780
  mouseMoveHandler,
3746
- mouseUpHandler,
3747
- // iOS calls both events: mousedown+touchstart and mouseup+touchend
3748
- // So we add them just once, #6187
3749
- eventNames = hasTouch ? ['touchstart', 'touchmove', 'touchend'] : ['mousedown', 'mousemove', 'mouseup'];
3781
+ mouseUpHandler;
3750
3782
 
3751
3783
  /**
3752
3784
  * Create mouse events' handlers.
@@ -3760,14 +3792,23 @@
3760
3792
  };
3761
3793
 
3762
3794
  // Add shades and handles mousedown events
3763
- eventsToUnbind = navigator.getPartsEvents(eventNames[0]);
3795
+ eventsToUnbind = navigator.getPartsEvents('mousedown');
3764
3796
  // Add mouse move and mouseup events. These are bind to doc/container,
3765
3797
  // because Navigator.grabbedSomething flags are stored in mousedown events:
3766
3798
  eventsToUnbind.push(
3767
- addEvent(container, eventNames[1], mouseMoveHandler),
3768
- addEvent(doc, eventNames[2], mouseUpHandler)
3799
+ addEvent(container, 'mousemove', mouseMoveHandler),
3800
+ addEvent(doc, 'mouseup', mouseUpHandler)
3769
3801
  );
3770
3802
 
3803
+ // Touch events
3804
+ if (hasTouch) {
3805
+ eventsToUnbind.push(
3806
+ addEvent(container, 'touchmove', mouseMoveHandler),
3807
+ addEvent(doc, 'touchend', mouseUpHandler)
3808
+ );
3809
+ eventsToUnbind.concat(navigator.getPartsEvents('touchstart'));
3810
+ }
3811
+
3771
3812
  navigator.eventsToUnbind = eventsToUnbind;
3772
3813
 
3773
3814
  // Data events
@@ -4704,7 +4745,7 @@
4704
4745
  }(Highcharts));
4705
4746
  (function(H) {
4706
4747
  /**
4707
- * (c) 2010-2016 Torstein Honsi
4748
+ * (c) 2010-2017 Torstein Honsi
4708
4749
  *
4709
4750
  * License: www.highcharts.com/license
4710
4751
  */
@@ -5662,7 +5703,7 @@
5662
5703
  }(Highcharts));
5663
5704
  (function(H) {
5664
5705
  /**
5665
- * (c) 2010-2016 Torstein Honsi
5706
+ * (c) 2010-2017 Torstein Honsi
5666
5707
  *
5667
5708
  * License: www.highcharts.com/license
5668
5709
  */
@@ -6187,7 +6228,7 @@
6187
6228
  });
6188
6229
 
6189
6230
  /* ****************************************************************************
6190
- * Start value compare logic *
6231
+ * Start value compare logic *
6191
6232
  *****************************************************************************/
6192
6233
 
6193
6234
  /**
@@ -6336,7 +6377,7 @@
6336
6377
  };
6337
6378
 
6338
6379
  /* ****************************************************************************
6339
- * End value compare logic *
6380
+ * End value compare logic *
6340
6381
  *****************************************************************************/
6341
6382
 
6342
6383
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.9 (2017-03-08)
2
+ * @license Highcharts JS v5.0.10 (2017-03-31)
3
3
  *
4
4
  * (c) 2014 Highsoft AS
5
5
  * Authors: Jon Arild Nygard / Oystein Moseng
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license Highcharts JS v5.0.9 (2017-03-08)
2
+ * @license Highcharts JS v5.0.10 (2017-03-31)
3
3
  * X-range series
4
4
  *
5
- * (c) 2010-2016 Torstein Honsi, Lars A. V. Cabrera
5
+ * (c) 2010-2017 Torstein Honsi, Lars A. V. Cabrera
6
6
  *
7
7
  * --- WORK IN PROGRESS ---
8
8
  *
@@ -18,7 +18,7 @@
18
18
  }(function(Highcharts) {
19
19
  (function(H) {
20
20
  /**
21
- * (c) 2014-2016 Highsoft AS
21
+ * (c) 2014-2017 Highsoft AS
22
22
  * Authors: Torstein Honsi, Lars A. V. Cabrera
23
23
  *
24
24
  * License: www.highcharts.com/license
@@ -1,3 +1,3 @@
1
1
  module Highcharts
2
- VERSION = "5.0.9"
2
+ VERSION = "5.0.10"
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.9
4
+ version: 5.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Per Christian B. Viken