highcharts-rails 4.1.4 → 4.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.4 (2015-03-10)
2
+ * @license Highcharts JS v4.1.5 (2015-04-13)
3
3
  * Exporting module
4
4
  *
5
5
  * (c) 2010-2014 Torstein Honsi
@@ -223,7 +223,7 @@ extend(Chart.prototype, {
223
223
  .replace(/height=([^" ]+)/g, 'height="$1"')
224
224
  .replace(/width=([^" ]+)/g, 'width="$1"')
225
225
  .replace(/hc-svg-href="([^"]+)">/g, 'xlink:href="$1"/>')
226
- .replace(/id=([^" >]+)/g, 'id="$1"')
226
+ .replace(/ id=([^" >]+)/g, 'id="$1"') // #4003
227
227
  .replace(/class=([^" >]+)/g, 'class="$1"')
228
228
  .replace(/ transform /g, ' ')
229
229
  .replace(/:(path|rect)/g, '$1')
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.4 (2015-03-10)
2
+ * @license Highcharts JS v4.1.5 (2015-04-13)
3
3
  *
4
4
  * (c) 2011-2014 Torstein Honsi
5
5
  *
@@ -98,7 +98,7 @@ extend(ColorAxis.prototype, {
98
98
  * Return an intermediate color between two colors, according to pos where 0
99
99
  * is the from color and 1 is the to color.
100
100
  * NOTE: Changes here should be copied
101
- * to the same function in drilldown.src.js.
101
+ * to the same function in drilldown.src.js and solid-gauge-src.js.
102
102
  */
103
103
  tweenColors: function (from, to, pos) {
104
104
  // Check for has alpha, because rgba colors perform worse due to lack of
@@ -108,8 +108,7 @@ extend(ColorAxis.prototype, {
108
108
 
109
109
  // Unsupported color, return to-color (#3920)
110
110
  if (!to.rgba.length || !from.rgba.length) {
111
- Highcharts.error(23);
112
- ret = to.raw;
111
+ ret = to.raw || 'none';
113
112
 
114
113
  // Interpolate
115
114
  } else {
@@ -375,7 +374,7 @@ extend(ColorAxis.prototype, {
375
374
  }
376
375
  },
377
376
  getPlotLinePath: function (a, b, c, d, pos) {
378
- if (pos) { // crosshairs only
377
+ if (typeof pos === 'number') { // crosshairs only // #3969 pos can be 0 !!
379
378
  return this.horiz ?
380
379
  ['M', pos - 4, this.top - 6, 'L', pos + 4, this.top - 6, pos, this.top, 'Z'] :
381
380
  ['M', this.left, pos, 'L', this.left - 6, pos + 6, this.left - 6, pos - 6, 'Z'];
@@ -568,6 +567,7 @@ defaultOptions.plotOptions.heatmap = merge(defaultOptions.plotOptions.scatter, {
568
567
  padding: 0 // #3837
569
568
  },
570
569
  marker: null,
570
+ pointRange: null, // dynamically set to colsize by default
571
571
  tooltip: {
572
572
  pointFormat: '{point.x}, {point.y}: {point.value}<br/>'
573
573
  },
@@ -589,10 +589,17 @@ seriesTypes.heatmap = extendClass(seriesTypes.scatter, merge(colorSeriesMixin, {
589
589
  hasPointSpecificOptions: true,
590
590
  supportsDrilldown: true,
591
591
  getExtremesFromAll: true,
592
+
593
+ /**
594
+ * Override the init method to add point ranges on both axes.
595
+ */
592
596
  init: function () {
597
+ var options;
593
598
  seriesTypes.scatter.prototype.init.apply(this, arguments);
594
- this.pointRange = this.options.colsize || 1;
595
- this.yAxis.axisPointRange = this.options.rowsize || 1; // general point range
599
+
600
+ options = this.options;
601
+ this.pointRange = options.pointRange = pick(options.pointRange, options.colsize || 1); // #3758, prevent resetting in setData
602
+ this.yAxis.axisPointRange = options.rowsize || 1; // general point range
596
603
  },
597
604
  translate: function () {
598
605
  var series = this,
@@ -611,7 +618,7 @@ seriesTypes.heatmap = extendClass(seriesTypes.scatter, merge(colorSeriesMixin, {
611
618
  y2 = Math.round(yAxis.translate(point.y + yPad, 0, 1, 0, 1));
612
619
 
613
620
  // Set plotX and plotY for use in K-D-Tree and more
614
- point.plotX = (x1 + x2) / 2;
621
+ point.plotX = point.clientX = (x1 + x2) / 2;
615
622
  point.plotY = (y1 + y2) / 2;
616
623
 
617
624
  point.shapeType = 'rect';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.4 (2015-03-10)
2
+ * @license Highcharts JS v4.1.5 (2015-04-13)
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.4 (2015-03-10)
2
+ * @license Highcharts JS v4.1.5 (2015-04-13)
3
3
  * Solid angular gauge module
4
4
  *
5
5
  * (c) 2010-2014 Torstein Honsi
@@ -120,19 +120,32 @@
120
120
  }
121
121
  return color;
122
122
  },
123
+ /*
124
+ * Return an intermediate color between two colors, according to pos where 0
125
+ * is the from color and 1 is the to color.
126
+ */
123
127
  tweenColors: function (from, to, pos) {
124
128
  // Check for has alpha, because rgba colors perform worse due to lack of
125
129
  // support in WebKit.
126
- var hasAlpha = (to.rgba[3] !== 1 || from.rgba[3] !== 1);
130
+ var hasAlpha,
131
+ ret;
132
+
133
+ // Unsupported color, return to-color (#3920)
134
+ if (!to.rgba.length || !from.rgba.length) {
135
+ ret = to.raw || 'none';
127
136
 
128
- if (from.rgba.length === 0 || to.rgba.length === 0) {
129
- return 'none';
137
+ // Interpolate
138
+ } else {
139
+ from = from.rgba;
140
+ to = to.rgba;
141
+ hasAlpha = (to[3] !== 1 || from[3] !== 1);
142
+ ret = (hasAlpha ? 'rgba(' : 'rgb(') +
143
+ Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
144
+ Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
145
+ Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
146
+ (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
130
147
  }
131
- return (hasAlpha ? 'rgba(' : 'rgb(') +
132
- Math.round(to.rgba[0] + (from.rgba[0] - to.rgba[0]) * (1 - pos)) + ',' +
133
- Math.round(to.rgba[1] + (from.rgba[1] - to.rgba[1]) * (1 - pos)) + ',' +
134
- Math.round(to.rgba[2] + (from.rgba[2] - to.rgba[2]) * (1 - pos)) +
135
- (hasAlpha ? (',' + (to.rgba[3] + (from.rgba[3] - to.rgba[3]) * (1 - pos))) : '') + ')';
148
+ return ret;
136
149
  }
137
150
  };
138
151
 
@@ -171,7 +184,6 @@
171
184
  yAxis = series.yAxis,
172
185
  center = yAxis.center,
173
186
  options = series.options,
174
- radius = series.radius = (pInt(pick(options.radius, 100)) * center[2]) / 200,
175
187
  renderer = series.chart.renderer,
176
188
  overshoot = options.overshoot,
177
189
  overshootVal = overshoot && typeof overshoot === 'number' ? overshoot / 180 * Math.PI : 0;
@@ -179,7 +191,8 @@
179
191
  H.each(series.points, function (point) {
180
192
  var graphic = point.graphic,
181
193
  rotation = yAxis.startAngleRad + yAxis.translate(point.y, null, null, null, true),
182
- innerRadius = (pInt(pick(options.innerRadius, 60)) * center[2]) / 200,
194
+ radius = (pInt(pick(point.options.radius, options.radius, 100)) * center[2]) / 200, // docs: series<solidgauge>.data.radius http://jsfiddle.net/highcharts/7nwebu4b/
195
+ innerRadius = (pInt(pick(point.options.innerRadius, options.innerRadius, 60)) * center[2]) / 200, // docs: series<solidgauge>.data.innerRadius
183
196
  shapeArgs,
184
197
  d,
185
198
  toColor = yAxis.toColor(point.y, point),
@@ -220,6 +233,7 @@
220
233
  end: maxAngle,
221
234
  fill: toColor
222
235
  };
236
+ point.startR = radius; // For PieSeries.animate
223
237
 
224
238
  if (graphic) {
225
239
  d = shapeArgs.d;
@@ -243,11 +257,10 @@
243
257
  */
244
258
  animate: function (init) {
245
259
 
246
- this.center = this.yAxis.center;
247
- this.center[3] = 2 * this.radius;
248
- this.startAngleRad = this.yAxis.startAngleRad;
249
-
250
- H.seriesTypes.pie.prototype.animate.call(this, init);
260
+ if (!init) {
261
+ this.startAngleRad = this.yAxis.startAngleRad;
262
+ H.seriesTypes.pie.prototype.animate.call(this, init);
263
+ }
251
264
  }
252
265
  });
253
266
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.4 (2015-03-10)
2
+ * @license Highcharts JS v4.1.5 (2015-04-13)
3
3
  *
4
4
  * (c) 2014 Highsoft AS
5
5
  * Authors: Jon Arild Nygard / Oystein Moseng
@@ -773,6 +773,7 @@
773
773
  this.rootNode = id;
774
774
  this.xAxis.setExtremes(val.x, val.x + val.width, false);
775
775
  this.yAxis.setExtremes(val.y, val.y + val.height, false);
776
+ this.isDirty = true; // Force redraw
776
777
  this.chart.redraw();
777
778
  },
778
779
  showDrillUpButton: function (name) {
@@ -824,6 +825,7 @@
824
825
  // Get the extremes from the y data
825
826
  Series.prototype.getExtremes.call(this);
826
827
  },
828
+ getExtremesFromAll: true,
827
829
  bindAxes: function () {
828
830
  var treeAxis = {
829
831
  endOnTick: false,
@@ -1,3 +1,3 @@
1
1
  module Highcharts
2
- VERSION = "4.1.4"
2
+ VERSION = "4.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: highcharts-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.4
4
+ version: 4.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Per Christian B. Viken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2015-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties