highcharts-rails 4.1.3 → 4.1.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: 01fcae71b38d2a26e9c19d3961f489928e124401
4
- data.tar.gz: 3bbd724da388bc47acfaca65ad2255374fe4dcbc
3
+ metadata.gz: 4a7d99b4cb1d1ab05f71178ae10706be52327a3b
4
+ data.tar.gz: a7da74086801908f0f8bc9307b897d3785a72ef6
5
5
  SHA512:
6
- metadata.gz: 1e2dde1202024f162c1d9c413ccd3d45f1dec0e0d278b913617cf4c644b5f2d2cbf1fb147d01144c2d5c800c35c4040421e65d0979f72d4786993a8c213dbb8c
7
- data.tar.gz: 375ac85c7a118220e0b6017ac91301a7476bb19aa8de333159e7d19b22e8146bdc39b7f8612a8907ce549dbd4254bd68e7341d0d00965f0df32e8ee62c2ccb09
6
+ metadata.gz: 869e6f15881a96a6e4ea3702577060313f26390f05a6000824915dad2257e4750c3cfd580da5b241de82c097f565373e3b2a0c6c2f35c624ec48987b1a13529f
7
+ data.tar.gz: 0a94857739a4ae98560cded6a9475ef03e53e3ecaacacd3be7cc368d6e33968fa7ece801cbf03585ad8e1920dc34df467a0139ca7bba486a00de38d7154fa904
@@ -1,3 +1,25 @@
1
+ # 4.1.4 / 2015-03-10
2
+
3
+ * Updated Highcharts to 4.1.4
4
+ * Added originalEvent to wrapped event argument for point and series click. Closed #3913.
5
+ * Changed description for error 23 (related to #3920).
6
+ * Fixed data.parseDate callback.
7
+ * Fixed #1093, chart was resized after cancelling print.
8
+ * Fixed #3890, errors on box plots and error bar series when stacking was set in general plot options.
9
+ * Fixed #3891, axis label rotation not working outside -90 to 90.
10
+ * Fixed #3899, tooltip on column range only working on one point per X value.
11
+ * Fixed #3901, tooltip displaying for null points.
12
+ * Fixed #3904, shared tooltip gave errors with null points.
13
+ * Fixed #3911, data label duplication on WebKit with Retina displays.
14
+ * Fixed #3919, click event always triggered on the same point with a shared tooltip.
15
+ * Fixed #3920, color tweening with gradient fills caused black result.
16
+ * Fixed #3926, tooltip not showing when entering the plot directly on a column.
17
+ * Fixed #3932, shadow was not applied when negativeColor was used.
18
+ * Fixed #3934, pie chart did not update when legend was hidden.
19
+ * Fixed #3937, pointer events not reset after chart destroy.
20
+ * Fixed #3945, tooltip did't work afer resize.
21
+ * Fixed regression causing mouseover to not work with a single series.
22
+
1
23
  # 4.1.3 / 2015-02-27
2
24
 
3
25
  * Updated Highcharts to 4.1.3
@@ -2,7 +2,7 @@
2
2
  // @compilation_level SIMPLE_OPTIMIZATIONS
3
3
 
4
4
  /**
5
- * @license Highcharts JS v4.1.3 (2015-02-27)
5
+ * @license Highcharts JS v4.1.4 (2015-03-10)
6
6
  *
7
7
  * (c) 2009-2014 Torstein Honsi
8
8
  *
@@ -56,7 +56,7 @@ var UNDEFINED,
56
56
  charts = [],
57
57
  chartCount = 0,
58
58
  PRODUCT = 'Highcharts',
59
- VERSION = '4.1.3',
59
+ VERSION = '4.1.4',
60
60
 
61
61
  // some constants for frequently used strings
62
62
  DIV = 'div',
@@ -149,8 +149,8 @@ function merge() {
149
149
  value = original[key];
150
150
 
151
151
  // Copy the contents of objects, but not arrays or DOM nodes
152
- if (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]'
153
- && key !== 'renderTo' && typeof value.nodeType !== 'number') {
152
+ if (value && typeof value === 'object' && Object.prototype.toString.call(value) !== '[object Array]' &&
153
+ key !== 'renderTo' && typeof value.nodeType !== 'number') {
154
154
  copy[key] = doCopy(copy[key] || {}, value);
155
155
 
156
156
  // Primitives and arrays are copied over directly
@@ -1259,8 +1259,8 @@ defaultOptions = {
1259
1259
  global: {
1260
1260
  useUTC: true,
1261
1261
  //timezoneOffset: 0,
1262
- canvasToolsURL: 'http://code.highcharts.com/4.1.3/modules/canvas-tools.js',
1263
- VMLRadialGradientURL: 'http://code.highcharts.com/4.1.3/gfx/vml-radial-gradient.png'
1262
+ canvasToolsURL: 'http://code.highcharts.com/4.1.4/modules/canvas-tools.js',
1263
+ VMLRadialGradientURL: 'http://code.highcharts.com/4.1.4/gfx/vml-radial-gradient.png'
1264
1264
  },
1265
1265
  chart: {
1266
1266
  //animation: true,
@@ -1768,7 +1768,8 @@ var Color = function (input) {
1768
1768
  get: get,
1769
1769
  brighten: brighten,
1770
1770
  rgba: rgba,
1771
- setOpacity: setOpacity
1771
+ setOpacity: setOpacity,
1772
+ raw: input
1772
1773
  };
1773
1774
  };
1774
1775
 
@@ -2858,17 +2859,22 @@ SVGElement.prototype = {
2858
2859
  otherZIndex,
2859
2860
  element = this.element,
2860
2861
  inserted,
2862
+ run = this.added,
2861
2863
  i;
2862
2864
 
2863
2865
  if (defined(value)) {
2864
2866
  element.setAttribute(key, value); // So we can read it for other elements in the group
2865
- this[key] = +value;
2867
+ value = +value;
2868
+ if (this[key] === value) { // Only update when needed (#3865)
2869
+ run = false;
2870
+ }
2871
+ this[key] = value;
2866
2872
  }
2867
2873
 
2868
2874
  // Insert according to this and other elements' zIndex. Before .add() is called,
2869
2875
  // nothing is done. Then on add, or by later calls to zIndexSetter, the node
2870
2876
  // is placed on the right place in the DOM.
2871
- if (this.added) {
2877
+ if (run) {
2872
2878
  value = this.zIndex;
2873
2879
 
2874
2880
  if (value && parentGroup) {
@@ -4152,7 +4158,11 @@ SVGRenderer.prototype = {
4152
4158
  if (x !== text.x || y !== text.y) {
4153
4159
  text.attr('x', x);
4154
4160
  if (y !== UNDEFINED) {
4155
- text.attr('y', y);
4161
+ // As a workaround for #3649, use translation instead of y attribute. #3649
4162
+ // is a rendering bug in WebKit for Retina (Mac, iOS, PhantomJS) that
4163
+ // results in duplicated text when an y attribute is used in combination
4164
+ // with a CSS text-style.
4165
+ text.attr(text.element.nodeName === 'SPAN' ? 'y' : 'translateY', y);
4156
4166
  }
4157
4167
  }
4158
4168
 
@@ -7193,17 +7203,18 @@ Axis.prototype = {
7193
7203
  linkedParent = axis.linkedParent,
7194
7204
  ordinalCorrection,
7195
7205
  hasCategories = !!axis.categories,
7196
- transA = axis.transA;
7206
+ transA = axis.transA,
7207
+ isXAxis = axis.isXAxis;
7197
7208
 
7198
7209
  // Adjust translation for padding. Y axis with categories need to go through the same (#1784).
7199
- if (axis.isXAxis || hasCategories || pointRange) {
7210
+ if (isXAxis || hasCategories || pointRange) {
7200
7211
  if (linkedParent) {
7201
7212
  minPointOffset = linkedParent.minPointOffset;
7202
7213
  pointRangePadding = linkedParent.pointRangePadding;
7203
7214
 
7204
7215
  } else {
7205
7216
  each(axis.series, function (series) {
7206
- var seriesPointRange = hasCategories ? 1 : (axis.isXAxis ? series.pointRange : (axis.axisPointRange || 0)), // #2806
7217
+ var seriesPointRange = hasCategories ? 1 : (isXAxis ? series.pointRange : (axis.axisPointRange || 0)), // #2806
7207
7218
  pointPlacement = series.options.pointPlacement,
7208
7219
  seriesClosestPointRange = series.closestPointRange;
7209
7220
 
@@ -7249,7 +7260,9 @@ Axis.prototype = {
7249
7260
  // closestPointRange means the closest distance between points. In columns
7250
7261
  // it is mostly equal to pointRange, but in lines pointRange is 0 while closestPointRange
7251
7262
  // is some other value
7252
- axis.closestPointRange = closestPointRange;
7263
+ if (isXAxis) {
7264
+ axis.closestPointRange = closestPointRange;
7265
+ }
7253
7266
  }
7254
7267
 
7255
7268
  // Secondary values
@@ -7886,7 +7899,7 @@ Axis.prototype = {
7886
7899
  each(autoRotation, function (rot) {
7887
7900
  var score;
7888
7901
 
7889
- if (rot && rot >= -90 && rot <= 90) {
7902
+ if (rot === rotationOption || (rot && rot >= -90 && rot <= 90)) { // #3891
7890
7903
 
7891
7904
  step = getStep(mathAbs(labelMetrics.h / mathSin(deg2rad * rot)));
7892
7905
 
@@ -9528,6 +9541,7 @@ Pointer.prototype = {
9528
9541
  }
9529
9542
  }
9530
9543
 
9544
+ // Handle shared tooltip or cases where a series is not yet hovered
9531
9545
  if (!(hoverSeries && hoverSeries.noSharedTooltip) && (shared || !hoverSeries)) { // #3821
9532
9546
  // Find nearest points on all series
9533
9547
  each(series, function (s) {
@@ -9549,35 +9563,43 @@ Pointer.prototype = {
9549
9563
  kdpoint = p;
9550
9564
  }
9551
9565
  }
9552
- //point = kdpoints[0];
9553
9566
  });
9567
+
9568
+ // Handle non-shared tooltips
9554
9569
  } else {
9555
- kdpoint = hoverSeries ? hoverSeries.searchPoint(e) : UNDEFINED;
9570
+ // If it has a hoverPoint and that series requires direct touch (like columns), use the hoverPoint (#3899).
9571
+ // Otherwise, search the k-d tree (like scatter).
9572
+ kdpoint = (hoverSeries.directTouch && hoverPoint) || (hoverSeries && hoverSeries.searchPoint(e));
9556
9573
  }
9557
9574
 
9558
- // Refresh tooltip for kdpoint
9559
- if (kdpoint && kdpoint !== hoverPoint) {
9575
+ // Refresh tooltip for kdpoint if new hover point or tooltip was hidden // #3926
9576
+ if (kdpoint && (kdpoint !== hoverPoint || (tooltip && tooltip.isHidden))) {
9560
9577
  // Draw tooltip if necessary
9561
9578
  if (shared && !kdpoint.series.noSharedTooltip) {
9562
9579
  i = kdpoints.length;
9563
9580
  trueXkd = kdpoint.clientX;
9564
9581
  while (i--) {
9565
9582
  trueX = kdpoints[i].clientX;
9566
- if (kdpoints[i].x !== kdpoint.x || trueX !== trueXkd || !defined(kdpoints[i].y) || (kdpoints[i].series.noSharedTooltip || false)) {
9583
+ if (kdpoints[i].x !== kdpoint.x || trueX !== trueXkd || (kdpoints[i].series.noSharedTooltip || false)) {
9567
9584
  kdpoints.splice(i, 1);
9568
9585
  }
9569
9586
  }
9570
- if (tooltip) {
9587
+ if (kdpoints.length && tooltip) {
9571
9588
  tooltip.refresh(kdpoints, e);
9572
9589
  }
9590
+
9591
+ // do mouseover on all points except the closest
9573
9592
  each(kdpoints, function (point) {
9574
- point.onMouseOver(e);
9575
- });
9593
+ if (point !== kdpoint) {
9594
+ point.onMouseOver(e);
9595
+ }
9596
+ });
9597
+ kdpoint.onMouseOver(e); // #3919 do mouseover on the closest point last to ensure it is the hoverpoint
9576
9598
  } else {
9577
- if (tooltip) {
9599
+ if (tooltip) {
9578
9600
  tooltip.refresh(kdpoint, e);
9579
9601
  }
9580
- kdpoint.onMouseOver(e);
9602
+ kdpoint.onMouseOver(e);
9581
9603
  }
9582
9604
 
9583
9605
  // Update positions (regardless of kdpoint or hoverPoint)
@@ -9592,7 +9614,9 @@ Pointer.prototype = {
9592
9614
  // Start the event listener to pick up the tooltip
9593
9615
  if (tooltip && !pointer._onDocumentMouseMove) {
9594
9616
  pointer._onDocumentMouseMove = function (e) {
9595
- pointer.onDocumentMouseMove(e);
9617
+ if (charts[hoverChartIndex]) {
9618
+ charts[hoverChartIndex].pointer.onDocumentMouseMove(e);
9619
+ }
9596
9620
  };
9597
9621
  addEvent(doc, 'mousemove', pointer._onDocumentMouseMove);
9598
9622
  }
@@ -9968,6 +9992,7 @@ Pointer.prototype = {
9968
9992
  plotTop = chart.plotTop;
9969
9993
 
9970
9994
  e = this.normalize(e);
9995
+ e.originalEvent = e; // #3913
9971
9996
  e.cancelBubble = true; // IE specific
9972
9997
 
9973
9998
  if (!chart.cancelClick) {
@@ -11900,7 +11925,7 @@ Chart.prototype = {
11900
11925
 
11901
11926
  // Width and height checks for display:none. Target is doc in IE8 and Opera,
11902
11927
  // win in Firefox, Chrome and IE9.
11903
- if (!chart.hasUserSize && width && height && (target === win || target === doc)) {
11928
+ if (!chart.hasUserSize && !chart.isPrinting && width && height && (target === win || target === doc)) { // #1093
11904
11929
  if (width !== chart.containerWidth || height !== chart.containerHeight) {
11905
11930
  clearTimeout(chart.reflowTimeout);
11906
11931
  if (e) { // Called from window.resize
@@ -14256,7 +14281,7 @@ Series.prototype = {
14256
14281
  series[graphKey] = series.chart.renderer.path(graphPath)
14257
14282
  .attr(attribs)
14258
14283
  .add(series.group)
14259
- .shadow(!i && options.shadow);
14284
+ .shadow((i < 2) && options.shadow); // add shadow to normal series (0) or to first zone (1) #3932
14260
14285
  }
14261
14286
  });
14262
14287
  },
@@ -14550,6 +14575,7 @@ Series.prototype = {
14550
14575
  var series = this,
14551
14576
  chart = series.chart,
14552
14577
  wasDirtyData = series.isDirtyData, // cache it here as it is set to false in render, but used after
14578
+ wasDirty = series.isDirty,
14553
14579
  group = series.group,
14554
14580
  xAxis = series.xAxis,
14555
14581
  yAxis = series.yAxis;
@@ -14571,11 +14597,12 @@ Series.prototype = {
14571
14597
 
14572
14598
  series.translate();
14573
14599
  series.render();
14574
-
14575
14600
  if (wasDirtyData) {
14576
- delete this.kdTree; // #3868 recalculate the kdtree with dirty data
14577
14601
  fireEvent(series, 'updatedData');
14578
14602
  }
14603
+ if (wasDirty || wasDirtyData) { // #3945 recalculate the kdtree when dirty
14604
+ delete this.kdTree; // #3868 recalculate the kdtree with dirty data
14605
+ }
14579
14606
  },
14580
14607
 
14581
14608
  /**
@@ -14629,9 +14656,12 @@ Series.prototype = {
14629
14656
  }
14630
14657
  }
14631
14658
 
14632
- // Start the recursive build process with a clone of the points array (#3873)
14659
+ // Start the recursive build process with a clone of the points array and null points filtered out (#3873)
14633
14660
  function startRecursive() {
14634
- series.kdTree = _kdtree(series.points.slice(), dimensions, dimensions);
14661
+ var points = grep(series.points, function (point) {
14662
+ return point.y !== null;
14663
+ });
14664
+ series.kdTree = _kdtree(points, dimensions, dimensions);
14635
14665
  }
14636
14666
 
14637
14667
  delete series.kdTree;
@@ -15195,7 +15225,7 @@ extend(Point.prototype, {
15195
15225
  chart.isDirtyBox = true;
15196
15226
  }
15197
15227
 
15198
- if (seriesOptions.legendType === 'point') { // #1831, #1885
15228
+ if (chart.legend.display && seriesOptions.legendType === 'point') { // #1831, #1885, #3934
15199
15229
  series.updateTotals();
15200
15230
  chart.legend.clearItems();
15201
15231
  }
@@ -17535,7 +17565,7 @@ if (seriesTypes.column) {
17535
17565
 
17536
17566
 
17537
17567
  /**
17538
- * Highcharts JS v4.1.3 (2015-02-27)
17568
+ * Highcharts JS v4.1.4 (2015-03-10)
17539
17569
  * Highcharts module to hide overlapping data labels. This module is included by default in Highmaps.
17540
17570
  *
17541
17571
  * (c) 2010-2014 Torstein Honsi
@@ -17649,10 +17679,6 @@ var TrackerMixin = Highcharts.TrackerMixin = {
17649
17679
  var target = e.target,
17650
17680
  point;
17651
17681
 
17652
- if (chart.hoverSeries !== series) {
17653
- series.onMouseOver();
17654
- }
17655
-
17656
17682
  while (target && !point) {
17657
17683
  point = target.point;
17658
17684
  target = target.parentNode;
@@ -18046,6 +18072,10 @@ extend(Point.prototype, {
18046
18072
  tooltip = chart.tooltip,
18047
18073
  hoverPoint = chart.hoverPoint;
18048
18074
 
18075
+ if (chart.hoverSeries !== series) {
18076
+ series.onMouseOver();
18077
+ }
18078
+
18049
18079
  // set normal state to previous series
18050
18080
  if (hoverPoint && hoverPoint !== point) {
18051
18081
  hoverPoint.onMouseOut();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.3 (2015-02-27)
2
+ * @license Highcharts JS v4.1.4 (2015-03-10)
3
3
  *
4
4
  * Standalone Highcharts Framework
5
5
  *
@@ -2,7 +2,7 @@
2
2
  // @compilation_level SIMPLE_OPTIMIZATIONS
3
3
 
4
4
  /**
5
- * @license Highcharts JS v4.1.3 (2015-02-27)
5
+ * @license Highcharts JS v4.1.4 (2015-03-10)
6
6
  *
7
7
  * (c) 2009-2013 Torstein Hønsi
8
8
  *
@@ -579,16 +579,21 @@ Highcharts.wrap(Highcharts.Chart.prototype, 'redraw', function (proceed) {
579
579
  proceed.apply(this, [].slice.call(arguments, 1));
580
580
  });
581
581
 
582
- // Draw the series in the reverse order (#3803)
583
- Highcharts.Chart.prototype.renderSeries = function () {
584
- var serie,
582
+ // Draw the series in the reverse order (#3803, #3917)
583
+ Highcharts.wrap(Highcharts.Chart.prototype, 'renderSeries', function (proceed) {
584
+ var series,
585
585
  i = this.series.length;
586
- while (i--) {
587
- serie = this.series[i];
588
- serie.translate();
589
- serie.render();
586
+
587
+ if (this.is3d()) {
588
+ while (i--) {
589
+ series = this.series[i];
590
+ series.translate();
591
+ series.render();
592
+ }
593
+ } else {
594
+ proceed.call(this);
590
595
  }
591
- };
596
+ });
592
597
 
593
598
  Highcharts.Chart.prototype.retrieveStacks = function (stacking) {
594
599
  var series = this.series,
@@ -2,7 +2,7 @@
2
2
  // @compilation_level SIMPLE_OPTIMIZATIONS
3
3
 
4
4
  /**
5
- * @license Highcharts JS v4.1.3 (2015-02-27)
5
+ * @license Highcharts JS v4.1.4 (2015-03-10)
6
6
  *
7
7
  * (c) 2009-2014 Torstein Honsi
8
8
  *
@@ -975,6 +975,7 @@ seriesTypes.areasplinerange = extendClass(seriesTypes.arearange, {
975
975
  shapeArgs.y = y;
976
976
  });
977
977
  },
978
+ directTouch: true,
978
979
  trackerGroups: ['group', 'dataLabelsGroup'],
979
980
  drawGraph: noop,
980
981
  pointAttrToOptions: colProto.pointAttrToOptions,
@@ -1487,7 +1488,8 @@ seriesTypes.boxplot = extendClass(seriesTypes.column, {
1487
1488
  }
1488
1489
  });
1489
1490
 
1490
- }
1491
+ },
1492
+ setStackedPoints: noop // #3890
1491
1493
 
1492
1494
 
1493
1495
  });
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Highcharts JS v4.1.3 (2015-02-27)
2
+ * Highcharts JS v4.1.4 (2015-03-10)
3
3
  * Highcharts Broken Axis module
4
4
  *
5
5
  * Author: Stephane Vanraes, Torstein Honsi
@@ -2908,7 +2908,7 @@ if (CanvasRenderingContext2D) {
2908
2908
  });
2909
2909
  }
2910
2910
  }/**
2911
- * @license Highcharts JS v4.1.3 (2015-02-27)
2911
+ * @license Highcharts JS v4.1.4 (2015-03-10)
2912
2912
  * CanVGRenderer Extension module
2913
2913
  *
2914
2914
  * (c) 2011-2012 Torstein Honsi, Erik Olsson
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.3 (2015-02-27)
2
+ * @license Highcharts JS v4.1.4 (2015-03-10)
3
3
  * Data module
4
4
  *
5
5
  * (c) 2012-2014 Torstein Honsi
@@ -520,9 +520,8 @@
520
520
 
521
521
  if (parseDate) {
522
522
  ret = parseDate(val);
523
- }
524
523
 
525
- if (typeof val === 'string') {
524
+ } else if (typeof val === 'string') {
526
525
  // Auto-detect the date format the first time
527
526
  if (!dateFormat) {
528
527
  for (key in this.dateFormats) {
@@ -31,24 +31,32 @@
31
31
  // Utilities
32
32
  /*
33
33
  * Return an intermediate color between two colors, according to pos where 0
34
- * is the from color and 1 is the to color
34
+ * is the from color and 1 is the to color. This method is copied from ColorAxis.js
35
+ * and should always be kept updated, until we get AMD support.
35
36
  */
36
37
  function tweenColors(from, to, pos) {
37
38
  // Check for has alpha, because rgba colors perform worse due to lack of
38
39
  // support in WebKit.
39
- var hasAlpha;
40
+ var hasAlpha,
41
+ ret;
40
42
 
41
- from = from.rgba;
42
- to = to.rgba;
43
- hasAlpha = (to[3] !== 1 || from[3] !== 1);
44
- if (!to.length || !from.length) {
43
+ // Unsupported color, return to-color (#3920)
44
+ if (!to.rgba.length || !from.rgba.length) {
45
45
  Highcharts.error(23);
46
+ ret = to.raw;
47
+
48
+ // Interpolate
49
+ } else {
50
+ from = from.rgba;
51
+ to = to.rgba;
52
+ hasAlpha = (to[3] !== 1 || from[3] !== 1);
53
+ ret = (hasAlpha ? 'rgba(' : 'rgb(') +
54
+ Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
55
+ Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
56
+ Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
57
+ (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
46
58
  }
47
- return (hasAlpha ? 'rgba(' : 'rgb(') +
48
- Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
49
- Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
50
- Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
51
- (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
59
+ return ret;
52
60
  }
53
61
  /**
54
62
  * Handle animation of the color attributes directly
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.3 (2015-02-27)
2
+ * @license Highcharts JS v4.1.4 (2015-03-10)
3
3
  * Exporting module
4
4
  *
5
5
  * (c) 2010-2014 Torstein Honsi
@@ -209,22 +209,6 @@ extend(Chart.prototype, {
209
209
  .replace(/<\/svg>.*?$/, '</svg>')
210
210
  // Batik doesn't support rgba fills and strokes (#3095)
211
211
  .replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"')
212
-
213
- // An issue with PhantomJS as of 2015-01-11. Revisit with newer versions. (#3649)
214
- .replace(/(text-shadow:)([^;"]+)([;"])/g, function (s, $1, $2, $3) {
215
- // Escape commas within rgb and rgba definitions
216
- $2 = $2.replace(/\([^\)]+\)/g, function (s) {
217
- return s.replace(/,/g, '|');
218
- });
219
- // Keep the first definition
220
- $2 = $2.split(',')[0];
221
- // Re-inert commas
222
- $2 = $2.replace(/\([^\)]+\)/g, function (s) {
223
- return s.replace(/\|/g, ',');
224
- });
225
- s = $1 + $2 + $3;
226
- return s;
227
- })
228
212
  /* This fails in IE < 8
229
213
  .replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
230
214
  return s2 +'.'+ s3[0];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.3 (2015-02-27)
2
+ * @license Highcharts JS v4.1.4 (2015-03-10)
3
3
  *
4
4
  * (c) 2011-2014 Torstein Honsi
5
5
  *
@@ -96,24 +96,33 @@ extend(ColorAxis.prototype, {
96
96
 
97
97
  /*
98
98
  * Return an intermediate color between two colors, according to pos where 0
99
- * is the from color and 1 is the to color
99
+ * is the from color and 1 is the to color.
100
+ * NOTE: Changes here should be copied
101
+ * to the same function in drilldown.src.js.
100
102
  */
101
103
  tweenColors: function (from, to, pos) {
102
104
  // Check for has alpha, because rgba colors perform worse due to lack of
103
105
  // support in WebKit.
104
- var hasAlpha;
106
+ var hasAlpha,
107
+ ret;
105
108
 
106
- from = from.rgba;
107
- to = to.rgba;
108
- hasAlpha = (to[3] !== 1 || from[3] !== 1);
109
- if (!to.length || !from.length) {
109
+ // Unsupported color, return to-color (#3920)
110
+ if (!to.rgba.length || !from.rgba.length) {
110
111
  Highcharts.error(23);
112
+ ret = to.raw;
113
+
114
+ // Interpolate
115
+ } else {
116
+ from = from.rgba;
117
+ to = to.rgba;
118
+ hasAlpha = (to[3] !== 1 || from[3] !== 1);
119
+ ret = (hasAlpha ? 'rgba(' : 'rgb(') +
120
+ Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
121
+ Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
122
+ Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
123
+ (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
111
124
  }
112
- return (hasAlpha ? 'rgba(' : 'rgb(') +
113
- Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
114
- Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
115
- Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
116
- (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
125
+ return ret;
117
126
  },
118
127
 
119
128
  initDataClasses: function (userOptions) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.3 (2015-02-27)
2
+ * @license Highcharts JS v4.1.4 (2015-03-10)
3
3
  * Plugin for displaying a message when there is no data visible in chart.
4
4
  *
5
5
  * (c) 2010-2014 Highsoft AS
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.3 (2015-02-27)
2
+ * @license Highcharts JS v4.1.4 (2015-03-10)
3
3
  * Solid angular gauge module
4
4
  *
5
5
  * (c) 2010-2014 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.3 (2015-02-27)
2
+ * @license Highcharts JS v4.1.4 (2015-03-10)
3
3
  *
4
4
  * (c) 2014 Highsoft AS
5
5
  * Authors: Jon Arild Nygard / Oystein Moseng
@@ -1,3 +1,3 @@
1
1
  module Highcharts
2
- VERSION = "4.1.3"
2
+ VERSION = "4.1.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: 4.1.3
4
+ version: 4.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Per Christian B. Viken