highcharts-rails 4.1.0 → 4.1.1

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: 9e271caec12da1c1816bc7ba03229a5396e5bbcc
4
- data.tar.gz: 21c07c02233a995a590028bf0d4b3797d1e7ecda
3
+ metadata.gz: 3b89f58bbf9482337db0d6631dafb3a0911f8f45
4
+ data.tar.gz: 8240049f958306eb2a9347b663ea7741bbd4f6a8
5
5
  SHA512:
6
- metadata.gz: 8d2783c5c9e0a2ea1d6927c0d986672afbb638245415c5b9bd2e95a058adbe1715b885d94cae648d3a8d36dd9485edd201d3770f2a8ad980e2c221e7199968db
7
- data.tar.gz: 56376a1d25174a0861dd1b0500c9814bb05436955453e8b4814c52dacae140bd850f5bf56001b666d2ea545bc957638cc3a6dcc493a99b022eae7b62d0369bbb
6
+ metadata.gz: a9d52b81b531629a2ac87907ec296ed7a8ad208a0f622fbf007ef86f07177b9301fc5b1207ea6a57e160b330c470ce355902eab058c30c558192cc79efeb1a7d
7
+ data.tar.gz: b39ea967f4042ca012d05e536bb9c27b4a068fc7d6d7af2336cd72c9bdf993d9200d0c7050ce9e62d3f13ac1329767bc3e8682a566fb5f4a98aab638f19d8022
data/CHANGELOG.markdown CHANGED
@@ -1,4 +1,9 @@
1
- # 4.1.0 / 2015-01-26
1
+ # 4.1.1 / 2015-02-17
2
+
3
+ * Updated Highcharts to 4.1.1
4
+ * Fixed #3826, a 4.1 regression causing markers to be clipped after setSize.
5
+
6
+ # 4.1.0 / 2015-02-16
2
7
 
3
8
  * Updated Highcharts to 4.1.0
4
9
  * Added polygon series type
@@ -2,7 +2,7 @@
2
2
  // @compilation_level SIMPLE_OPTIMIZATIONS
3
3
 
4
4
  /**
5
- * @license Highcharts JS v4.1.0 (2015-02-16)
5
+ * @license Highcharts JS v4.1.1 (2015-02-17)
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.0',
59
+ VERSION = '4.1.1',
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.0/modules/canvas-tools.js',
1263
- VMLRadialGradientURL: 'http://code.highcharts.com/4.1.0/gfx/vml-radial-gradient.png'
1262
+ canvasToolsURL: 'http://code.highcharts.com/4.1.1/modules/canvas-tools.js',
1263
+ VMLRadialGradientURL: 'http://code.highcharts.com/4.1.1/gfx/vml-radial-gradient.png'
1264
1264
  },
1265
1265
  chart: {
1266
1266
  //animation: true,
@@ -7678,6 +7678,10 @@ Axis.prototype = {
7678
7678
 
7679
7679
  redraw = pick(redraw, true); // defaults to true
7680
7680
 
7681
+ each(axis.series, function (serie) {
7682
+ delete serie.kdTree;
7683
+ });
7684
+
7681
7685
  // Extend the arguments with min and max
7682
7686
  eventArguments = extend(eventArguments, {
7683
7687
  min: newMin,
@@ -9492,7 +9496,7 @@ Pointer.prototype = {
9492
9496
  distance = chart.chartWidth,
9493
9497
  rdistance = chart.chartWidth,
9494
9498
  anchor,
9495
-
9499
+ noSharedTooltip,
9496
9500
  kdpoints = [],
9497
9501
  kdpoint;
9498
9502
 
@@ -9505,12 +9509,13 @@ Pointer.prototype = {
9505
9509
  }
9506
9510
  }
9507
9511
  }
9508
-
9509
- if (shared || !hoverSeries) {
9512
+
9513
+ if (!(hoverSeries && hoverSeries.noSharedTooltip) && (shared || !hoverSeries)) { // #3821
9510
9514
  // Find nearest points on all series
9511
9515
  each(series, function (s) {
9512
9516
  // Skip hidden series
9513
- if (s.visible && pick(s.options.enableMouseTracking, true)) {
9517
+ noSharedTooltip = s.noSharedTooltip && shared;
9518
+ if (s.visible && !noSharedTooltip && pick(s.options.enableMouseTracking, true)) { // #3821
9514
9519
  kdpoints.push(s.searchPoint(e));
9515
9520
  }
9516
9521
  });
@@ -13661,7 +13666,9 @@ Series.prototype = {
13661
13666
  chart[sharedClipKey] = clipRect = renderer.clipRect(clipBox);
13662
13667
 
13663
13668
  }
13664
- clipRect.count += 1;
13669
+ if (animation) {
13670
+ clipRect.count += 1;
13671
+ }
13665
13672
 
13666
13673
  if (this.options.clip !== false) {
13667
13674
  this.group.clip(animation || seriesClipBox ? clipRect : chart.clipRect);
@@ -13672,7 +13679,7 @@ Series.prototype = {
13672
13679
  // Remove the shared clipping rectancgle when all series are shown
13673
13680
  if (!animation) {
13674
13681
  clipRect.count -= 1;
13675
- if (clipRect.count === 0 && sharedClipKey && chart[sharedClipKey]) {
13682
+ if (clipRect.count <= 0 && sharedClipKey && chart[sharedClipKey]) {
13676
13683
  if (!seriesClipBox) {
13677
13684
  chart[sharedClipKey] = chart[sharedClipKey].destroy();
13678
13685
  }
@@ -15085,7 +15092,7 @@ extend(Point.prototype, {
15085
15092
  i,
15086
15093
  chart = series.chart,
15087
15094
  seriesOptions = series.options,
15088
- names = series.xAxis.names;
15095
+ names = series.xAxis && series.xAxis.names;
15089
15096
 
15090
15097
  redraw = pick(redraw, true);
15091
15098
 
@@ -15244,6 +15251,7 @@ extend(Series.prototype, {
15244
15251
  }
15245
15252
 
15246
15253
  // redraw
15254
+ delete series.kdTree; // #3816 kdTree has to be rebuild.
15247
15255
  series.isDirty = true;
15248
15256
  series.isDirtyData = true;
15249
15257
  if (redraw) {
@@ -15276,6 +15284,7 @@ extend(Series.prototype, {
15276
15284
  }
15277
15285
 
15278
15286
  // redraw
15287
+ delete series.kdTree; // #3816 kdTree has to be rebuild.
15279
15288
  series.isDirty = true;
15280
15289
  series.isDirtyData = true;
15281
15290
  if (redraw) {
@@ -17442,7 +17451,7 @@ if (seriesTypes.column) {
17442
17451
 
17443
17452
 
17444
17453
  /**
17445
- * @license Highcharts JS v4.1.0 (2015-02-16)
17454
+ * Highcharts JS v4.1.1 (2015-02-17)
17446
17455
  * Highcharts module to hide overlapping data labels. This module is included by default in Highmaps.
17447
17456
  *
17448
17457
  * (c) 2010-2014 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.0 (2015-02-16)
2
+ * @license Highcharts JS v4.1.1 (2015-02-17)
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.0 (2015-02-16)
5
+ * @license Highcharts JS v4.1.1 (2015-02-17)
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.0 (2015-02-16)
5
+ * @license Highcharts JS v4.1.1 (2015-02-17)
6
6
  *
7
7
  * (c) 2009-2014 Torstein Honsi
8
8
  *
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Highcharts JS v4.1.1 (2015-02-17)
3
+ * Highcharts Broken Axis module
4
+ *
5
+ * Author: Stephane Vanraes, Torstein Honsi
6
+ * License: www.highcharts.com/license
7
+ */
8
+
9
+ /*global HighchartsAdapter*/
10
+ (function (H) {
11
+
12
+ "use strict";
13
+
14
+ var pick = H.pick,
15
+ wrap = H.wrap,
16
+ extend = H.extend,
17
+ fireEvent = HighchartsAdapter.fireEvent,
18
+ Axis = H.Axis,
19
+ Series = H.Series;
20
+
21
+ function stripArguments() {
22
+ return Array.prototype.slice.call(arguments, 1);
23
+ }
24
+
25
+ extend(Axis.prototype, {
26
+ isInBreak: function (brk, val) {
27
+ var repeat = brk.repeat || Infinity,
28
+ from = brk.from,
29
+ length = brk.to - brk.from,
30
+ test = (val >= from ? (val - from) % repeat : repeat - ((from - val) % repeat));
31
+
32
+ if (!brk.inclusive) {
33
+ return (test < length && test !== 0);
34
+ } else {
35
+ return (test <= length);
36
+ }
37
+ },
38
+
39
+ isInAnyBreak: function (val, testKeep) {
40
+ // Sanity Check
41
+ if (!this.options.breaks) { return false; }
42
+
43
+ var breaks = this.options.breaks,
44
+ i = breaks.length,
45
+ inbrk = false,
46
+ keep = false;
47
+
48
+
49
+ while (i--) {
50
+ if (this.isInBreak(breaks[i], val)) {
51
+ inbrk = true;
52
+ if (!keep) {
53
+ keep = pick(breaks[i].showPoints, this.isXAxis ? false : true);
54
+ }
55
+ }
56
+ }
57
+
58
+ if (inbrk && testKeep) {
59
+ return inbrk && !keep;
60
+ } else {
61
+ return inbrk;
62
+ }
63
+ }
64
+ });
65
+
66
+ wrap(Axis.prototype, 'setTickPositions', function (proceed) {
67
+ proceed.apply(this, Array.prototype.slice.call(arguments, 1));
68
+
69
+ if (this.options.breaks) {
70
+ var axis = this,
71
+ tickPositions = this.tickPositions,
72
+ info = this.tickPositions.info,
73
+ newPositions = [],
74
+ i;
75
+
76
+ if (info && info.totalRange >= axis.closestPointRange) {
77
+ return;
78
+ }
79
+
80
+ for (i = 0; i < tickPositions.length; i++) {
81
+ if (!axis.isInAnyBreak(tickPositions[i])) {
82
+ newPositions.push(tickPositions[i]);
83
+ }
84
+ }
85
+
86
+ this.tickPositions = newPositions;
87
+ this.tickPositions.info = info;
88
+ }
89
+ });
90
+
91
+ wrap(Axis.prototype, 'init', function (proceed, chart, userOptions) {
92
+
93
+ // Force Axis to be not-ordinal when breaks are defined
94
+ if (userOptions.breaks && userOptions.breaks.length) {
95
+ userOptions.ordinal = false;
96
+ }
97
+
98
+ proceed.call(this, chart, userOptions);
99
+
100
+ if (this.options.breaks) {
101
+
102
+ var axis = this;
103
+
104
+ axis.postTranslate = true;
105
+
106
+ this.val2lin = function (val) {
107
+ var nval = val,
108
+ brk,
109
+ i;
110
+
111
+ for (i = 0; i < axis.breakArray.length; i++) {
112
+ brk = axis.breakArray[i];
113
+ if (brk.to <= val) {
114
+ nval -= (brk.len);
115
+ } else if (brk.from >= val) {
116
+ break;
117
+ } else if (axis.isInBreak(brk, val)) {
118
+ nval -= (val - brk.from);
119
+ break;
120
+ }
121
+ }
122
+
123
+ return nval;
124
+ };
125
+
126
+ this.lin2val = function (val) {
127
+ var nval = val,
128
+ brk,
129
+ i;
130
+
131
+ for (i = 0; i < axis.breakArray.length; i++) {
132
+ brk = axis.breakArray[i];
133
+ if (brk.from >= nval) {
134
+ break;
135
+ } else if (brk.to < nval) {
136
+ nval += (brk.to - brk.from);
137
+ } else if (axis.isInBreak(brk, nval)) {
138
+ nval += (brk.to - brk.from);
139
+ }
140
+ }
141
+
142
+ return nval;
143
+ };
144
+
145
+ this.setAxisTranslation = function (saveOld) {
146
+ Axis.prototype.setAxisTranslation.call(this, saveOld);
147
+
148
+ var breaks = axis.options.breaks,
149
+ breakArrayT = [], // Temporary one
150
+ breakArray = [],
151
+ length = 0,
152
+ inBrk,
153
+ repeat,
154
+ brk,
155
+ min = axis.userMin || axis.min,
156
+ max = axis.userMax || axis.max,
157
+ start,
158
+ i,
159
+ j;
160
+
161
+ // Min & Max Check
162
+ for (i in breaks) {
163
+ brk = breaks[i];
164
+ if (axis.isInBreak(brk, min)) {
165
+ min += (brk.to % brk.repeat) - (min % brk.repeat);
166
+ }
167
+ if (axis.isInBreak(brk, max)) {
168
+ max -= (max % brk.repeat) - (brk.from % brk.repeat);
169
+ }
170
+ }
171
+
172
+ // Construct an array holding all breaks in the axis
173
+ for (i in breaks) {
174
+ brk = breaks[i];
175
+ start = brk.from;
176
+ repeat = brk.repeat || Infinity;
177
+
178
+ while (start - repeat > min) {
179
+ start -= repeat;
180
+ }
181
+ while (start < min) {
182
+ start += repeat;
183
+ }
184
+
185
+ for (j = start; j < max; j += repeat) {
186
+ breakArrayT.push({
187
+ value: j,
188
+ move: 'in'
189
+ });
190
+ breakArrayT.push({
191
+ value: j + (brk.to - brk.from),
192
+ move: 'out',
193
+ size: brk.breakSize
194
+ });
195
+ }
196
+ }
197
+
198
+ breakArrayT.sort(function (a, b) {
199
+ if (a.value === b.value) {
200
+ return (a.move === 'in' ? 0 : 1) - (b.move === 'in' ? 0 : 1);
201
+ } else {
202
+ return a.value - b.value;
203
+ }
204
+ });
205
+
206
+ // Simplify the breaks
207
+ inBrk = 0;
208
+ start = min;
209
+
210
+ for (i in breakArrayT) {
211
+ brk = breakArrayT[i];
212
+ inBrk += (brk.move === 'in' ? 1 : -1);
213
+
214
+ if (inBrk === 1 && brk.move === 'in') {
215
+ start = brk.value;
216
+ }
217
+ if (inBrk === 0) {
218
+ breakArray.push({
219
+ from: start,
220
+ to: brk.value,
221
+ len: brk.value - start - (brk.size || 0)
222
+ });
223
+ length += brk.value - start - (brk.size || 0);
224
+ }
225
+ }
226
+
227
+ axis.breakArray = breakArray;
228
+
229
+ fireEvent(axis, 'afterBreaks');
230
+
231
+ axis.transA *= ((max - axis.min) / (max - min - length));
232
+
233
+ axis.min = min;
234
+ axis.max = max;
235
+
236
+ };
237
+ }
238
+ });
239
+
240
+ wrap(Series.prototype, 'generatePoints', function (proceed) {
241
+
242
+ proceed.apply(this, stripArguments(arguments));
243
+
244
+ var series = this,
245
+ xAxis = series.xAxis,
246
+ yAxis = series.yAxis,
247
+ points = series.points,
248
+ point,
249
+ i = points.length;
250
+
251
+
252
+ if (xAxis && yAxis && (xAxis.options.breaks || yAxis.options.breaks)) {
253
+ while (i--) {
254
+ point = points[i];
255
+
256
+ if (xAxis.isInAnyBreak(point.x, true) || yAxis.isInAnyBreak(point.y, true)) {
257
+ points.splice(i, 1);
258
+ }
259
+ }
260
+ }
261
+
262
+ });
263
+
264
+ wrap(H.seriesTypes.column.prototype, 'drawPoints', function (proceed) {
265
+ proceed.apply(this);
266
+
267
+ var series = this,
268
+ points = series.points,
269
+ yAxis = series.yAxis,
270
+ breaks = yAxis.breakArray || [],
271
+ point,
272
+ brk,
273
+ i,
274
+ j,
275
+ y;
276
+
277
+ for (i = 0; i < points.length; i++) {
278
+ point = points[i];
279
+ y = point.stackY || point.y;
280
+ for (j = 0; j < breaks.length; j++) {
281
+ brk = breaks[j];
282
+ if (y < brk.from) {
283
+ break;
284
+ } else if (y > brk.to) {
285
+ fireEvent(yAxis, 'pointBreak', {point: point, brk: brk});
286
+ } else {
287
+ fireEvent(yAxis, 'pointInBreak', {point: point, brk: brk});
288
+ }
289
+ }
290
+ }
291
+
292
+ });
293
+ }(Highcharts));
@@ -2908,7 +2908,7 @@ if (CanvasRenderingContext2D) {
2908
2908
  });
2909
2909
  }
2910
2910
  }/**
2911
- * @license Highcharts JS v4.1.0 (2015-02-16)
2911
+ * @license Highcharts JS v4.1.1 (2015-02-17)
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.0 (2015-02-16)
2
+ * @license Highcharts JS v4.1.1 (2015-02-17)
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.0 (2015-02-16)
2
+ * @license Highcharts JS v4.1.1 (2015-02-17)
3
3
  * Exporting module
4
4
  *
5
5
  * (c) 2010-2014 Torstein Honsi
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.0 (2015-02-16)
2
+ * @license Highcharts JS v4.1.1 (2015-02-17)
3
3
  *
4
4
  * (c) 2011-2014 Torstein Honsi
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Highcharts JS v4.1.0 (2015-02-16)
2
+ * @license Highcharts JS v4.1.1 (2015-02-17)
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.0 (2015-02-16)
2
+ * @license Highcharts JS v4.1.1 (2015-02-17)
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.0 (2015-02-16)
2
+ * @license Highcharts JS v4.1.1 (2015-02-17)
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.0"
2
+ VERSION = "4.1.1"
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.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Per Christian B. Viken
@@ -77,6 +77,7 @@ files:
77
77
  - app/assets/javascripts/highcharts/highcharts-3d.js
78
78
  - app/assets/javascripts/highcharts/highcharts-more.js
79
79
  - app/assets/javascripts/highcharts/modules/annotations.js
80
+ - app/assets/javascripts/highcharts/modules/broken-axis.js
80
81
  - app/assets/javascripts/highcharts/modules/canvas-tools.js
81
82
  - app/assets/javascripts/highcharts/modules/data.js
82
83
  - app/assets/javascripts/highcharts/modules/drilldown.js