Skip to content
This repository was archived by the owner on Sep 1, 2021. It is now read-only.

Commit 94cca2e

Browse files
Update JavaScript to 4.2.3
1 parent 18962f6 commit 94cca2e

12 files changed

+54
-38
lines changed

app/assets/javascripts/highcharts.js

+42-25
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @compilation_level SIMPLE_OPTIMIZATIONS
33

44
/**
5-
* @license Highcharts JS v4.2.2 (2016-02-04)
5+
* @license Highcharts JS v4.2.3 (2016-02-08)
66
*
77
* (c) 2009-2016 Torstein Honsi
88
*
@@ -59,7 +59,7 @@
5959
charts = [],
6060
chartCount = 0,
6161
PRODUCT = 'Highcharts',
62-
VERSION = '4.2.2',
62+
VERSION = '4.2.3',
6363

6464
// some constants for frequently used strings
6565
DIV = 'div',
@@ -1533,7 +1533,7 @@
15331533
useUTC: true,
15341534
//timezoneOffset: 0,
15351535
canvasToolsURL: 'http://code.highcharts.com/modules/canvas-tools.js',
1536-
VMLRadialGradientURL: 'http://code.highcharts.com/4.2.2/gfx/vml-radial-gradient.png'
1536+
VMLRadialGradientURL: 'http://code.highcharts.com/4.2.3/gfx/vml-radial-gradient.png'
15371537
},
15381538
chart: {
15391539
//animation: true,
@@ -2482,7 +2482,7 @@
24822482
key,
24832483
attribs = {},
24842484
normalizer,
2485-
strokeWidth = rect.strokeWidth || wrapper.strokeWidth || 0;
2485+
strokeWidth = wrapper.strokeWidth || 0;
24862486

24872487
normalizer = mathRound(strokeWidth) % 2 / 2; // mathRound because strokeWidth can sometimes have roundoff errors
24882488

@@ -3957,16 +3957,16 @@
39573957
};
39583958

39593959
if (strokeWidth !== UNDEFINED) {
3960-
attribs.strokeWidth = strokeWidth;
3960+
wrapper.strokeWidth = strokeWidth;
39613961
attribs = wrapper.crisp(attribs);
39623962
}
39633963

39643964
if (r) {
39653965
attribs.r = r;
39663966
}
39673967

3968-
wrapper.rSetter = function (value) {
3969-
attr(this.element, {
3968+
wrapper.rSetter = function (value, key, element) {
3969+
attr(element, {
39703970
rx: value,
39713971
ry: value
39723972
});
@@ -10545,7 +10545,7 @@
1054510545

1054610546
var chart = this.chart;
1054710547

10548-
if (!defined(hoverChartIndex) || !charts[hoverChartIndex].mouseIsDown) {
10548+
if (!defined(hoverChartIndex) || !charts[hoverChartIndex] || !charts[hoverChartIndex].mouseIsDown) {
1054910549
hoverChartIndex = chart.index;
1055010550
}
1055110551

@@ -12852,8 +12852,9 @@
1285212852
})
1285312853
.add();
1285412854
} else {
12855+
plotBorder.strokeWidth = -plotBorderWidth;
1285512856
plotBorder.animate(
12856-
plotBorder.crisp({ x: plotLeft, y: plotTop, width: plotWidth, height: plotHeight, strokeWidth: -plotBorderWidth }) //#3282 plotBorder should be negative
12857+
plotBorder.crisp({ x: plotLeft, y: plotTop, width: plotWidth, height: plotHeight }) //#3282 plotBorder should be negative
1285712858
);
1285812859
}
1285912860
}
@@ -13364,8 +13365,8 @@
1336413365

1336513366
// If no x is set by now, get auto incremented value. All points must have an
1336613367
// x value, however the y value can be null to create a gap in the series
13367-
if (point.x === UNDEFINED && series) {
13368-
point.x = x === UNDEFINED ? series.autoIncrement() : x;
13368+
if (typeof point.x !== 'number' && series) {
13369+
point.x = x === undefined ? series.autoIncrement() : x;
1336913370
}
1337013371

1337113372
return point;
@@ -14351,8 +14352,8 @@
1435114352
/**
1435214353
* Return the series points with null points filtered out
1435314354
*/
14354-
getValidPoints: function () {
14355-
return grep(this.points, function (point) {
14355+
getValidPoints: function (points) {
14356+
return grep(points || this.points, function (point) {
1435614357
return !point.isNull;
1435714358
});
1435814359
},
@@ -14811,11 +14812,28 @@
1481114812
var series = this,
1481214813
options = series.options,
1481314814
step = options.step,
14815+
reversed,
1481414816
graphPath = [],
1481514817
gap;
1481614818

1481714819
points = points || series.points;
1481814820

14821+
// Bottom of a stack is reversed
14822+
reversed = points.reversed;
14823+
if (reversed) {
14824+
points.reverse();
14825+
}
14826+
// Reverse the steps (#5004)
14827+
step = { right: 1, center: 2 }[step] || (step && 3);
14828+
if (step && reversed) {
14829+
step = 4 - step;
14830+
}
14831+
14832+
// Remove invalid points, especially in spline (#5015)
14833+
if (options.connectNulls && !nullsAsZeroes && !connectCliffs) {
14834+
points = this.getValidPoints(points);
14835+
}
14836+
1481914837
// Build the line
1482014838
each(points, function (point, i) {
1482114839

@@ -14847,14 +14865,14 @@
1484714865

1484814866
} else if (step) {
1484914867

14850-
if (step === 'right') {
14868+
if (step === 1) { // right
1485114869
pathToPoint = [
1485214870
L,
1485314871
lastPoint.plotX,
1485414872
plotY
1485514873
];
1485614874

14857-
} else if (step === 'center') {
14875+
} else if (step === 2) { // center
1485814876
pathToPoint = [
1485914877
L,
1486014878
(lastPoint.plotX + plotX) / 2,
@@ -15327,11 +15345,7 @@
1532715345

1532815346
// Start the recursive build process with a clone of the points array and null points filtered out (#3873)
1532915347
function startRecursive() {
15330-
var points = grep(series.points || [], function (point) { // #4390
15331-
return point.y !== null;
15332-
});
15333-
15334-
series.kdTree = _kdtree(points, dimensions, dimensions);
15348+
series.kdTree = _kdtree(series.getValidPoints(), dimensions, dimensions);
1533515349
}
1533615350
delete series.kdTree;
1533715351

@@ -16564,7 +16578,8 @@
1656416578

1656516579
topPath = getGraphPath.call(this, graphPoints, true, true);
1656616580

16567-
bottomPath = getGraphPath.call(this, bottomPoints.reverse(), true, true);
16581+
bottomPoints.reversed = true;
16582+
bottomPath = getGraphPath.call(this, bottomPoints, true, true);
1656816583
if (bottomPath.length) {
1656916584
bottomPath[0] = L;
1657016585
}
@@ -16660,16 +16675,18 @@
1666016675
lastY = lastPoint.plotY,
1666116676
nextX = nextPoint.plotX,
1666216677
nextY = nextPoint.plotY,
16663-
correction;
16678+
correction = 0;
1666416679

1666516680
leftContX = (smoothing * plotX + lastX) / denom;
1666616681
leftContY = (smoothing * plotY + lastY) / denom;
1666716682
rightContX = (smoothing * plotX + nextX) / denom;
1666816683
rightContY = (smoothing * plotY + nextY) / denom;
1666916684

16670-
// have the two control points make a straight line through main point
16671-
correction = ((rightContY - leftContY) * (rightContX - plotX)) /
16672-
(rightContX - leftContX) + plotY - rightContY;
16685+
// Have the two control points make a straight line through main point
16686+
if (rightContX !== leftContX) { // #5016, division by zero
16687+
correction = ((rightContY - leftContY) * (rightContX - plotX)) /
16688+
(rightContX - leftContX) + plotY - rightContY;
16689+
}
1667316690

1667416691
leftContY += correction;
1667516692
rightContY += correction;

app/assets/javascripts/highcharts/highcharts-3d.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @compilation_level SIMPLE_OPTIMIZATIONS
33

44
/**
5-
* @license Highcharts JS v4.2.2 (2016-02-04)
5+
* @license Highcharts JS v4.2.3 (2016-02-08)
66
*
77
* 3D features for Highcharts JS
88
*

app/assets/javascripts/highcharts/highcharts-more.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @compilation_level SIMPLE_OPTIMIZATIONS
33

44
/**
5-
* @license Highcharts JS v4.2.2 (2016-02-04)
5+
* @license Highcharts JS v4.2.3 (2016-02-08)
66
*
77
* (c) 2009-2016 Torstein Honsi
88
*
@@ -816,11 +816,10 @@ var arrayMin = Highcharts.arrayMin,
816816
linePath = [].concat(lowerPath, higherPath);
817817

818818
// For the area path, we need to change the 'move' statement into 'lineTo' or 'curveTo'
819-
if (!this.chart.polar) {
819+
if (!this.chart.polar && higherAreaPath[0] === 'M') {
820820
higherAreaPath[0] = 'L'; // this probably doesn't work for spline
821821
}
822822
this.areaPath = this.areaPath.concat(lowerPath, higherAreaPath);
823-
824823
return linePath;
825824
},
826825

app/assets/javascripts/highcharts/modules/broken-axis.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Highcharts JS v4.2.2 (2016-02-04)
2+
* Highcharts JS v4.2.3 (2016-02-08)
33
* Highcharts Broken Axis module
44
*
55
* License: www.highcharts.com/license

app/assets/javascripts/highcharts/modules/canvas-tools.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2908,7 +2908,7 @@ if (CanvasRenderingContext2D) {
29082908
});
29092909
}
29102910
}/**
2911-
* @license Highcharts JS v4.2.2 (2016-02-04)
2911+
* @license Highcharts JS v4.2.3 (2016-02-08)
29122912
* CanVGRenderer Extension module
29132913
*
29142914
* (c) 2011-2016 Torstein Honsi, Erik Olsson

app/assets/javascripts/highcharts/modules/data.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Highcharts JS v4.2.2 (2016-02-04)
2+
* @license Highcharts JS v4.2.3 (2016-02-08)
33
* Data module
44
*
55
* (c) 2012-2016 Torstein Honsi

app/assets/javascripts/highcharts/modules/exporting.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Highcharts JS v4.2.2 (2016-02-04)
2+
* @license Highcharts JS v4.2.3 (2016-02-08)
33
* Exporting module
44
*
55
* (c) 2010-2016 Torstein Honsi

app/assets/javascripts/highcharts/modules/heatmap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Highcharts JS v4.2.2 (2016-02-04)
2+
* @license Highcharts JS v4.2.3 (2016-02-08)
33
*
44
* (c) 2011-2016 Torstein Honsi
55
*

app/assets/javascripts/highcharts/modules/no-data-to-display.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Highcharts JS v4.2.2 (2016-02-04)
2+
* @license Highcharts JS v4.2.3 (2016-02-08)
33
* Plugin for displaying a message when there is no data visible in chart.
44
*
55
* (c) 2010-2016 Highsoft AS

app/assets/javascripts/highcharts/modules/offline-exporting.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Highcharts JS v4.2.2 (2016-02-04)
2+
* @license Highcharts JS v4.2.3 (2016-02-08)
33
* Client side exporting module
44
*
55
* (c) 2015 Torstein Honsi / Oystein Moseng

app/assets/javascripts/highcharts/modules/solid-gauge.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Highcharts JS v4.2.2 (2016-02-04)
2+
* @license Highcharts JS v4.2.3 (2016-02-08)
33
* Solid angular gauge module
44
*
55
* (c) 2010-2016 Torstein Honsi

app/assets/javascripts/highcharts/modules/treemap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Highcharts JS v4.2.2 (2016-02-04)
2+
* @license Highcharts JS v4.2.3 (2016-02-08)
33
*
44
* (c) 2014 Highsoft AS
55
* Authors: Jon Arild Nygard / Oystein Moseng

0 commit comments

Comments
 (0)