All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.modules.dependency-wheel.js Maven / Gradle / Ivy

The newest version!
!/**
 * Highcharts JS v11.4.8 (2024-08-29)
 *
 * Dependency wheel module
 *
 * (c) 2010-2024 Torstein Honsi
 *
 * License: www.highcharts.com/license
 */function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/modules/dependency-wheel",["highcharts","highcharts/modules/sankey"],function(t){return e(t),e.Highcharts=t,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var t=e?e._modules:{};function s(t,s,n,a){t.hasOwnProperty(s)||(t[s]=a.apply(null,n),"function"==typeof CustomEvent&&e.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:s,module:t[s]}})))}s(t,"Series/DependencyWheel/DependencyWheelPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sankey:{prototype:{pointClass:s}}}=e.seriesTypes,{pInt:n,wrap:a}=t;return class extends s{getDataLabelPath(e){let t=this,s=t.series.chart.renderer,r=t.shapeArgs,i=t.angle<0||t.angle>Math.PI,o=r.start||0,l=r.end||0;return t.dataLabelPath?(t.dataLabelPath=t.dataLabelPath.destroy(),delete t.dataLabelPath):a(e,"destroy",function(e){return t.dataLabelPath&&(t.dataLabelPath=t.dataLabelPath.destroy()),e.call(this)}),t.dataLabelPath=s.arc({open:!0,longArc:Math.abs(Math.abs(o)-Math.abs(l)){s.graphic&&s.graphic.animate({opacity:1},{duration:e})},e*t++))}for(let e of this.points){let t=e.graphic;!e.isNode&&t&&t.attr({opacity:0}).animate({opacity:1},this.options.animation)}}}createNode(e){let t=super.createNode(e);return t.getSum=()=>t.linksFrom.concat(t.linksTo).reduce((e,t)=>e+t.weight,0),t.offset=e=>{let s=e=>e.fromNode===t?e.toNode:e.fromNode,n=0,a=t.linksFrom.concat(t.linksTo),r;a.sort((e,t)=>s(e).index-s(t).index);for(let e=0;et.index){a=a.slice(0,e).reverse().concat(a.slice(e).reverse()),r=!0;break}r||a.reverse();for(let t=0;t{let c=t*i,p=Math.cos(n+c)*(h+1),u=Math.sin(n+c)*(h+1);return a=e.curveFactor||0,(r=Math.abs(s.linkBase[3-d]*t-c))>Math.PI&&(r=2*Math.PI-r),(r*=h)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy