highcharts-rails 5.0.5 → 5.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +28 -0
- data/Rakefile +1 -2
- data/app/assets/javascripts/highcharts.js +243 -164
- data/app/assets/javascripts/highcharts/highcharts-3d.js +16 -4
- data/app/assets/javascripts/highcharts/highcharts-more.js +8 -5
- data/app/assets/javascripts/highcharts/modules/accessibility.js +1 -1
- data/app/assets/javascripts/highcharts/modules/annotations.js +1 -1
- data/app/assets/javascripts/highcharts/modules/boost.js +1 -1
- data/app/assets/javascripts/highcharts/modules/broken-axis.js +5 -1
- data/app/assets/javascripts/highcharts/modules/data.js +1 -1
- data/app/assets/javascripts/highcharts/modules/drilldown.js +1 -1
- data/app/assets/javascripts/highcharts/modules/exporting.js +19 -13
- data/app/assets/javascripts/highcharts/modules/funnel.js +1 -1
- data/app/assets/javascripts/highcharts/modules/grid-axis.js +1 -1
- data/app/assets/javascripts/highcharts/modules/heatmap.js +12 -2
- data/app/assets/javascripts/highcharts/modules/no-data-to-display.js +1 -1
- data/app/assets/javascripts/highcharts/modules/offline-exporting.js +9 -2
- data/app/assets/javascripts/highcharts/modules/overlapping-datalabels.js +1 -1
- data/app/assets/javascripts/highcharts/modules/series-label.js +1 -1
- data/app/assets/javascripts/highcharts/modules/solid-gauge.js +1 -1
- data/app/assets/javascripts/highcharts/modules/treemap.js +1 -1
- data/app/assets/javascripts/highcharts/modules/xrange-series.js +1 -1
- data/lib/highcharts/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5cdeffa8d95f333a687263dfcf02665e9de7eb6
|
4
|
+
data.tar.gz: 4e1dc3bed55b4ca55e4397f58d789e1259bf3dee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdbdf6c8ebf4f3f5c9869d2092ed2106b6134a19927b5c603236a171d559d1affe3497b047af6f3671a628636e32d3f00e2991eb8d9b03dcdbc885c0871cbae7
|
7
|
+
data.tar.gz: eb1275d9eba5ec4e50416f92575aa4ae092c1ab055bfcc06fea46c4c38cc453fe2703a3efb6f531489477981df1822eb8cacd44da6f2bfb00972d65e1d9a024c
|
data/CHANGELOG.markdown
CHANGED
@@ -1,3 +1,31 @@
|
|
1
|
+
# 5.0.6 / 2017-01-25
|
2
|
+
|
3
|
+
* Updated Highcharts to 5.0.6 (2016-12-07)
|
4
|
+
* Added a common hook, Highcharts.error, for user defined error handling.
|
5
|
+
* Bug fixes
|
6
|
+
* Fixed #4175, missed ticks when xAxis.reversed was used
|
7
|
+
* Fixed #4507, 3D scatter points were not rendered if z-value was not set.
|
8
|
+
* Fixed #5950, broken axis module caused errors when rendering funnel series.
|
9
|
+
* Fixed #6003, regression with pie chart selection border width.
|
10
|
+
* Fixed #6016, zones weren't applied for point elements in styled mode.
|
11
|
+
* Fixed #6018, 3D column not rendered in styled mode.
|
12
|
+
* Fixed #6020, stacked waterfall didn't render any points.
|
13
|
+
* Fixed #6021, chart.alignTicks on logarithmic axis should not be applied.
|
14
|
+
* Fixed #6045, multiple charts exporting demos failed with other width/height settings.
|
15
|
+
* Fixed #6054, regression which disabled selecting bubble points.
|
16
|
+
* Fixed #6055, halo sometimes animated to another point when hiding.
|
17
|
+
* Fixed #6062, minPointLength was applied for null points in a waterfall series.
|
18
|
+
* Fixed #6065, text outline was off with multiline text.
|
19
|
+
* Fixed #6067, bubble halo stayed forever per series.
|
20
|
+
* Fixed #6068, JS error on destroying chart from its own callback.
|
21
|
+
* Fixed #6077, legend title disappeared after legend update.
|
22
|
+
* Fixed #6080, stray data labels for empty points in column and bar series.
|
23
|
+
* Fixed #6094, a regression causing allowPointSelect not to work with 3D pies.
|
24
|
+
* Fixed JS errors on path animations in pies. Related to #6051.
|
25
|
+
* Fixed border issue on hovered points in map and heatmap. Related to #6064.
|
26
|
+
* Fixed issue with split tooltip anchors and panes.
|
27
|
+
|
28
|
+
|
1
29
|
# 5.0.5 / 2017-01-25
|
2
30
|
|
3
31
|
* Updated Highcharts to 5.0.5 (2016-11-29)
|
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v5.0.
|
2
|
+
* @license Highcharts JS v5.0.6 (2016-12-07)
|
3
3
|
*
|
4
4
|
* (c) 2009-2016 Torstein Honsi
|
5
5
|
*
|
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
var Highcharts = win.Highcharts ? win.Highcharts.error(16, true) : {
|
38
38
|
product: 'Highcharts',
|
39
|
-
version: '5.0.
|
39
|
+
version: '5.0.6',
|
40
40
|
deg2rad: Math.PI * 2 / 360,
|
41
41
|
doc: doc,
|
42
42
|
hasBidiBug: hasBidiBug,
|
@@ -87,14 +87,16 @@
|
|
87
87
|
*
|
88
88
|
* @function #error
|
89
89
|
* @memberOf Highcharts
|
90
|
-
* @param {Number} code - The error code. See [errors.xml]{@link
|
90
|
+
* @param {Number|String} code - The error code. See [errors.xml]{@link
|
91
91
|
* https://github.com/highcharts/highcharts/blob/master/errors/errors.xml}
|
92
|
-
* for available codes.
|
92
|
+
* for available codes. If it is a string, the error message is printed
|
93
|
+
* directly in the console.
|
93
94
|
* @param {Boolean} [stop=false] - Whether to throw an error or just log a
|
94
95
|
* warning in the console.
|
95
96
|
*/
|
96
97
|
H.error = function(code, stop) {
|
97
|
-
var msg =
|
98
|
+
var msg = H.isNumber(code) ?
|
99
|
+
'Highcharts error #' + code + ': www.highcharts.com/errors/' + code :
|
98
100
|
code;
|
99
101
|
if (stop) {
|
100
102
|
throw new Error(msg);
|
@@ -431,11 +433,11 @@
|
|
431
433
|
}
|
432
434
|
}
|
433
435
|
|
434
|
-
if (start.length) {
|
436
|
+
if (start.length && H.isNumber(shift)) {
|
435
437
|
|
436
438
|
// The common target length for the start and end array, where both
|
437
439
|
// arrays are padded in opposite ends
|
438
|
-
fullLength = end.length +
|
440
|
+
fullLength = end.length + shift * positionFactor * numParams;
|
439
441
|
|
440
442
|
if (!reverse) {
|
441
443
|
prepend(end, start);
|
@@ -1497,6 +1499,22 @@
|
|
1497
1499
|
return [].filter.call(arr, callback);
|
1498
1500
|
};
|
1499
1501
|
|
1502
|
+
/**
|
1503
|
+
* Return the value of the first element in the array that satisfies the
|
1504
|
+
* provided testing function.
|
1505
|
+
*
|
1506
|
+
* @function #find
|
1507
|
+
* @memberOf Highcharts
|
1508
|
+
* @param {Array} arr - The array to test.
|
1509
|
+
* @param {Function} callback - The callback function. The function receives the
|
1510
|
+
* item as the first argument. Return `true` if this item satisfies the
|
1511
|
+
* condition.
|
1512
|
+
* @returns {Mixed} - The value of the element.
|
1513
|
+
*/
|
1514
|
+
H.find = function(arr, callback) {
|
1515
|
+
return [].find.call(arr, callback);
|
1516
|
+
};
|
1517
|
+
|
1500
1518
|
/**
|
1501
1519
|
* Map an array by a callback.
|
1502
1520
|
*
|
@@ -2051,6 +2069,19 @@
|
|
2051
2069
|
};
|
2052
2070
|
}
|
2053
2071
|
|
2072
|
+
if (!Array.prototype.find) {
|
2073
|
+
H.find = function(arr, fn) {
|
2074
|
+
var i,
|
2075
|
+
length = arr.length;
|
2076
|
+
|
2077
|
+
for (i = 0; i < length; i++) {
|
2078
|
+
if (fn(arr[i], i)) {
|
2079
|
+
return arr[i];
|
2080
|
+
}
|
2081
|
+
}
|
2082
|
+
};
|
2083
|
+
}
|
2084
|
+
|
2054
2085
|
//--- End compatibility section ---
|
2055
2086
|
|
2056
2087
|
}(Highcharts));
|
@@ -2338,8 +2369,10 @@
|
|
2338
2369
|
* @returns {SVGElement} Returns the SVGElement for chaining.
|
2339
2370
|
*/
|
2340
2371
|
animate: function(params, options, complete) {
|
2341
|
-
var animOptions =
|
2342
|
-
|
2372
|
+
var animOptions = H.animObject(
|
2373
|
+
pick(options, this.renderer.globalAnimation, true)
|
2374
|
+
);
|
2375
|
+
if (animOptions.duration !== 0) {
|
2343
2376
|
if (complete) { // allows using a callback with the global animation without overwriting it
|
2344
2377
|
animOptions.complete = complete;
|
2345
2378
|
}
|
@@ -2534,7 +2567,8 @@
|
|
2534
2567
|
hasContrast = textOutline.indexOf('contrast') !== -1,
|
2535
2568
|
styles = {},
|
2536
2569
|
color,
|
2537
|
-
strokeWidth
|
2570
|
+
strokeWidth,
|
2571
|
+
firstRealChild;
|
2538
2572
|
|
2539
2573
|
// When the text shadow is set to contrast, use dark stroke for light
|
2540
2574
|
// text and vice versa.
|
@@ -2579,6 +2613,7 @@
|
|
2579
2613
|
});
|
2580
2614
|
|
2581
2615
|
// For each of the tspans, create a stroked copy behind it.
|
2616
|
+
firstRealChild = elem.firstChild;
|
2582
2617
|
each(tspans, function(tspan, y) {
|
2583
2618
|
var clone;
|
2584
2619
|
|
@@ -2601,7 +2636,7 @@
|
|
2601
2636
|
'stroke-width': strokeWidth,
|
2602
2637
|
'stroke-linejoin': 'round'
|
2603
2638
|
});
|
2604
|
-
elem.insertBefore(clone,
|
2639
|
+
elem.insertBefore(clone, firstRealChild);
|
2605
2640
|
});
|
2606
2641
|
}
|
2607
2642
|
},
|
@@ -3961,7 +3996,7 @@
|
|
3961
3996
|
|
3962
3997
|
// Add description
|
3963
3998
|
desc = this.createElement('desc').add();
|
3964
|
-
desc.element.appendChild(doc.createTextNode('Created with Highcharts 5.0.
|
3999
|
+
desc.element.appendChild(doc.createTextNode('Created with Highcharts 5.0.6'));
|
3965
4000
|
|
3966
4001
|
|
3967
4002
|
renderer.defs = this.createElement('defs').add();
|
@@ -7222,7 +7257,7 @@
|
|
7222
7257
|
useUTC: true,
|
7223
7258
|
//timezoneOffset: 0,
|
7224
7259
|
|
7225
|
-
VMLRadialGradientURL: 'http://code.highcharts.com/5.0.
|
7260
|
+
VMLRadialGradientURL: 'http://code.highcharts.com/5.0.6/gfx/vml-radial-gradient.png'
|
7226
7261
|
|
7227
7262
|
},
|
7228
7263
|
chart: {
|
@@ -8291,7 +8326,6 @@
|
|
8291
8326
|
deg2rad = H.deg2rad,
|
8292
8327
|
destroyObjectProperties = H.destroyObjectProperties,
|
8293
8328
|
each = H.each,
|
8294
|
-
error = H.error,
|
8295
8329
|
extend = H.extend,
|
8296
8330
|
fireEvent = H.fireEvent,
|
8297
8331
|
format = H.format,
|
@@ -8896,8 +8930,8 @@
|
|
8896
8930
|
return this.translate(value, false, !this.horiz, null, true) + (paneCoordinates ? 0 : this.pos);
|
8897
8931
|
},
|
8898
8932
|
|
8899
|
-
|
8900
|
-
* Utility method to translate a pixel position in to an axis value
|
8933
|
+
/**
|
8934
|
+
* Utility method to translate a pixel position in to an axis value.
|
8901
8935
|
* @param {Number} pixel The pixel value coordinate
|
8902
8936
|
* @param {Boolean} paneCoordiantes Whether the input pixel is relative to the chart or just the
|
8903
8937
|
* axis/pane itself.
|
@@ -9351,7 +9385,7 @@
|
|
9351
9385
|
axis.min = pick(linkedParentExtremes.min, linkedParentExtremes.dataMin);
|
9352
9386
|
axis.max = pick(linkedParentExtremes.max, linkedParentExtremes.dataMax);
|
9353
9387
|
if (options.type !== axis.linkedParent.options.type) {
|
9354
|
-
error(11, 1); // Can't link axes of different type
|
9388
|
+
H.error(11, 1); // Can't link axes of different type
|
9355
9389
|
}
|
9356
9390
|
|
9357
9391
|
// Initial min and max from the extreme data values
|
@@ -9375,7 +9409,7 @@
|
|
9375
9409
|
|
9376
9410
|
if (isLog) {
|
9377
9411
|
if (!secondPass && Math.min(axis.min, pick(axis.dataMin, axis.min)) <= 0) { // #978
|
9378
|
-
error(10, 1); // Can't plot negative values on log axis
|
9412
|
+
H.error(10, 1); // Can't plot negative values on log axis
|
9379
9413
|
}
|
9380
9414
|
// The correctFloat cures #934, float errors on full tens. But it
|
9381
9415
|
// was too aggressive for #4360 because of conversion back to lin,
|
@@ -9633,7 +9667,15 @@
|
|
9633
9667
|
hasOther,
|
9634
9668
|
options = this.options;
|
9635
9669
|
|
9636
|
-
if (
|
9670
|
+
if (
|
9671
|
+
// Only if alignTicks is true
|
9672
|
+
this.chart.options.chart.alignTicks !== false &&
|
9673
|
+
options.alignTicks !== false &&
|
9674
|
+
|
9675
|
+
// Don't try to align ticks on a log axis, they are not evenly
|
9676
|
+
// spaced (#6021)
|
9677
|
+
!this.isLog
|
9678
|
+
) {
|
9637
9679
|
each(this.chart[this.coll], function(axis) {
|
9638
9680
|
var otherOptions = axis.options,
|
9639
9681
|
horiz = axis.horiz,
|
@@ -10205,6 +10247,55 @@
|
|
10205
10247
|
return this.hasVisibleSeries || (defined(this.min) && defined(this.max) && !!this.tickPositions);
|
10206
10248
|
},
|
10207
10249
|
|
10250
|
+
/**
|
10251
|
+
* Adds the title defined in axis.options.title.
|
10252
|
+
* @param {Boolean} display - whether or not to display the title
|
10253
|
+
*/
|
10254
|
+
addTitle: function(display) {
|
10255
|
+
var axis = this,
|
10256
|
+
renderer = axis.chart.renderer,
|
10257
|
+
horiz = axis.horiz,
|
10258
|
+
opposite = axis.opposite,
|
10259
|
+
options = axis.options,
|
10260
|
+
axisTitleOptions = options.title,
|
10261
|
+
textAlign;
|
10262
|
+
|
10263
|
+
if (!axis.axisTitle) {
|
10264
|
+
textAlign = axisTitleOptions.textAlign;
|
10265
|
+
if (!textAlign) {
|
10266
|
+
textAlign = (horiz ? {
|
10267
|
+
low: 'left',
|
10268
|
+
middle: 'center',
|
10269
|
+
high: 'right'
|
10270
|
+
} : {
|
10271
|
+
low: opposite ? 'right' : 'left',
|
10272
|
+
middle: 'center',
|
10273
|
+
high: opposite ? 'left' : 'right'
|
10274
|
+
})[axisTitleOptions.align];
|
10275
|
+
}
|
10276
|
+
axis.axisTitle = renderer.text(
|
10277
|
+
axisTitleOptions.text,
|
10278
|
+
0,
|
10279
|
+
0,
|
10280
|
+
axisTitleOptions.useHTML
|
10281
|
+
)
|
10282
|
+
.attr({
|
10283
|
+
zIndex: 7,
|
10284
|
+
rotation: axisTitleOptions.rotation || 0,
|
10285
|
+
align: textAlign
|
10286
|
+
})
|
10287
|
+
.addClass('highcharts-axis-title')
|
10288
|
+
|
10289
|
+
.css(axisTitleOptions.style)
|
10290
|
+
|
10291
|
+
.add(axis.axisGroup);
|
10292
|
+
axis.axisTitle.isNew = true;
|
10293
|
+
}
|
10294
|
+
|
10295
|
+
// hide or show the title depending on whether showEmpty is set
|
10296
|
+
axis.axisTitle[display ? 'show' : 'hide'](true);
|
10297
|
+
},
|
10298
|
+
|
10208
10299
|
/**
|
10209
10300
|
* Render the tick labels to a preliminary position to get their sizes
|
10210
10301
|
*/
|
@@ -10227,14 +10318,12 @@
|
|
10227
10318
|
labelOptions = options.labels,
|
10228
10319
|
labelOffset = 0, // reset
|
10229
10320
|
labelOffsetPadded,
|
10230
|
-
opposite = axis.opposite,
|
10231
10321
|
axisOffset = chart.axisOffset,
|
10232
10322
|
clipOffset = chart.clipOffset,
|
10233
10323
|
clip,
|
10234
10324
|
directionFactor = [-1, 1, 1, -1][side],
|
10235
10325
|
n,
|
10236
10326
|
className = options.className,
|
10237
|
-
textAlign,
|
10238
10327
|
axisParent = axis.axisParent, // Used in color axis
|
10239
10328
|
lineHeightCorrection,
|
10240
10329
|
tickSize = this.tickSize('tick');
|
@@ -10311,46 +10400,13 @@
|
|
10311
10400
|
}
|
10312
10401
|
|
10313
10402
|
if (axisTitleOptions && axisTitleOptions.text && axisTitleOptions.enabled !== false) {
|
10314
|
-
|
10315
|
-
textAlign = axisTitleOptions.textAlign;
|
10316
|
-
if (!textAlign) {
|
10317
|
-
textAlign = (horiz ? {
|
10318
|
-
low: 'left',
|
10319
|
-
middle: 'center',
|
10320
|
-
high: 'right'
|
10321
|
-
} : {
|
10322
|
-
low: opposite ? 'right' : 'left',
|
10323
|
-
middle: 'center',
|
10324
|
-
high: opposite ? 'left' : 'right'
|
10325
|
-
})[axisTitleOptions.align];
|
10326
|
-
}
|
10327
|
-
axis.axisTitle = renderer.text(
|
10328
|
-
axisTitleOptions.text,
|
10329
|
-
0,
|
10330
|
-
0,
|
10331
|
-
axisTitleOptions.useHTML
|
10332
|
-
)
|
10333
|
-
.attr({
|
10334
|
-
zIndex: 7,
|
10335
|
-
rotation: axisTitleOptions.rotation || 0,
|
10336
|
-
align: textAlign
|
10337
|
-
})
|
10338
|
-
.addClass('highcharts-axis-title')
|
10339
|
-
|
10340
|
-
.css(axisTitleOptions.style)
|
10341
|
-
|
10342
|
-
.add(axis.axisGroup);
|
10343
|
-
axis.axisTitle.isNew = true;
|
10344
|
-
}
|
10403
|
+
axis.addTitle(showAxis);
|
10345
10404
|
|
10346
10405
|
if (showAxis) {
|
10347
10406
|
titleOffset = axis.axisTitle.getBBox()[horiz ? 'height' : 'width'];
|
10348
10407
|
titleOffsetOption = axisTitleOptions.offset;
|
10349
10408
|
titleMargin = defined(titleOffsetOption) ? 0 : pick(axisTitleOptions.margin, horiz ? 5 : 10);
|
10350
10409
|
}
|
10351
|
-
|
10352
|
-
// hide or show the title depending on whether showEmpty is set
|
10353
|
-
axis.axisTitle[showAxis ? 'show' : 'hide'](true);
|
10354
10410
|
}
|
10355
10411
|
|
10356
10412
|
// Render the axis line
|
@@ -11830,7 +11886,8 @@
|
|
11830
11886
|
// Distribute and put in place
|
11831
11887
|
H.distribute(boxes, chart.plotHeight + headerHeight);
|
11832
11888
|
each(boxes, function(box) {
|
11833
|
-
var point = box.point
|
11889
|
+
var point = box.point,
|
11890
|
+
series = point.series;
|
11834
11891
|
|
11835
11892
|
// Put the label in place
|
11836
11893
|
box.tt.attr({
|
@@ -11839,9 +11896,10 @@
|
|
11839
11896
|
box.x :
|
11840
11897
|
point.plotX + chart.plotLeft + pick(options.distance, 16)),
|
11841
11898
|
y: box.pos + chart.plotTop,
|
11842
|
-
anchorX: point.
|
11899
|
+
anchorX: point.isHeader ?
|
11900
|
+
point.plotX + chart.plotLeft : point.plotX + series.xAxis.pos,
|
11843
11901
|
anchorY: point.isHeader ?
|
11844
|
-
box.pos + chart.plotTop - 15 : point.plotY +
|
11902
|
+
box.pos + chart.plotTop - 15 : point.plotY + series.yAxis.pos
|
11845
11903
|
});
|
11846
11904
|
});
|
11847
11905
|
},
|
@@ -13343,27 +13401,19 @@
|
|
13343
13401
|
* Destroys the legend.
|
13344
13402
|
*/
|
13345
13403
|
destroy: function() {
|
13346
|
-
|
13347
|
-
|
13348
|
-
|
13349
|
-
|
13350
|
-
if (box) {
|
13351
|
-
legend.box = box.destroy();
|
13404
|
+
function destroyItems(key) {
|
13405
|
+
if (this[key]) {
|
13406
|
+
this[key] = this[key].destroy();
|
13407
|
+
}
|
13352
13408
|
}
|
13353
13409
|
|
13354
13410
|
// Destroy items
|
13355
13411
|
each(this.getAllItems(), function(item) {
|
13356
|
-
each(['legendItem', 'legendGroup'],
|
13357
|
-
if (item[key]) {
|
13358
|
-
item[key] = item[key].destroy();
|
13359
|
-
}
|
13360
|
-
});
|
13412
|
+
each(['legendItem', 'legendGroup'], destroyItems, item);
|
13361
13413
|
});
|
13362
13414
|
|
13363
|
-
|
13364
|
-
|
13365
|
-
}
|
13366
|
-
legend.display = null; // Reset in .render on update.
|
13415
|
+
each(['box', 'title', 'group'], destroyItems, this);
|
13416
|
+
this.display = null; // Reset in .render on update.
|
13367
13417
|
},
|
13368
13418
|
|
13369
13419
|
/**
|
@@ -14107,8 +14157,8 @@
|
|
14107
14157
|
css = H.css,
|
14108
14158
|
defined = H.defined,
|
14109
14159
|
each = H.each,
|
14110
|
-
error = H.error,
|
14111
14160
|
extend = H.extend,
|
14161
|
+
find = H.find,
|
14112
14162
|
fireEvent = H.fireEvent,
|
14113
14163
|
getStyle = H.getStyle,
|
14114
14164
|
grep = H.grep,
|
@@ -14267,7 +14317,7 @@
|
|
14267
14317
|
|
14268
14318
|
// No such series type
|
14269
14319
|
if (!Constr) {
|
14270
|
-
error(17, true);
|
14320
|
+
H.error(17, true);
|
14271
14321
|
}
|
14272
14322
|
|
14273
14323
|
series = new Constr();
|
@@ -14452,38 +14502,28 @@
|
|
14452
14502
|
* @param id {String} The id as given in the configuration options
|
14453
14503
|
*/
|
14454
14504
|
get: function(id) {
|
14455
|
-
var chart = this,
|
14456
|
-
axes = chart.axes,
|
14457
|
-
series = chart.series;
|
14458
14505
|
|
14459
|
-
var
|
14460
|
-
|
14461
|
-
|
14506
|
+
var ret,
|
14507
|
+
series = this.series,
|
14508
|
+
i;
|
14462
14509
|
|
14463
|
-
|
14464
|
-
|
14465
|
-
if (axes[i].options.id === id) {
|
14466
|
-
return axes[i];
|
14467
|
-
}
|
14510
|
+
function itemById(item) {
|
14511
|
+
return item.id === id || item.options.id === id;
|
14468
14512
|
}
|
14469
14513
|
|
14470
|
-
|
14471
|
-
|
14472
|
-
|
14473
|
-
return series[i];
|
14474
|
-
}
|
14475
|
-
}
|
14514
|
+
ret =
|
14515
|
+
// Search axes
|
14516
|
+
find(this.axes, itemById) ||
|
14476
14517
|
|
14477
|
-
|
14478
|
-
|
14479
|
-
|
14480
|
-
|
14481
|
-
|
14482
|
-
|
14483
|
-
}
|
14484
|
-
}
|
14518
|
+
// Search series
|
14519
|
+
find(this.series, itemById);
|
14520
|
+
|
14521
|
+
// Search points
|
14522
|
+
for (i = 0; !ret && i < series.length; i++) {
|
14523
|
+
ret = find(series[i].points || [], itemById);
|
14485
14524
|
}
|
14486
|
-
|
14525
|
+
|
14526
|
+
return ret;
|
14487
14527
|
},
|
14488
14528
|
|
14489
14529
|
/**
|
@@ -14765,7 +14805,7 @@
|
|
14765
14805
|
|
14766
14806
|
// Display an error if the renderTo is wrong
|
14767
14807
|
if (!renderTo) {
|
14768
|
-
error(13, true);
|
14808
|
+
H.error(13, true);
|
14769
14809
|
}
|
14770
14810
|
|
14771
14811
|
// If the container already holds a chart, destroy it. The check for hasRendered is there
|
@@ -15653,8 +15693,8 @@
|
|
15653
15693
|
|
15654
15694
|
fireEvent(this, 'load');
|
15655
15695
|
|
15656
|
-
// Set up auto resize
|
15657
|
-
if (this.options.chart.reflow !== false) {
|
15696
|
+
// Set up auto resize, check for not destroyed (#6068)
|
15697
|
+
if (defined(this.index) && this.options.chart.reflow !== false) {
|
15658
15698
|
this.initReflow();
|
15659
15699
|
}
|
15660
15700
|
|
@@ -15853,7 +15893,8 @@
|
|
15853
15893
|
(this.negative ? ' highcharts-negative' : '') +
|
15854
15894
|
(this.isNull ? ' highcharts-null-point' : '') +
|
15855
15895
|
(this.colorIndex !== undefined ? ' highcharts-color-' + this.colorIndex : '') +
|
15856
|
-
(this.options.className ? ' ' + this.options.className : '')
|
15896
|
+
(this.options.className ? ' ' + this.options.className : '') +
|
15897
|
+
(this.zone && this.zone.className ? ' ' + this.zone.className : '');
|
15857
15898
|
},
|
15858
15899
|
|
15859
15900
|
/**
|
@@ -16030,7 +16071,6 @@
|
|
16030
16071
|
defined = H.defined,
|
16031
16072
|
each = H.each,
|
16032
16073
|
erase = H.erase,
|
16033
|
-
error = H.error,
|
16034
16074
|
extend = H.extend,
|
16035
16075
|
fireEvent = H.fireEvent,
|
16036
16076
|
grep = H.grep,
|
@@ -16043,7 +16083,6 @@
|
|
16043
16083
|
Point = H.Point, // @todo add as a requirement
|
16044
16084
|
removeEvent = H.removeEvent,
|
16045
16085
|
splat = H.splat,
|
16046
|
-
stableSort = H.stableSort,
|
16047
16086
|
SVGElement = H.SVGElement,
|
16048
16087
|
syncTimeout = H.syncTimeout,
|
16049
16088
|
win = H.win;
|
@@ -16197,9 +16236,7 @@
|
|
16197
16236
|
events,
|
16198
16237
|
chartSeries = chart.series,
|
16199
16238
|
lastSeries,
|
16200
|
-
|
16201
|
-
return pick(a.options.index, a._i) - pick(b.options.index, b._i);
|
16202
|
-
};
|
16239
|
+
i;
|
16203
16240
|
|
16204
16241
|
series.chart = chart;
|
16205
16242
|
series.options = options = series.setOptions(options); // merge with plotOptions
|
@@ -16249,19 +16286,49 @@
|
|
16249
16286
|
lastSeries = chartSeries[chartSeries.length - 1];
|
16250
16287
|
}
|
16251
16288
|
series._i = pick(lastSeries && lastSeries._i, -1) + 1;
|
16252
|
-
chartSeries.push(series);
|
16253
16289
|
|
16254
|
-
//
|
16255
|
-
|
16256
|
-
|
16257
|
-
|
16290
|
+
// Insert the series and update the `index` property of all series
|
16291
|
+
// above this. Unless the `index` option is set, the new series is
|
16292
|
+
// inserted last. #248, #1123, #2456
|
16293
|
+
for (i = this.insert(chartSeries); i < chartSeries.length; i++) {
|
16294
|
+
chartSeries[i].index = i;
|
16295
|
+
chartSeries[i].name = chartSeries[i].name ||
|
16296
|
+
'Series ' + (chartSeries[i].index + 1);
|
16258
16297
|
}
|
16298
|
+
},
|
16259
16299
|
|
16260
|
-
|
16261
|
-
|
16262
|
-
|
16263
|
-
|
16300
|
+
/**
|
16301
|
+
* Insert the series in a collection with other series, either the chart
|
16302
|
+
* series or yAxis series, in the correct order according to the index
|
16303
|
+
* option.
|
16304
|
+
* @param {Array} collection A collection of series.
|
16305
|
+
* @returns {Number} The index of the series in the collection.
|
16306
|
+
*/
|
16307
|
+
insert: function(collection) {
|
16308
|
+
var indexOption = this.options.index,
|
16309
|
+
i;
|
16264
16310
|
|
16311
|
+
// Insert by index option
|
16312
|
+
if (isNumber(indexOption)) {
|
16313
|
+
i = collection.length;
|
16314
|
+
while (i--) {
|
16315
|
+
// Loop down until the interted element has higher index
|
16316
|
+
if (indexOption >=
|
16317
|
+
pick(collection[i].options.index, collection[i]._i)) {
|
16318
|
+
collection.splice(i + 1, 0, this);
|
16319
|
+
break;
|
16320
|
+
}
|
16321
|
+
}
|
16322
|
+
if (i === -1) {
|
16323
|
+
collection.unshift(this);
|
16324
|
+
}
|
16325
|
+
i = i + 1;
|
16326
|
+
|
16327
|
+
// Or just push it to the end
|
16328
|
+
} else {
|
16329
|
+
collection.push(this);
|
16330
|
+
}
|
16331
|
+
return pick(i, collection.length - 1);
|
16265
16332
|
},
|
16266
16333
|
|
16267
16334
|
/**
|
@@ -16290,7 +16357,7 @@
|
|
16290
16357
|
(seriesOptions[AXIS] === undefined && axisOptions.index === 0)) {
|
16291
16358
|
|
16292
16359
|
// register this series in the axis.series lookup
|
16293
|
-
|
16360
|
+
series.insert(axis.series);
|
16294
16361
|
|
16295
16362
|
// set this series.xAxis or series.yAxis reference
|
16296
16363
|
series[AXIS] = axis;
|
@@ -16302,7 +16369,7 @@
|
|
16302
16369
|
|
16303
16370
|
// The series needs an X and an Y axis
|
16304
16371
|
if (!series[AXIS] && series.optionalAxis !== AXIS) {
|
16305
|
-
error(18, true);
|
16372
|
+
H.error(18, true);
|
16306
16373
|
}
|
16307
16374
|
|
16308
16375
|
});
|
@@ -16566,7 +16633,7 @@
|
|
16566
16633
|
}
|
16567
16634
|
}
|
16568
16635
|
} else {
|
16569
|
-
error(12); // Highcharts expects configs to be numbers or arrays in turbo mode
|
16636
|
+
H.error(12); // Highcharts expects configs to be numbers or arrays in turbo mode
|
16570
16637
|
}
|
16571
16638
|
} else {
|
16572
16639
|
for (i = 0; i < dataLength; i++) {
|
@@ -16582,7 +16649,7 @@
|
|
16582
16649
|
|
16583
16650
|
// Forgetting to cast strings to numbers is a common caveat when handling CSV or JSON
|
16584
16651
|
if (isString(yData[0])) {
|
16585
|
-
error(14, true);
|
16652
|
+
H.error(14, true);
|
16586
16653
|
}
|
16587
16654
|
|
16588
16655
|
series.data = [];
|
@@ -16621,7 +16688,7 @@
|
|
16621
16688
|
|
16622
16689
|
/**
|
16623
16690
|
* Process the data by cropping away unused data points if the series is longer
|
16624
|
-
* than the crop threshold. This saves computing time for
|
16691
|
+
* than the crop threshold. This saves computing time for large series.
|
16625
16692
|
*/
|
16626
16693
|
processData: function(force) {
|
16627
16694
|
var series = this,
|
@@ -16689,7 +16756,7 @@
|
|
16689
16756
|
// Unsorted data is not supported by the line tooltip, as well as data grouping and
|
16690
16757
|
// navigation in Stock charts (#725) and width calculation of columns (#1900)
|
16691
16758
|
} else if (distance < 0 && series.requireSorting) {
|
16692
|
-
error(15);
|
16759
|
+
H.error(15);
|
16693
16760
|
}
|
16694
16761
|
}
|
16695
16762
|
|
@@ -16982,6 +17049,8 @@
|
|
16982
17049
|
lastPlotX = plotX;
|
16983
17050
|
}
|
16984
17051
|
|
17052
|
+
// Find point zone
|
17053
|
+
point.zone = this.zones.length && point.getZone();
|
16985
17054
|
}
|
16986
17055
|
series.closestPointRangePx = closestPointRangePx;
|
16987
17056
|
},
|
@@ -17260,17 +17329,9 @@
|
|
17260
17329
|
pointMarkerOptions.lineWidth,
|
17261
17330
|
seriesMarkerOptions.lineWidth
|
17262
17331
|
),
|
17263
|
-
zoneColor,
|
17332
|
+
zoneColor = point && point.zone && point.zone.color,
|
17264
17333
|
fill,
|
17265
|
-
stroke
|
17266
|
-
zone;
|
17267
|
-
|
17268
|
-
if (point && this.zones.length) {
|
17269
|
-
zone = point.getZone();
|
17270
|
-
if (zone && zone.color) {
|
17271
|
-
zoneColor = zone.color;
|
17272
|
-
}
|
17273
|
-
}
|
17334
|
+
stroke;
|
17274
17335
|
|
17275
17336
|
color = pointColorOption || zoneColor || pointColor || color;
|
17276
17337
|
fill = pointMarkerOptions.fillColor || seriesMarkerOptions.fillColor || color;
|
@@ -19012,7 +19073,6 @@
|
|
19012
19073
|
series.isDirtyData = true;
|
19013
19074
|
|
19014
19075
|
if (redraw) {
|
19015
|
-
|
19016
19076
|
chart.redraw(animation); // Animation is set anyway on redraw, #5665
|
19017
19077
|
}
|
19018
19078
|
},
|
@@ -20029,6 +20089,8 @@
|
|
20029
20089
|
fill = (point && point.color) || this.color,
|
20030
20090
|
stroke = point[strokeOption] || options[strokeOption] ||
|
20031
20091
|
this.color || fill, // set to fill when borderColor null
|
20092
|
+
strokeWidth = point[strokeWidthOption] ||
|
20093
|
+
options[strokeWidthOption] || this[strokeWidthOption] || 0,
|
20032
20094
|
dashstyle = options.dashStyle,
|
20033
20095
|
zone,
|
20034
20096
|
brightness;
|
@@ -20047,13 +20109,14 @@
|
|
20047
20109
|
(brightness !== undefined && color(fill).brighten(stateOptions.brightness).get()) ||
|
20048
20110
|
fill;
|
20049
20111
|
stroke = stateOptions[strokeOption] || stroke;
|
20112
|
+
strokeWidth = stateOptions[strokeWidthOption] || strokeWidth;
|
20050
20113
|
dashstyle = stateOptions.dashStyle || dashstyle;
|
20051
20114
|
}
|
20052
20115
|
|
20053
20116
|
ret = {
|
20054
20117
|
'fill': fill,
|
20055
20118
|
'stroke': stroke,
|
20056
|
-
'stroke-width':
|
20119
|
+
'stroke-width': strokeWidth
|
20057
20120
|
};
|
20058
20121
|
if (options.borderRadius) {
|
20059
20122
|
ret.r = options.borderRadius;
|
@@ -21109,8 +21172,19 @@
|
|
21109
21172
|
align = options.align,
|
21110
21173
|
rotCorr, // rotation correction
|
21111
21174
|
// Math.round for rounding errors (#2683), alignTo to allow column labels (#2700)
|
21112
|
-
visible =
|
21113
|
-
|
21175
|
+
visible =
|
21176
|
+
this.visible &&
|
21177
|
+
(
|
21178
|
+
point.series.forceDL ||
|
21179
|
+
chart.isInsidePlot(plotX, Math.round(plotY), inverted) ||
|
21180
|
+
(
|
21181
|
+
alignTo && chart.isInsidePlot(
|
21182
|
+
plotX,
|
21183
|
+
inverted ? alignTo.x + 1 : alignTo.y + alignTo.height - 1,
|
21184
|
+
inverted
|
21185
|
+
)
|
21186
|
+
)
|
21187
|
+
),
|
21114
21188
|
alignAttr, // the final position;
|
21115
21189
|
justify = pick(options.overflow, 'justify') === 'justify';
|
21116
21190
|
|
@@ -22207,31 +22281,32 @@
|
|
22207
22281
|
each(panning === 'xy' ? [1, 0] : [1], function(isX) { // xy is used in maps
|
22208
22282
|
var axis = chart[isX ? 'xAxis' : 'yAxis'][0],
|
22209
22283
|
horiz = axis.horiz,
|
22210
|
-
reversed = axis.reversed,
|
22211
22284
|
mousePos = e[horiz ? 'chartX' : 'chartY'],
|
22212
22285
|
mouseDown = horiz ? 'mouseDownX' : 'mouseDownY',
|
22213
22286
|
startPos = chart[mouseDown],
|
22214
|
-
halfPointRange = (axis.pointRange || 0) /
|
22287
|
+
halfPointRange = (axis.pointRange || 0) / 2,
|
22215
22288
|
extremes = axis.getExtremes(),
|
22216
|
-
|
22217
|
-
|
22218
|
-
|
22219
|
-
|
22220
|
-
|
22221
|
-
|
22222
|
-
|
22223
|
-
|
22224
|
-
|
22225
|
-
|
22226
|
-
|
22227
|
-
|
22228
|
-
|
22229
|
-
|
22230
|
-
|
22231
|
-
|
22232
|
-
|
22233
|
-
|
22234
|
-
|
22289
|
+
panMin = axis.toValue(startPos - mousePos, true) +
|
22290
|
+
halfPointRange,
|
22291
|
+
panMax = axis.toValue(startPos + axis.len - mousePos, true) -
|
22292
|
+
halfPointRange,
|
22293
|
+
flipped = panMax < panMin,
|
22294
|
+
newMin = flipped ? panMax : panMin,
|
22295
|
+
newMax = flipped ? panMin : panMax,
|
22296
|
+
distMin = Math.min(extremes.dataMin, extremes.min) - newMin,
|
22297
|
+
distMax = newMax - Math.max(extremes.dataMax, extremes.max);
|
22298
|
+
|
22299
|
+
// Negative distMin and distMax means that we're still inside the
|
22300
|
+
// data range.
|
22301
|
+
if (axis.series.length && distMin < 0 && distMax < 0) {
|
22302
|
+
axis.setExtremes(
|
22303
|
+
newMin,
|
22304
|
+
newMax,
|
22305
|
+
false,
|
22306
|
+
false, {
|
22307
|
+
trigger: 'pan'
|
22308
|
+
}
|
22309
|
+
);
|
22235
22310
|
doRedraw = true;
|
22236
22311
|
}
|
22237
22312
|
|
@@ -22506,8 +22581,10 @@
|
|
22506
22581
|
d: point.haloPath(haloOptions.size)
|
22507
22582
|
});
|
22508
22583
|
halo.attr({
|
22509
|
-
'class': 'highcharts-halo highcharts-color-' +
|
22584
|
+
'class': 'highcharts-halo highcharts-color-' +
|
22585
|
+
pick(point.colorIndex, series.colorIndex)
|
22510
22586
|
});
|
22587
|
+
halo.point = point; // #6055
|
22511
22588
|
|
22512
22589
|
|
22513
22590
|
halo.attr(extend({
|
@@ -22516,10 +22593,12 @@
|
|
22516
22593
|
'zIndex': -1 // #4929, IE8 added halo above everything
|
22517
22594
|
}, haloOptions.attributes));
|
22518
22595
|
|
22519
|
-
|
22596
|
+
|
22597
|
+
} else if (halo && halo.point && halo.point.haloPath) {
|
22598
|
+
// Animate back to 0 on the current halo point (#6055)
|
22520
22599
|
halo.animate({
|
22521
|
-
d: point.haloPath(0)
|
22522
|
-
});
|
22600
|
+
d: halo.point.haloPath(0)
|
22601
|
+
});
|
22523
22602
|
}
|
22524
22603
|
|
22525
22604
|
point.state = state;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v5.0.
|
2
|
+
* @license Highcharts JS v5.0.6 (2016-12-07)
|
3
3
|
*
|
4
4
|
* 3D features for Highcharts JS
|
5
5
|
*
|
@@ -589,7 +589,7 @@
|
|
589
589
|
/**
|
590
590
|
* Override attr to remove shape attributes and use those to set child paths
|
591
591
|
*/
|
592
|
-
wrap(wrapper, 'attr', function(proceed, params
|
592
|
+
wrap(wrapper, 'attr', function(proceed, params) {
|
593
593
|
var ca;
|
594
594
|
if (typeof params === 'object') {
|
595
595
|
ca = suckOutCustom(params);
|
@@ -598,7 +598,7 @@
|
|
598
598
|
wrapper.setPaths(wrapper.attribs);
|
599
599
|
}
|
600
600
|
}
|
601
|
-
return proceed.
|
601
|
+
return proceed.apply(this, [].slice.call(arguments, 1));
|
602
602
|
});
|
603
603
|
|
604
604
|
/**
|
@@ -1004,9 +1004,10 @@
|
|
1004
1004
|
}
|
1005
1005
|
}
|
1006
1006
|
}
|
1007
|
-
|
1008
1007
|
});
|
1009
1008
|
|
1009
|
+
|
1010
|
+
|
1010
1011
|
wrap(Chart.prototype, 'setClassName', function(proceed) {
|
1011
1012
|
proceed.apply(this, [].slice.call(arguments, 1));
|
1012
1013
|
|
@@ -1957,6 +1958,7 @@
|
|
1957
1958
|
'use strict';
|
1958
1959
|
var perspective = H.perspective,
|
1959
1960
|
pick = H.pick,
|
1961
|
+
Point = H.Point,
|
1960
1962
|
seriesTypes = H.seriesTypes,
|
1961
1963
|
wrap = H.wrap;
|
1962
1964
|
|
@@ -2052,6 +2054,16 @@
|
|
2052
2054
|
return pointOptions;
|
2053
2055
|
});
|
2054
2056
|
|
2057
|
+
|
2058
|
+
wrap(Point.prototype, 'applyOptions', function(proceed) {
|
2059
|
+
var point = proceed.apply(this, [].slice.call(arguments, 1));
|
2060
|
+
|
2061
|
+
if (this.series.chart.is3d() && point.z === undefined) {
|
2062
|
+
point.z = 0;
|
2063
|
+
}
|
2064
|
+
return point;
|
2065
|
+
});
|
2066
|
+
|
2055
2067
|
}(Highcharts));
|
2056
2068
|
(function(H) {
|
2057
2069
|
/**
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v5.0.
|
2
|
+
* @license Highcharts JS v5.0.6 (2016-12-07)
|
3
3
|
*
|
4
4
|
* (c) 2009-2016 Torstein Honsi
|
5
5
|
*
|
@@ -1834,6 +1834,7 @@
|
|
1834
1834
|
// Separate offsets for negative and positive columns:
|
1835
1835
|
positiveOffset = 0,
|
1836
1836
|
negativeOffset = 0,
|
1837
|
+
stackIndicator,
|
1837
1838
|
tooltipY;
|
1838
1839
|
|
1839
1840
|
// run column series translate
|
@@ -1850,8 +1851,9 @@
|
|
1850
1851
|
|
1851
1852
|
// get current stack
|
1852
1853
|
stack = stacking && yAxis.stacks[(series.negStacks && yValue < threshold ? '-' : '') + series.stackKey];
|
1854
|
+
stackIndicator = series.getStackIndicator(stackIndicator, point.x);
|
1853
1855
|
range = stack ?
|
1854
|
-
stack[point.x].points[series.index + ',' + i] : [0, yValue];
|
1856
|
+
stack[point.x].points[series.index + ',' + i + ',' + stackIndicator.index] : [0, yValue];
|
1855
1857
|
|
1856
1858
|
// override point value for sums
|
1857
1859
|
// #3710 Update point does not propagate to sum
|
@@ -1898,7 +1900,8 @@
|
|
1898
1900
|
// Before minPointLength, apply negative offset:
|
1899
1901
|
shapeArgs.y -= negativeOffset;
|
1900
1902
|
|
1901
|
-
|
1903
|
+
|
1904
|
+
if (shapeArgs.height <= minPointLength && !point.isNull) {
|
1902
1905
|
shapeArgs.height = minPointLength;
|
1903
1906
|
if (point.y < 0) {
|
1904
1907
|
negativeOffset -= minPointLength;
|
@@ -2222,7 +2225,7 @@
|
|
2222
2225
|
trackerGroups: ['group', 'dataLabelsGroup'],
|
2223
2226
|
bubblePadding: true,
|
2224
2227
|
zoneAxis: 'z',
|
2225
|
-
markerAttribs:
|
2228
|
+
markerAttribs: null,
|
2226
2229
|
|
2227
2230
|
|
2228
2231
|
pointAttribs: function(point, state) {
|
@@ -2392,7 +2395,7 @@
|
|
2392
2395
|
haloPath: function(size) {
|
2393
2396
|
return Point.prototype.haloPath.call(
|
2394
2397
|
this,
|
2395
|
-
this.shapeArgs.r + size
|
2398
|
+
size === 0 ? 0 : this.shapeArgs.r + size // #6067
|
2396
2399
|
);
|
2397
2400
|
},
|
2398
2401
|
ttBelow: false
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v5.0.
|
2
|
+
* @license Highcharts JS v5.0.6 (2016-12-07)
|
3
3
|
*
|
4
4
|
* (c) 2009-2016 Torstein Honsi
|
5
5
|
*
|
@@ -303,6 +303,10 @@
|
|
303
303
|
eventName,
|
304
304
|
y;
|
305
305
|
|
306
|
+
if (!axis) {
|
307
|
+
return; // #5950
|
308
|
+
}
|
309
|
+
|
306
310
|
each(keys, function(key) {
|
307
311
|
breaks = axis.breakArray || [];
|
308
312
|
threshold = axis.isXAxis ? axis.min : pick(series.options.threshold, axis.min);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v5.0.
|
2
|
+
* @license Highcharts JS v5.0.6 (2016-12-07)
|
3
3
|
* Exporting module
|
4
4
|
*
|
5
5
|
* (c) 2010-2016 Torstein Honsi
|
@@ -352,6 +352,11 @@
|
|
352
352
|
}
|
353
353
|
});
|
354
354
|
|
355
|
+
// Assign an internal key to ensure a one-to-one mapping (#5924)
|
356
|
+
each(chart.axes, function(axis) {
|
357
|
+
axis.userOptions.internalKey = H.uniqueKey();
|
358
|
+
});
|
359
|
+
|
355
360
|
// generate the chart copy
|
356
361
|
chartCopy = new H.Chart(options, chart.callback);
|
357
362
|
|
@@ -366,18 +371,19 @@
|
|
366
371
|
});
|
367
372
|
}
|
368
373
|
|
369
|
-
//
|
370
|
-
each(
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
374
|
+
// Reflect axis extremes in the export (#5924)
|
375
|
+
each(chart.axes, function(axis) {
|
376
|
+
var axisCopy = H.find(chartCopy.axes, function(copy) {
|
377
|
+
return copy.options.internalKey ===
|
378
|
+
axis.userOptions.internalKey;
|
379
|
+
}),
|
380
|
+
extremes = axis.getExtremes(),
|
381
|
+
userMin = extremes.userMin,
|
382
|
+
userMax = extremes.userMax;
|
383
|
+
|
384
|
+
if (axisCopy && (userMin !== undefined || userMax !== undefined)) {
|
385
|
+
axisCopy.setExtremes(userMin, userMax, true, false);
|
386
|
+
}
|
381
387
|
});
|
382
388
|
|
383
389
|
// Get the SVG from the container's innerHTML
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v5.0.
|
2
|
+
* @license Highcharts JS v5.0.6 (2016-12-07)
|
3
3
|
*
|
4
4
|
* (c) 2009-2016 Torstein Honsi
|
5
5
|
*
|
@@ -621,6 +621,14 @@
|
|
621
621
|
point[key][method]();
|
622
622
|
}
|
623
623
|
});
|
624
|
+
},
|
625
|
+
setState: function(state) {
|
626
|
+
H.Point.prototype.setState.call(this, state);
|
627
|
+
if (this.graphic) {
|
628
|
+
this.graphic.attr({
|
629
|
+
zIndex: state === 'hover' ? 1 : 0
|
630
|
+
});
|
631
|
+
}
|
624
632
|
}
|
625
633
|
};
|
626
634
|
|
@@ -777,7 +785,9 @@
|
|
777
785
|
seriesTypes.column.prototype.drawPoints.call(this);
|
778
786
|
|
779
787
|
each(this.points, function(point) {
|
780
|
-
|
788
|
+
|
789
|
+
point.graphic.attr(this.colorAttribs(point));
|
790
|
+
|
781
791
|
}, this);
|
782
792
|
},
|
783
793
|
animate: noop,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Highcharts JS v5.0.
|
2
|
+
* @license Highcharts JS v5.0.6 (2016-12-07)
|
3
3
|
* Client side exporting module
|
4
4
|
*
|
5
5
|
* (c) 2015 Torstein Honsi / Oystein Moseng
|
@@ -200,15 +200,22 @@
|
|
200
200
|
function downloadPDF() {
|
201
201
|
dummySVGContainer.innerHTML = svg;
|
202
202
|
var textElements = dummySVGContainer.getElementsByTagName('text'),
|
203
|
+
titleElements,
|
203
204
|
svgElementStyle = dummySVGContainer.getElementsByTagName('svg')[0].style;
|
204
205
|
// Workaround for the text styling. Making sure it does pick up the root element
|
205
206
|
each(textElements, function(el) {
|
207
|
+
// Workaround for the text styling. making sure it does pick up the root element
|
206
208
|
each(['font-family', 'font-size'], function(property) {
|
207
209
|
if (!el.style[property] && svgElementStyle[property]) {
|
208
210
|
el.style[property] = svgElementStyle[property];
|
209
211
|
}
|
210
212
|
});
|
211
213
|
el.style['font-family'] = el.style['font-family'] && el.style['font-family'].split(' ').splice(-1);
|
214
|
+
// Workaround for plotband with width, removing title from text nodes
|
215
|
+
titleElements = el.getElementsByTagName('title');
|
216
|
+
each(titleElements, function(titleElement) {
|
217
|
+
el.removeChild(titleElement);
|
218
|
+
});
|
212
219
|
});
|
213
220
|
var svgData = svgToPdf(dummySVGContainer.firstChild, 0);
|
214
221
|
Highcharts.downloadURL(svgData, filename);
|
@@ -440,7 +447,7 @@
|
|
440
447
|
|
441
448
|
// Extend the default options to use the local exporter logic
|
442
449
|
merge(true, Highcharts.getOptions().exporting, {
|
443
|
-
libURL: 'https://code.highcharts.com/5.0.
|
450
|
+
libURL: 'https://code.highcharts.com/5.0.6/lib/',
|
444
451
|
buttons: {
|
445
452
|
contextButton: {
|
446
453
|
menuItems: [{
|
data/lib/highcharts/version.rb
CHANGED