highcharts-rails 6.0.1 → 6.0.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +16 -0
- data/app/assets/javascripts/highcharts.js +188 -51
- data/app/assets/javascripts/highcharts/highcharts-3d.js +3 -4
- data/app/assets/javascripts/highcharts/highcharts-more.js +21 -5
- data/app/assets/javascripts/highcharts/modules/accessibility.js +4 -2
- data/app/assets/javascripts/highcharts/modules/annotations.js +2 -2
- data/app/assets/javascripts/highcharts/modules/boost-canvas.js +50 -195
- data/app/assets/javascripts/highcharts/modules/boost.js +202 -135
- data/app/assets/javascripts/highcharts/modules/broken-axis.js +1 -1
- data/app/assets/javascripts/highcharts/modules/bullet.js +1 -1
- data/app/assets/javascripts/highcharts/modules/data.js +88 -59
- data/app/assets/javascripts/highcharts/modules/drag-panes.js +1 -1
- data/app/assets/javascripts/highcharts/modules/drilldown.js +25 -2
- data/app/assets/javascripts/highcharts/modules/export-data.js +6 -2
- data/app/assets/javascripts/highcharts/modules/exporting.js +1 -1
- data/app/assets/javascripts/highcharts/modules/funnel.js +1 -1
- data/app/assets/javascripts/highcharts/modules/gantt.js +2 -2
- data/app/assets/javascripts/highcharts/modules/grid-axis.js +1 -1
- data/app/assets/javascripts/highcharts/modules/heatmap.js +826 -820
- data/app/assets/javascripts/highcharts/modules/histogram-bellcurve.js +1 -1
- data/app/assets/javascripts/highcharts/modules/item-series.js +1 -1
- data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +1 -1
- data/app/assets/javascripts/highcharts/modules/offline-exporting.js +2 -2
- data/app/assets/javascripts/highcharts/modules/oldie.js +16 -2
- data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +1 -1
- data/app/assets/javascripts/highcharts/modules/parallel-coordinates.js +1 -1
- data/app/assets/javascripts/highcharts/modules/pareto.js +1 -1
- data/app/assets/javascripts/highcharts/modules/sankey.js +39 -9
- data/app/assets/javascripts/highcharts/modules/series-label.js +8 -3
- data/app/assets/javascripts/highcharts/modules/solid-gauge.js +1 -1
- data/app/assets/javascripts/highcharts/modules/static-scale.js +6 -2
- data/app/assets/javascripts/highcharts/modules/stock.js +19 -47
- data/app/assets/javascripts/highcharts/modules/streamgraph.js +1 -1
- data/app/assets/javascripts/highcharts/modules/sunburst.js +40 -15
- data/app/assets/javascripts/highcharts/modules/tilemap.js +7 -6
- data/app/assets/javascripts/highcharts/modules/treemap.js +13 -3
- data/app/assets/javascripts/highcharts/modules/variable-pie.js +1 -1
- data/app/assets/javascripts/highcharts/modules/variwide.js +1 -1
- data/app/assets/javascripts/highcharts/modules/vector.js +1 -1
- data/app/assets/javascripts/highcharts/modules/windbarb.js +1 -1
- data/app/assets/javascripts/highcharts/modules/wordcloud.js +130 -37
- data/app/assets/javascripts/highcharts/modules/xrange.js +2 -2
- data/app/assets/javascripts/highcharts/themes/avocado.js +1 -1
- data/app/assets/javascripts/highcharts/themes/dark-blue.js +1 -1
- data/app/assets/javascripts/highcharts/themes/dark-green.js +1 -1
- data/app/assets/javascripts/highcharts/themes/dark-unica.js +1 -1
- data/app/assets/javascripts/highcharts/themes/gray.js +1 -1
- data/app/assets/javascripts/highcharts/themes/grid-light.js +1 -1
- data/app/assets/javascripts/highcharts/themes/grid.js +1 -1
- data/app/assets/javascripts/highcharts/themes/sand-signika.js +1 -1
- data/app/assets/javascripts/highcharts/themes/skies.js +1 -1
- data/app/assets/javascripts/highcharts/themes/sunset.js +1 -1
- data/lib/highcharts/version.rb +1 -1
- metadata +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.2 (2017-10-20)
|
3
3
|
* Tilemap module
|
4
4
|
*
|
5
5
|
* (c) 2010-2017 Highsoft AS
|
@@ -445,18 +445,19 @@
|
|
445
445
|
*/
|
446
446
|
|
447
447
|
/**
|
448
|
-
* The x
|
448
|
+
* The x value of the point. For datetime axes,
|
449
|
+
* the X value is the timestamp in milliseconds since 1970.
|
449
450
|
*
|
450
451
|
* @type {Number}
|
451
|
-
* @product highmaps
|
452
|
+
* @product highcharts highmaps
|
452
453
|
* @apioption series.heatmap.data.x
|
453
454
|
*/
|
454
455
|
|
455
456
|
/**
|
456
|
-
* The y
|
457
|
+
* The y value of the point.
|
457
458
|
*
|
458
459
|
* @type {Number}
|
459
|
-
* @product highmaps
|
460
|
+
* @product highcharts highmaps
|
460
461
|
* @apioption series.heatmap.data.y
|
461
462
|
*/
|
462
463
|
|
@@ -948,7 +949,7 @@
|
|
948
949
|
* @sample maps/demo/diamondmap
|
949
950
|
* Diamondmap tilemap
|
950
951
|
* @since 6.0.0
|
951
|
-
* @excluding joinBy, shadow, allAreas, mapData
|
952
|
+
* @excluding joinBy, shadow, allAreas, mapData, data
|
952
953
|
* @optionparent plotOptions.tilemap
|
953
954
|
*/
|
954
955
|
seriesType('tilemap', 'heatmap', {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.2 (2017-10-20)
|
3
3
|
*
|
4
4
|
* (c) 2014 Highsoft AS
|
5
5
|
* Authors: Jon Arild Nygard / Oystein Moseng
|
@@ -166,6 +166,9 @@
|
|
166
166
|
each = H.each,
|
167
167
|
getColor = mixinTreeSeries.getColor,
|
168
168
|
grep = H.grep,
|
169
|
+
isBoolean = function(x) {
|
170
|
+
return typeof x === 'boolean';
|
171
|
+
},
|
169
172
|
isNumber = H.isNumber,
|
170
173
|
isString = H.isString,
|
171
174
|
pick = H.pick,
|
@@ -352,7 +355,6 @@
|
|
352
355
|
* to be level one. Otherwise the level will be the same as the tree
|
353
356
|
* structure.
|
354
357
|
*
|
355
|
-
* @validvalue [true, false]
|
356
358
|
* @type {Boolean}
|
357
359
|
* @default true
|
358
360
|
* @since 4.1.0
|
@@ -709,6 +711,14 @@
|
|
709
711
|
setTreeValues: function(tree) {
|
710
712
|
var series = this,
|
711
713
|
options = series.options,
|
714
|
+
idRoot = series.rootNode,
|
715
|
+
mapIdToNode = series.nodeMap,
|
716
|
+
nodeRoot = mapIdToNode[idRoot],
|
717
|
+
levelIsConstant = (
|
718
|
+
isBoolean(options.levelIsConstant) ?
|
719
|
+
options.levelIsConstant :
|
720
|
+
true
|
721
|
+
),
|
712
722
|
childrenTotal = 0,
|
713
723
|
children = [],
|
714
724
|
val,
|
@@ -737,7 +747,7 @@
|
|
737
747
|
// Ignore this node if point is not visible
|
738
748
|
ignore: !(pick(point && point.visible, true) && (val > 0)),
|
739
749
|
isLeaf: tree.visible && !childrenTotal,
|
740
|
-
levelDynamic: tree.level - (
|
750
|
+
levelDynamic: tree.level - (levelIsConstant ? 0 : nodeRoot.level),
|
741
751
|
name: pick(point && point.name, ''),
|
742
752
|
sortIndex: pick(point && point.sortIndex, -val),
|
743
753
|
val: val
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.2 (2017-10-20)
|
3
3
|
*
|
4
4
|
* (c) 2016 Highsoft AS
|
5
5
|
* Authors: Jon Arild Nygard
|
@@ -66,6 +66,7 @@
|
|
66
66
|
*/
|
67
67
|
var each = H.each,
|
68
68
|
extend = H.extend,
|
69
|
+
isArray = H.isArray,
|
69
70
|
isNumber = H.isNumber,
|
70
71
|
isObject = H.isObject,
|
71
72
|
Series = H.Series;
|
@@ -124,15 +125,97 @@
|
|
124
125
|
/**
|
125
126
|
* archimedeanSpiral - Gives a set of cordinates for an Archimedian Spiral.
|
126
127
|
*
|
127
|
-
* @param
|
128
|
-
* @
|
128
|
+
* @param {number} attempt How far along the spiral we have traversed.
|
129
|
+
* @param {object} params Additional parameters.
|
130
|
+
* @param {object} params.field Size of field.
|
131
|
+
* @return {boolean|object} Resulting coordinates, x and y. False if the word
|
132
|
+
* should be dropped from the visualization.
|
129
133
|
*/
|
130
|
-
var archimedeanSpiral = function archimedeanSpiral(
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
134
|
+
var archimedeanSpiral = function archimedeanSpiral(attempt, params) {
|
135
|
+
var field = params.field,
|
136
|
+
result = false,
|
137
|
+
maxDelta = (field.width * field.width) + (field.height * field.height),
|
138
|
+
t = attempt * 0.2;
|
139
|
+
// Emergency brake. TODO make spiralling logic more foolproof.
|
140
|
+
if (attempt <= 10000) {
|
141
|
+
result = {
|
142
|
+
x: t * Math.cos(t),
|
143
|
+
y: t * Math.sin(t)
|
144
|
+
};
|
145
|
+
if (!(Math.min(Math.abs(result.x), Math.abs(result.y)) < maxDelta)) {
|
146
|
+
result = false;
|
147
|
+
}
|
148
|
+
}
|
149
|
+
return result;
|
150
|
+
};
|
151
|
+
|
152
|
+
/**
|
153
|
+
* squareSpiral - Gives a set of cordinates for an rectangular spiral.
|
154
|
+
*
|
155
|
+
* @param {number} attempt How far along the spiral we have traversed.
|
156
|
+
* @param {object} params Additional parameters.
|
157
|
+
* @return {boolean|object} Resulting coordinates, x and y. False if the word
|
158
|
+
* should be dropped from the visualization.
|
159
|
+
*/
|
160
|
+
var squareSpiral = function squareSpiral(attempt) {
|
161
|
+
var k = Math.ceil((Math.sqrt(attempt) - 1) / 2),
|
162
|
+
t = 2 * k + 1,
|
163
|
+
m = Math.pow(t, 2),
|
164
|
+
isBoolean = function(x) {
|
165
|
+
return typeof x === 'boolean';
|
166
|
+
},
|
167
|
+
result = false;
|
168
|
+
t -= 1;
|
169
|
+
if (attempt <= 10000) {
|
170
|
+
if (isBoolean(result) && attempt >= m - t) {
|
171
|
+
result = {
|
172
|
+
x: k - (m - attempt),
|
173
|
+
y: -k
|
174
|
+
};
|
175
|
+
}
|
176
|
+
m -= t;
|
177
|
+
if (isBoolean(result) && attempt >= m - t) {
|
178
|
+
result = {
|
179
|
+
x: -k,
|
180
|
+
y: -k + (m - attempt)
|
181
|
+
};
|
182
|
+
}
|
183
|
+
|
184
|
+
m -= t;
|
185
|
+
if (isBoolean(result)) {
|
186
|
+
if (attempt >= m - t) {
|
187
|
+
result = {
|
188
|
+
x: -k + (m - attempt),
|
189
|
+
y: k
|
190
|
+
};
|
191
|
+
} else {
|
192
|
+
result = {
|
193
|
+
x: k,
|
194
|
+
y: k - (m - attempt - t)
|
195
|
+
};
|
196
|
+
}
|
197
|
+
}
|
198
|
+
result.x *= 5;
|
199
|
+
result.y *= 5;
|
200
|
+
}
|
201
|
+
return result;
|
202
|
+
};
|
203
|
+
|
204
|
+
/**
|
205
|
+
* rectangularSpiral - Gives a set of cordinates for an rectangular spiral.
|
206
|
+
*
|
207
|
+
* @param {number} attempt How far along the spiral we have traversed.
|
208
|
+
* @param {object} params Additional parameters.
|
209
|
+
* @return {boolean|object} Resulting coordinates, x and y. False if the word
|
210
|
+
* should be dropped from the visualization.
|
211
|
+
*/
|
212
|
+
var rectangularSpiral = function rectangularSpiral(attempt, params) {
|
213
|
+
var result = squareSpiral(attempt, params),
|
214
|
+
field = params.field;
|
215
|
+
if (result) {
|
216
|
+
result.x *= field.ratio;
|
217
|
+
}
|
218
|
+
return result;
|
136
219
|
};
|
137
220
|
|
138
221
|
/**
|
@@ -177,7 +260,8 @@
|
|
177
260
|
var ratio = targetWidth / targetHeight;
|
178
261
|
return {
|
179
262
|
width: 256 * ratio,
|
180
|
-
height: 256
|
263
|
+
height: 256,
|
264
|
+
ratio: ratio
|
181
265
|
};
|
182
266
|
};
|
183
267
|
|
@@ -237,9 +321,7 @@
|
|
237
321
|
field = options.field,
|
238
322
|
clientRect = options.clientRect,
|
239
323
|
spiral = options.spiral,
|
240
|
-
|
241
|
-
spiralIsSmallish = true,
|
242
|
-
attempt = 0,
|
324
|
+
attempt = 1,
|
243
325
|
delta = {
|
244
326
|
x: 0,
|
245
327
|
y: 0
|
@@ -256,25 +338,19 @@
|
|
256
338
|
(
|
257
339
|
intersectsAnyWord(point, placed) ||
|
258
340
|
outsidePlayingField(element, field)
|
259
|
-
) &&
|
341
|
+
) && delta !== false
|
260
342
|
) {
|
261
|
-
delta = spiral(attempt
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
attempt++;
|
271
|
-
// Emergency brake. TODO make spiralling logic more foolproof.
|
272
|
-
if (attempt > 1000) {
|
273
|
-
spiralIsSmallish = false;
|
343
|
+
delta = spiral(attempt, {
|
344
|
+
field: field
|
345
|
+
});
|
346
|
+
if (isObject(delta)) {
|
347
|
+
// Update the DOMRect with new positions.
|
348
|
+
rect.left = clientRect.left + delta.x;
|
349
|
+
rect.right = rect.left + rect.width;
|
350
|
+
rect.top = clientRect.top + delta.y;
|
351
|
+
rect.bottom = rect.top + rect.height;
|
274
352
|
}
|
275
|
-
|
276
|
-
if (!spiralIsSmallish) {
|
277
|
-
delta = false;
|
353
|
+
attempt++;
|
278
354
|
}
|
279
355
|
return delta;
|
280
356
|
};
|
@@ -345,9 +421,9 @@
|
|
345
421
|
* for use in word cloud. Read more about it in our
|
346
422
|
* [documentation](https://www.highcharts.com/docs/chart-and-series-types/word-cloud-series#custom-placement-strategies)
|
347
423
|
*
|
348
|
-
* @validvalue: ["random"]
|
424
|
+
* @validvalue: ["center", "random"]
|
349
425
|
*/
|
350
|
-
placementStrategy: '
|
426
|
+
placementStrategy: 'center',
|
351
427
|
/**
|
352
428
|
* Rotation options for the words in the wordcloud.
|
353
429
|
* @sample highcharts/plotoptions/wordcloud-rotation
|
@@ -376,9 +452,9 @@
|
|
376
452
|
* for use in word cloud. Read more about it in our
|
377
453
|
* [documentation](https://www.highcharts.com/docs/chart-and-series-types/word-cloud-series#custom-spiralling-algorithm)
|
378
454
|
*
|
379
|
-
* @validvalue: ["archimedean"]
|
455
|
+
* @validvalue: ["archimedean", "rectangular", "square"]
|
380
456
|
*/
|
381
|
-
spiral: '
|
457
|
+
spiral: 'rectangular',
|
382
458
|
/**
|
383
459
|
* CSS styles for the words.
|
384
460
|
*
|
@@ -447,7 +523,6 @@
|
|
447
523
|
}),
|
448
524
|
maxWeight = Math.max.apply(null, weights),
|
449
525
|
field = getPlayingField(xAxis.len, yAxis.len),
|
450
|
-
maxDelta = (field.width * field.width) + (field.height * field.height),
|
451
526
|
data = series.points
|
452
527
|
.sort(function(a, b) {
|
453
528
|
return b.weight - a.weight; // Sort descending
|
@@ -483,7 +558,6 @@
|
|
483
558
|
clientRect: clientRect,
|
484
559
|
element: testElement,
|
485
560
|
field: field,
|
486
|
-
maxDelta: maxDelta,
|
487
561
|
placed: placed,
|
488
562
|
spiral: spiral
|
489
563
|
});
|
@@ -547,6 +621,15 @@
|
|
547
621
|
scaleY: scale
|
548
622
|
});
|
549
623
|
},
|
624
|
+
hasData: function() {
|
625
|
+
var series = this;
|
626
|
+
return (
|
627
|
+
isObject(series) &&
|
628
|
+
series.visible === true &&
|
629
|
+
isArray(series.points) &&
|
630
|
+
series.points.length > 0
|
631
|
+
);
|
632
|
+
},
|
550
633
|
/**
|
551
634
|
* Strategies used for deciding rotation and initial position of a word.
|
552
635
|
* To implement a custom strategy, have a look at the function
|
@@ -561,6 +644,14 @@
|
|
561
644
|
y: getRandomPosition(field.height) - (field.height / 2),
|
562
645
|
rotation: getRotation(r.orientations, r.from, r.to)
|
563
646
|
};
|
647
|
+
},
|
648
|
+
center: function centerPlacement(point, options) {
|
649
|
+
var r = options.rotation;
|
650
|
+
return {
|
651
|
+
x: 0,
|
652
|
+
y: 0,
|
653
|
+
rotation: getRotation(r.orientations, r.from, r.to)
|
654
|
+
};
|
564
655
|
}
|
565
656
|
},
|
566
657
|
pointArrayMap: ['weight'],
|
@@ -571,7 +662,9 @@
|
|
571
662
|
* example.
|
572
663
|
*/
|
573
664
|
spirals: {
|
574
|
-
'archimedean': archimedeanSpiral
|
665
|
+
'archimedean': archimedeanSpiral,
|
666
|
+
'rectangular': rectangularSpiral,
|
667
|
+
'square': squareSpiral
|
575
668
|
},
|
576
669
|
getPlotBox: function() {
|
577
670
|
var series = this,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v6.0.
|
2
|
+
* @license Highcharts JS v6.0.2 (2017-10-20)
|
3
3
|
* X-range series
|
4
4
|
*
|
5
5
|
* (c) 2010-2017 Torstein Honsi, Lars A. V. Cabrera
|
@@ -53,7 +53,7 @@
|
|
53
53
|
* @excluding boostThreshold,crisp,cropThreshold,depth,edgeColor,edgeWidth,
|
54
54
|
* findNearestPointBy,getExtremesFromAll,grouping,groupPadding,
|
55
55
|
* negativeColor,pointInterval,pointIntervalUnit,pointPlacement,
|
56
|
-
* pointRange,pointStart,softThreshold,stacking,threshold
|
56
|
+
* pointRange,pointStart,softThreshold,stacking,threshold,data
|
57
57
|
* @product highcharts
|
58
58
|
* @sample {highcharts} highcharts/demo/x-range/
|
59
59
|
* X-range
|