highcharts-rails 4.1.2 → 4.1.3

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: 920a1266c132250a90e02fbef2fb3ef6ec93b538
4
- data.tar.gz: 6645f9f784882d6f340e8668a0f65d2dfb4d4406
3
+ metadata.gz: 01fcae71b38d2a26e9c19d3961f489928e124401
4
+ data.tar.gz: 3bbd724da388bc47acfaca65ad2255374fe4dcbc
5
5
  SHA512:
6
- metadata.gz: 349761d2a987b1243889b7c08796f380a4eda03871190399eb7f37d07726847f938c25aa26a232f5bbd50a115d73cc5c214e729c94dceffc2b07241bd9467255
7
- data.tar.gz: d68832a6a9dcd46a7f1336edd861884bf99d59ae1e5995db37bbad2181171787fe2f3040019f64f0c79cf47e3f1415f3aeeeae51f47a6643facbcab37f5e9fe6
6
+ metadata.gz: 1e2dde1202024f162c1d9c413ccd3d45f1dec0e0d278b913617cf4c644b5f2d2cbf1fb147d01144c2d5c800c35c4040421e65d0979f72d4786993a8c213dbb8c
7
+ data.tar.gz: 375ac85c7a118220e0b6017ac91301a7476bb19aa8de333159e7d19b22e8146bdc39b7f8612a8907ce549dbd4254bd68e7341d0d00965f0df32e8ee62c2ccb09
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,10 @@
1
+ # 4.1.3 / 2015-02-27
2
+
3
+ * Updated Highcharts to 4.1.3
4
+ * Fixed #3900, duplicated Y axis in exported charts. Made export module more testable so it would have caught this error.
5
+ * Fixed #3898, zones incorrectly applied if outside axis range.
6
+ * Fixed #3895, error in title setter when setting a non-string value.
7
+
1
8
  # 4.1.2 / 2015-02-27
2
9
 
3
10
  * Updated Highcharts to 4.1.2
@@ -2,7 +2,7 @@
2
2
  // @compilation_level SIMPLE_OPTIMIZATIONS
3
3
 
4
4
  /**
5
- * @license Highcharts JS v4.1.2 (2015-02-27)
5
+ * @license Highcharts JS v4.1.3 (2015-02-27)
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.2',
59
+ VERSION = '4.1.3',
60
60
 
61
61
  // some constants for frequently used strings
62
62
  DIV = 'div',
@@ -1259,8 +1259,8 @@ defaultOptions = {
1259
1259
  global: {
1260
1260
  useUTC: true,
1261
1261
  //timezoneOffset: 0,
1262
- canvasToolsURL: 'http://code.highcharts.com/4.1.2/modules/canvas-tools.js',
1263
- VMLRadialGradientURL: 'http://code.highcharts.com/4.1.2/gfx/vml-radial-gradient.png'
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'
1264
1264
  },
1265
1265
  chart: {
1266
1266
  //animation: true,
@@ -2828,7 +2828,7 @@ SVGElement.prototype = {
2828
2828
  titleNode = doc.createElementNS(SVG_NS, 'title');
2829
2829
  this.element.appendChild(titleNode);
2830
2830
  }
2831
- titleNode.textContent = pick(value, '').replace(/<[^>]*>/g, ''); // #3276
2831
+ titleNode.textContent = (String(pick(value), '')).replace(/<[^>]*>/g, ''); // #3276 #3895
2832
2832
  },
2833
2833
  textSetter: function (value) {
2834
2834
  if (value !== this.textStr) {
@@ -14279,7 +14279,8 @@ Series.prototype = {
14279
14279
  zoneAxis = this.zoneAxis || 'y',
14280
14280
  axis = this[zoneAxis + 'Axis'],
14281
14281
  reversed = axis.reversed,
14282
- horiz = axis.horiz;
14282
+ horiz = axis.horiz,
14283
+ ignoreZones = false;
14283
14284
 
14284
14285
  if (zones.length && (graph || area)) {
14285
14286
  // The use of the Color Threshold assumes there are no gaps
@@ -14292,6 +14293,10 @@ Series.prototype = {
14292
14293
  translatedFrom = pick(translatedTo, (reversed ? (horiz ? chart.plotWidth : 0) : (horiz ? 0 : axis.toPixels(axis.min))));
14293
14294
  translatedTo = mathRound(axis.toPixels(pick(threshold.value, axis.max), true));
14294
14295
 
14296
+ if (ignoreZones) {
14297
+ translatedFrom = translatedTo = axis.toPixels(axis.max);
14298
+ }
14299
+
14295
14300
  if (axis.isXAxis) {
14296
14301
  clipAttr = {
14297
14302
  x: reversed ? translatedTo : translatedFrom,
@@ -14345,6 +14350,8 @@ Series.prototype = {
14345
14350
  series['colorArea' + i].clip(clips[i]);
14346
14351
  }
14347
14352
  }
14353
+ // if this zone extends out of the axis, ignore the others
14354
+ ignoreZones = threshold.value > axis.max;
14348
14355
  });
14349
14356
  this.clips = clips;
14350
14357
  }
@@ -17528,7 +17535,7 @@ if (seriesTypes.column) {
17528
17535
 
17529
17536
 
17530
17537
  /**
17531
- * Highcharts JS v4.1.2 (2015-02-27)
17538
+ * Highcharts JS v4.1.3 (2015-02-27)
17532
17539
  * Highcharts module to hide overlapping data labels. This module is included by default in Highmaps.
17533
17540
  *
17534
17541
  * (c) 2010-2014 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.2 (2015-02-27)
2
+ * @license Highcharts JS v4.1.3 (2015-02-27)
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.2 (2015-02-27)
5
+ * @license Highcharts JS v4.1.3 (2015-02-27)
6
6
  *
7
7
  * (c) 2009-2013 Torstein Hønsi
8
8
  *
@@ -2,7 +2,7 @@
2
2
  // @compilation_level SIMPLE_OPTIMIZATIONS
3
3
 
4
4
  /**
5
- * @license Highcharts JS v4.1.2 (2015-02-27)
5
+ * @license Highcharts JS v4.1.3 (2015-02-27)
6
6
  *
7
7
  * (c) 2009-2014 Torstein Honsi
8
8
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Highcharts JS v4.1.2 (2015-02-27)
2
+ * Highcharts JS v4.1.3 (2015-02-27)
3
3
  * Highcharts Broken Axis module
4
4
  *
5
5
  * Author: Stephane Vanraes, Torstein Honsi
@@ -89,7 +89,6 @@
89
89
  });
90
90
 
91
91
  wrap(Axis.prototype, 'init', function (proceed, chart, userOptions) {
92
-
93
92
  // Force Axis to be not-ordinal when breaks are defined
94
93
  if (userOptions.breaks && userOptions.breaks.length) {
95
94
  userOptions.ordinal = false;
@@ -142,6 +141,17 @@
142
141
  return nval;
143
142
  };
144
143
 
144
+ this.setExtremes = function (newMin, newMax, redraw, animation, eventArguments) {
145
+ // If trying to set extremes inside a break, extend it to before and after the break ( #3857 )
146
+ while (this.isInAnyBreak(newMin)) {
147
+ newMin -= this.closestPointRange;
148
+ }
149
+ while (this.isInAnyBreak(newMax)) {
150
+ newMax -= this.closestPointRange;
151
+ }
152
+ Axis.prototype.setExtremes.call(this, newMin, newMax, redraw, animation, eventArguments);
153
+ };
154
+
145
155
  this.setAxisTranslation = function (saveOld) {
146
156
  Axis.prototype.setAxisTranslation.call(this, saveOld);
147
157
 
@@ -2908,7 +2908,7 @@ if (CanvasRenderingContext2D) {
2908
2908
  });
2909
2909
  }
2910
2910
  }/**
2911
- * @license Highcharts JS v4.1.2 (2015-02-27)
2911
+ * @license Highcharts JS v4.1.3 (2015-02-27)
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.2 (2015-02-27)
2
+ * @license Highcharts JS v4.1.3 (2015-02-27)
3
3
  * Data module
4
4
  *
5
5
  * (c) 2012-2014 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.2 (2015-02-27)
2
+ * @license Highcharts JS v4.1.3 (2015-02-27)
3
3
  * Exporting module
4
4
  *
5
5
  * (c) 2010-2014 Torstein Honsi
@@ -320,10 +320,10 @@ extend(Chart.prototype, {
320
320
  }
321
321
  });
322
322
 
323
- // Axis options must be merged in one by one, since it may be an array or an object (#2022)
323
+ // Axis options must be merged in one by one, since it may be an array or an object (#2022, #3900)
324
324
  if (additionalOptions) {
325
- each(['xAxis', 'yAxis'], function (axisType, i) {
326
- each(splat(additionalOptions[axisType]), function (axisOptions) {
325
+ each(['xAxis', 'yAxis'], function (axisType) {
326
+ each(splat(additionalOptions[axisType]), function (axisOptions, i) {
327
327
  options[axisType][i] = merge(options[axisType][i], axisOptions);
328
328
  });
329
329
  });
@@ -364,30 +364,33 @@ extend(Chart.prototype, {
364
364
  return svg;
365
365
  },
366
366
 
367
+ getSVGForExport: function (options, chartOptions) {
368
+ var chartExportingOptions = this.options.exporting;
369
+
370
+ return this.getSVG(merge(
371
+ { chart: { borderRadius: 0 } },
372
+ chartExportingOptions.chartOptions,
373
+ chartOptions,
374
+ {
375
+ exporting: {
376
+ sourceWidth: (options && options.sourceWidth) || chartExportingOptions.sourceWidth,
377
+ sourceHeight: (options && options.sourceHeight) || chartExportingOptions.sourceHeight
378
+ }
379
+ }
380
+ ));
381
+ },
382
+
367
383
  /**
368
384
  * Submit the SVG representation of the chart to the server
369
385
  * @param {Object} options Exporting options. Possible members are url, type, width and formAttributes.
370
386
  * @param {Object} chartOptions Additional chart options for the SVG representation of the chart
371
387
  */
372
388
  exportChart: function (options, chartOptions) {
373
- options = options || {};
374
-
375
- var chart = this,
376
- chartExportingOptions = chart.options.exporting,
377
- svg = chart.getSVG(merge(
378
- { chart: { borderRadius: 0 } },
379
- chartExportingOptions.chartOptions,
380
- chartOptions,
381
- {
382
- exporting: {
383
- sourceWidth: options.sourceWidth || chartExportingOptions.sourceWidth,
384
- sourceHeight: options.sourceHeight || chartExportingOptions.sourceHeight
385
- }
386
- }
387
- ));
389
+
390
+ var svg = this.getSVGForExport(options, chartOptions);
388
391
 
389
392
  // merge the options
390
- options = merge(chart.options.exporting, options);
393
+ options = merge(this.options.exporting, options);
391
394
 
392
395
  // do the post
393
396
  Highcharts.post(options.url, {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.2 (2015-02-27)
2
+ * @license Highcharts JS v4.1.3 (2015-02-27)
3
3
  *
4
4
  * (c) 2011-2014 Torstein Honsi
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.2 (2015-02-27)
2
+ * @license Highcharts JS v4.1.3 (2015-02-27)
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.2 (2015-02-27)
2
+ * @license Highcharts JS v4.1.3 (2015-02-27)
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.2 (2015-02-27)
2
+ * @license Highcharts JS v4.1.3 (2015-02-27)
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.2"
2
+ VERSION = "4.1.3"
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.2
4
+ version: 4.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Per Christian B. Viken