Files
Sensores/static/lib/Highcharts-10.2.1/modules/dependency-wheel.js
2025-04-17 00:35:33 -06:00

21 lines
5.4 KiB
JavaScript

/*
Highcharts JS v10.2.1 (2022-08-29)
Dependency wheel module
(c) 2010-2021 Torstein Honsi
License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/dependency-wheel",["highcharts","highcharts/modules/sankey"],function(f){a(f);a.Highcharts=f;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function f(a,h,g,f){a.hasOwnProperty(h)||(a[h]=f.apply(null,g),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:h,module:a[h]}})))}
a=a?a._modules:{};f(a,"Series/DependencyWheel/DependencyWheelPoint.js",[a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,f){var g=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return a(c,b)};return function(c,b){function f(){this.constructor=c}a(c,b);c.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)}}(),
h=f.wrap;return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.angle=void 0;b.fromNode=void 0;b.index=void 0;b.linksFrom=void 0;b.linksTo=void 0;b.options=void 0;b.series=void 0;b.shapeArgs=void 0;b.toNode=void 0;return b}g(c,a);c.prototype.getDataLabelPath=function(a){var b=this,c=this.series.chart.renderer,f=this.shapeArgs,g=0>this.angle||this.angle>Math.PI,p=f.start||0,n=f.end||0;this.dataLabelPath?(this.dataLabelPath=this.dataLabelPath.destroy(),delete this.dataLabelPath):
h(a,"destroy",function(e){b.dataLabelPath&&(b.dataLabelPath=b.dataLabelPath.destroy());return e.call(a)});return this.dataLabelPath=c.arc({open:!0,longArc:Math.abs(Math.abs(p)-Math.abs(n))<Math.PI?0:1}).attr({x:f.x,y:f.y,r:f.r+(this.dataLabel.options.distance||0),start:g?p:n,end:g?n:p,clockwise:+g}).add(c.defs)};c.prototype.isValid=function(){return!0};return c}(a.seriesTypes.sankey.prototype.pointClass)});f(a,"Series/DependencyWheel/DependencyWheelSeries.js",[a["Core/Animation/AnimationUtilities.js"],
a["Series/DependencyWheel/DependencyWheelPoint.js"],a["Core/Globals.js"],a["Series/Sankey/SankeyColumnComposition.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,f,g,r,q,c){var b=this&&this.__extends||function(){var a=function(b,e){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e])};return a(b,e)};return function(b,e){function c(){this.constructor=b}a(b,e);b.prototype=null===
e?Object.create(e):(c.prototype=e.prototype,new c)}}(),h=a.animObject,t=g.deg2rad;g=q.seriesTypes;a=g.pie;var l=g.sankey;g=c.extend;var u=c.merge;c=function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.nodeColumns=void 0;b.nodes=void 0;b.points=void 0;return b}b(c,a);c.prototype.animate=function(a){if(!a){var b=h(this.options.animation).duration/2/this.nodes.length;this.nodes.forEach(function(a,c){var f=a.graphic;f&&(f.attr({opacity:0}),setTimeout(function(){a.graphic&&
a.graphic.animate({opacity:1},{duration:b})},b*c))},this);this.points.forEach(function(a){var b=a.graphic;!a.isNode&&b&&b.attr({opacity:0}).animate({opacity:1},this.options.animation)},this)}};c.prototype.createNode=function(a){var b=l.prototype.createNode.call(this,a);b.getSum=function(){return b.linksFrom.concat(b.linksTo).reduce(function(a,b){return a+b.weight},0)};b.offset=function(a){function c(a){return a.fromNode===b?a.toNode:a.fromNode}var f=0,d,e=b.linksFrom.concat(b.linksTo);e.sort(function(a,
b){return c(a).index-c(b).index});for(d=0;d<e.length;d++)if(c(e[d]).index>b.index){e=e.slice(0,d).reverse().concat(e.slice(d).reverse());var g=!0;break}g||e.reverse();for(d=0;d<e.length;d++){if(e[d]===a)return f;f+=e[d].weight}};return b};c.prototype.createNodeColumns=function(){var a=[r.compose([],this)];this.nodes.forEach(function(b){b.column=0;a[0].push(b)});return a};c.prototype.getNodePadding=function(){return this.options.nodePadding/Math.PI};c.prototype.translate=function(){var a=this.options,
b=2*Math.PI/(this.chart.plotHeight+this.getNodePadding()),c=this.getCenter(),f=(a.startAngle-90)*t;l.prototype.translate.call(this);this.nodeColumns[0].forEach(function(e){if(e.sum){var d=e.shapeArgs,g=c[0],h=c[1],l=c[2]/2,k=l-a.nodeWidth,m=f+b*(d.y||0);d=f+b*((d.y||0)+(d.height||0));e.angle=m+(d-m)/2;e.shapeType="arc";e.shapeArgs={x:g,y:h,r:l,innerR:k,start:m,end:d};e.dlBox={x:g+Math.cos((m+d)/2)*(l+k)/2,y:h+Math.sin((m+d)/2)*(l+k)/2,width:1,height:1};e.linksFrom.forEach(function(c){if(c.linkBase){var e,
d=c.linkBase.map(function(d,l){d*=b;var m=Math.cos(f+d)*(k+1),p=Math.sin(f+d)*(k+1),n=a.curveFactor||0;e=Math.abs(c.linkBase[3-l]*b-d);e>Math.PI&&(e=2*Math.PI-e);e*=k;e<k&&(n*=e/k);return{x:g+m,y:h+p,cpX:g+(1-n)*m,cpY:h+(1-n)*p}});c.shapeArgs={d:[["M",d[0].x,d[0].y],["A",k,k,0,0,1,d[1].x,d[1].y],["C",d[1].cpX,d[1].cpY,d[2].cpX,d[2].cpY,d[2].x,d[2].y],["A",k,k,0,0,1,d[3].x,d[3].y],["C",d[3].cpX,d[3].cpY,d[0].cpX,d[0].cpY,d[0].x,d[0].y]]}}})}})};c.defaultOptions=u(l.defaultOptions,{center:[null,null],
curveFactor:.6,startAngle:0});return c}(l);g(c.prototype,{orderNodes:!1,getCenter:a.prototype.getCenter});c.prototype.pointClass=f;q.registerSeriesType("dependencywheel",c);"";return c});f(a,"masters/modules/dependency-wheel.src.js",[],function(){})});
//# sourceMappingURL=dependency-wheel.js.map