corrade-nucleus-nucleons

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 10  →  ?path2? @ 11
/base/000_base/bower_components/highcharts/modules/funnel.src.js
@@ -1,5 +1,5 @@
/**
* @license Highcharts JS v5.0.10 (2017-03-31)
* @license Highcharts JS v5.0.12 (2017-05-24)
* Highcharts funnel module
*
* (c) 2010-2017 Torstein Honsi
@@ -28,6 +28,7 @@
var seriesType = Highcharts.seriesType,
seriesTypes = Highcharts.seriesTypes,
noop = Highcharts.noop,
pick = Highcharts.pick,
each = Highcharts.each;
 
 
@@ -115,8 +116,8 @@
neckWidth :
neckWidth + (width - neckWidth) * (1 - (y - top) / (height - neckHeight));
};
series.getX = function(y, half) {
return centerX + (half ? -1 : 1) * ((getWidthAt(reversed ? 2 * centerY - y : y) / 2) + options.dataLabels.distance);
series.getX = function(y, half, point) {
return centerX + (half ? -1 : 1) * ((getWidthAt(reversed ? 2 * centerY - y : y) / 2) + point.labelDistance);
};
 
// Expose
@@ -229,13 +230,6 @@
}
});
},
/**
* Draw a single point (wedge)
* @param {Object} point The point object
* @param {Object} color The color of the point
* @param {Number} brightness The brightness relative to the color
*/
drawPoints: seriesTypes.column.prototype.drawPoints,
 
/**
* Funnel items don't have angles (#2289)
@@ -250,8 +244,9 @@
* Extend the pie data label method
*/
drawDataLabels: function() {
var data = this.data,
labelDistance = this.options.dataLabels.distance,
var series = this,
data = series.data,
labelDistance = series.options.dataLabels.distance,
leftSide,
sign,
point,
@@ -262,7 +257,7 @@
// In the original pie label anticollision logic, the slots are distributed
// from one labelDistance above to one labelDistance below the pie. In funnels
// we don't want this.
this.center[2] -= 2 * labelDistance;
series.center[2] -= 2 * labelDistance;
 
// Set the label position array for each point.
while (i--) {
@@ -270,15 +265,21 @@
leftSide = point.half;
sign = leftSide ? 1 : -1;
y = point.plotY;
x = this.getX(y, leftSide);
point.labelDistance = pick(
point.options.dataLabels && point.options.dataLabels.distance,
labelDistance
);
 
series.maxLabelDistance = Math.max(point.labelDistance, series.maxLabelDistance || 0);
x = series.getX(y, leftSide, point);
 
// set the anchor point for data labels
point.labelPos = [
0, // first break of connector
y, // a/a
x + (labelDistance - 5) * sign, // second break, right outside point shape
x + (point.labelDistance - 5) * sign, // second break, right outside point shape
y, // a/a
x + labelDistance * sign, // landing point for connector
x + point.labelDistance * sign, // landing point for connector
y, // a/a
leftSide ? 'right' : 'left', // alignment
0 // center angle