Hacked By AnonymousFox

Current Path : C:/AppServ/www/financial/stacked/code/es5/modules/
Upload File :
Current File : C:/AppServ/www/financial/stacked/code/es5/modules/series-label.js

!/**
 * Highcharts JS v12.1.2 (2025-01-09)
 * @module highcharts/modules/series-label
 * @requires highcharts
 *
 * (c) 2009-2024 Torstein Honsi
 *
 * License: www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("highcharts"),require("highcharts").Templating):"function"==typeof define&&define.amd?define("highcharts/modules/series-label",[["highcharts/highcharts"],["highcharts/highcharts","Templating"]],e):"object"==typeof exports?exports["highcharts/modules/series-label"]=e(require("highcharts"),require("highcharts").Templating):t.Highcharts=e(t.Highcharts,t.Highcharts.Templating)}(this,function(t,e){return function(){"use strict";var r={984:function(t){t.exports=e},944:function(e){e.exports=t}},o={};function a(t){var e=o[t];if(void 0!==e)return e.exports;var i=o[t]={exports:{}};return r[t](i,i.exports,a),i.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var i={};a.d(i,{default:function(){return B}});var n=a(944),h=a.n(n),s=a(984),l=a.n(s),c={enabled:!0,connectorAllowed:!1,connectorNeighbourDistance:24,format:void 0,formatter:void 0,minFontSize:null,maxFontSize:null,onArea:null,style:{fontSize:"0.8em",fontWeight:"bold"},useHTML:!1,boxesToAvoid:[]};function p(t,e,r,o,a,i){var n=(i-e)*(r-t)-(o-e)*(a-t);return n>0||!(n<0)}function u(t,e,r,o,a,i,n,h){return p(t,e,a,i,n,h)!==p(r,o,a,i,n,h)&&p(t,e,r,o,a,i)!==p(t,e,r,o,n,h)}var d=function(t,e,r){if(r||2==arguments.length)for(var o,a=0,i=e.length;a<i;a++)!o&&a in e||(o||(o=Array.prototype.slice.call(e,0,a)),o[a]=e[a]);return t.concat(o||Array.prototype.slice.call(e))},f=h().animObject,x=l().format,g=h().setOptions,b=h().composed,m=function(t,e,r,o,a,i,n,h){return u(t,e,t+r,e,a,i,n,h)||u(t+r,e,t+r,e+o,a,i,n,h)||u(t,e+o,t+r,e+o,a,i,n,h)||u(t,e,t,e+o,a,i,n,h)},v=h().addEvent,y=h().extend,X=h().fireEvent,Y=h().isNumber,M=h().pick,A=h().pushUnique,w=h().syncTimeout;function S(t,e,r,o,a){var i,n,h,s,l,c,p,u,f,x=t.chart,g=t.options.label||{},b=M(g.onArea,!!t.area),v=b||g.connectorAllowed,y=x.boxesToAvoid,X=Number.MAX_VALUE,Y=Number.MAX_VALUE;for(u=0;y&&u<y.length;u+=1)if(i=y[u],!((n={left:e,right:e+o.width,top:r,bottom:r+o.height}).left>i.right||n.right<i.left||n.top>i.bottom||n.bottom<i.top))return!1;for(u=0;u<x.series.length;u+=1){var A=x.series[u],w=A.interpolatedPoints&&d([],A.interpolatedPoints,!0);if(A.visible&&w){for(var S=x.plotHeight/10,T=x.plotTop;T<=x.plotTop+x.plotHeight;T+=S)w.unshift({chartX:x.plotLeft,chartY:T}),w.push({chartX:x.plotLeft+x.plotWidth,chartY:T});for(f=1;f<w.length;f+=1){if(w[f].chartX>=e-16&&w[f-1].chartX<=e+o.width+16){if(m(e,r,o.width,o.height,w[f-1].chartX,w[f-1].chartY,w[f].chartX,w[f].chartY))return!1;t===A&&!l&&a&&(l=m(e-16,r-16,o.width+32,o.height+32,w[f-1].chartX,w[f-1].chartY,w[f].chartX,w[f].chartY))}(v||l)&&(t!==A||b)&&(X=Math.min(X,(c=e+o.width/2-w[f].chartX)*c+(p=r+o.height/2-w[f].chartY)*p))}if(!b&&v&&t===A&&(a&&!l||X<Math.pow(g.connectorNeighbourDistance||1,2))){for(f=1;f<w.length;f+=1)(h=Math.min(Math.pow(e+o.width/2-w[f].chartX,2)+Math.pow(r+o.height/2-w[f].chartY,2),Math.pow(e-w[f].chartX,2)+Math.pow(r-w[f].chartY,2),Math.pow(e+o.width-w[f].chartX,2)+Math.pow(r-w[f].chartY,2),Math.pow(e+o.width-w[f].chartX,2)+Math.pow(r+o.height-w[f].chartY,2),Math.pow(e-w[f].chartX,2)+Math.pow(r+o.height-w[f].chartY,2)))<Y&&(Y=h,s=w[f]);l=!0}}}return(!a||!!l)&&{x:e,y:r,weight:X-(s?Y:0),connectorPoint:s}}function T(t){if(this.renderer){var e=this,r=f(e.renderer.globalAnimation).duration;e.labelSeries=[],e.labelSeriesMaxSum=0,e.seriesLabelTimer&&h().clearTimeout(e.seriesLabelTimer),e.series.forEach(function(o){var a=o.options.label||{},i=o.labelBySeries,n=i&&i.closest,h=o.getColumn("y");a.enabled&&o.visible&&(o.graph||o.area)&&!o.boosted&&e.labelSeries&&(e.labelSeries.push(o),a.minFontSize&&a.maxFontSize&&h.length&&(o.sum=h.reduce(function(t,e){return(t||0)+(e||0)},0),e.labelSeriesMaxSum=Math.max(e.labelSeriesMaxSum||0,o.sum||0)),"load"===t.type&&(r=Math.max(r,f(o.options.animation).duration)),n&&(void 0!==n[0].plotX?i.animate({x:n[0].plotX+n[1],y:n[0].plotY+n[2]}):i.attr({opacity:0})))}),e.seriesLabelTimer=w(function(){if(e.series&&e.labelSeries){var t,r;e.boxesToAvoid=[],t=e.labelSeries||[],r=e.boxesToAvoid,e.series.forEach(function(t){return(t.points||[]).forEach(function(e){return(e.dataLabels||[]).forEach(function(e){var o=e.getBBox(),a=o.width,i=o.height,n=(e.translateX||0)+(t.xAxis?t.xAxis.pos:t.chart.plotLeft),h=(e.translateY||0)+(t.yAxis?t.yAxis.pos:t.chart.plotTop);r.push({left:n,top:h,right:n+a,bottom:h+i})})})}),t.forEach(function(t){var e=t.options.label||{};t.interpolatedPoints=function(t){if(t.xAxis||t.yAxis){var e,r,o,a,i,n,h=t.points,s=[],l=t.graph||t.area,c=l&&l.element,p=t.chart.inverted,u=t.xAxis,d=t.yAxis,f=p?d.pos:u.pos,x=p?u.pos:d.pos,g=p?u.len:d.len,b=p?d.len:u.len,m=M((t.options.label||{}).onArea,!!t.area),v=d.getThreshold(t.options.threshold),y={},X=p?"chartCenterX":"chartCenterY";if(t.getPointSpline&&c&&c.getPointAtLength&&!m&&h.length<(t.chart.plotSizeX||0)/16){var A=l.toD&&l.attr("d");for(l.toD&&l.attr({d:l.toD}),a=c.getTotalLength(),r=0;r<a;r+=16){var w=c.getPointAtLength(r),S=p?b-w.y:w.x,T=p?g-w.x:w.y;H({chartX:f+S,chartY:x+T,plotX:S,plotY:T})}A&&l.attr({d:A});var L=h[h.length-1],P=L.pos();H({chartX:f+((null==P?void 0:P[0])||0),chartY:x+((null==P?void 0:P[1])||0)})}else{a=h.length;var B=void 0;for(r=0;r<a;r+=1){var L=h[r],E=L.pos()||[],S=E[0],T=E[1],C=L.plotHigh;if(Y(S)&&Y(T)){var z={plotX:S,plotY:T,chartX:f+S,chartY:x+T};if(m&&(C&&(z.plotY=C,z.chartY=x+C),p?z.chartCenterX=f+b-((C||L.plotY||0)+M(L.yBottom,v))/2:z.chartCenterY=x+((C||T)+M(L.yBottom,v))/2),B&&(o=Math.max(Math.abs(z.chartX-B.chartX),Math.abs(z.chartY-B.chartY)))>16&&o<999)for(n=1,i=Math.ceil(o/16);n<i;n+=1)H(((e={chartX:B.chartX+(z.chartX-B.chartX)*(n/i),chartY:B.chartY+(z.chartY-B.chartY)*(n/i)})[X]=(B[X]||0)+((z[X]||0)-(B[X]||0))*(n/i),e.plotX=(B.plotX||0)+(S-(B.plotX||0))*(n/i),e.plotY=(B.plotY||0)+(T-(B.plotY||0))*(n/i),e));H(z),B=z}}}return s}function H(t){var e=Math.round((t.plotX||0)/8)+","+Math.round((t.plotY||0)/8);y[e]||(y[e]=1,s.push(t))}}(t),r.push.apply(r,e.boxesToAvoid||[])}),e.series.forEach(function(t){var r=t.options.label;if(r&&(t.xAxis||t.yAxis)){var o,a,i,n,h,s,l,c,p,u,d,g="highcharts-color-"+M(t.colorIndex,"none"),b=!t.labelBySeries,m=r.minFontSize,v=r.maxFontSize,X=e.inverted,Y=X?t.yAxis.pos:t.xAxis.pos,A=X?t.xAxis.pos:t.yAxis.pos,w=e.inverted?t.yAxis.len:t.xAxis.len,T=e.inverted?t.xAxis.len:t.yAxis.len,L=t.interpolatedPoints,P=M(r.onArea,!!t.area),B=[],E=t.getColumn("x"),C=t.labelBySeries;if(P&&!X&&(p=[t.xAxis.toPixels(E[0]),t.xAxis.toPixels(E[E.length-1])],u=Math.min.apply(Math,p),d=Math.max.apply(Math,p)),t.visible&&!t.boosted&&L){if(!C){var z=t.name;if("string"==typeof r.format?z=x(r.format,t,e):r.formatter&&(z=r.formatter.call(t)),t.labelBySeries=C=e.renderer.label(z,0,0,"connector",0,0,r.useHTML).addClass("highcharts-series-label highcharts-series-label-"+t.index+" "+(t.options.className||"")+" "+g),!e.renderer.styledMode){var H="string"==typeof t.color?t.color:"#666666";C.css(y({color:P?e.renderer.getContrast(H):H},r.style||{})),C.attr({opacity:e.renderer.forExport?1:0,stroke:t.color,"stroke-width":1})}m&&v&&C.css({fontSize:m+(t.sum||0)/(t.chart.labelSeriesMaxSum||0)*(v-m)+"px"}),C.attr({padding:0,zIndex:3}).add()}for((i=C.getBBox()).width=Math.round(i.width),l=L.length-1;l>0;l-=1)P?O(n=(null!==(o=L[l].chartCenterX)&&void 0!==o?o:L[l].chartX)-i.width/2,h=(null!==(a=L[l].chartCenterY)&&void 0!==a?a:L[l].chartY)-i.height/2,i)&&(c=S(t,n,h,i)):(O(n=L[l].chartX+3,h=L[l].chartY-i.height-3,i)&&(c=S(t,n,h,i,!0)),c&&B.push(c),O(n=L[l].chartX+3,h=L[l].chartY+3,i)&&(c=S(t,n,h,i,!0)),c&&B.push(c),O(n=L[l].chartX-i.width-3,h=L[l].chartY+3,i)&&(c=S(t,n,h,i,!0)),c&&B.push(c),O(n=L[l].chartX-i.width-3,h=L[l].chartY-i.height-3,i)&&(c=S(t,n,h,i,!0))),c&&B.push(c);if(r.connectorAllowed&&!B.length&&!P)for(n=Y+w-i.width;n>=Y;n-=16)for(h=A;h<A+T-i.height;h+=16)(s=S(t,n,h,i,!0))&&B.push(s);if(B.length){B.sort(function(t,e){return e.weight-t.weight}),c=B[0],(e.boxesToAvoid||[]).push({left:c.x,right:c.x+i.width,top:c.y,bottom:c.y+i.height});var D=Math.sqrt(Math.pow(Math.abs(c.x-(C.x||0)),2)+Math.pow(Math.abs(c.y-(C.y||0)),2));if(D&&t.labelBySeries){var N={opacity:e.renderer.forExport?1:0,x:c.x,y:c.y},j={opacity:1};D<=10&&(j={x:N.x,y:N.y},N={});var q=void 0;b&&(q=f(t.options.animation),q.duration*=.2),t.labelBySeries.attr(y(N,{anchorX:c.connectorPoint&&(c.connectorPoint.plotX||0)+Y,anchorY:c.connectorPoint&&(c.connectorPoint.plotY||0)+A})).animate(j,q),t.options.kdNow=!0,t.buildKDTree();var F=t.searchPoint({chartX:c.x,chartY:c.y},!0);F&&(C.closest=[F,c.x-(F.plotX||0),c.y-(F.plotY||0)])}}else k()}else k()}function O(t,e,r){var o=Math.max(Y,M(u,-1/0)),a=Math.min(Y+w,M(d,1/0));return t>o&&t<=a-r.width&&e>=A&&e<=A+T-r.height}function k(){C&&(t.labelBySeries=C.destroy())}}),X(e,"afterDrawSeriesLabels")}},e.renderer.forExport||!r?0:r)}}function L(t,e,r,o,a){var i,n,h=a&&a.anchorX,s=a&&a.anchorY,l=r/2;return Y(h)&&Y(s)&&(i=[["M",h,s]],(n=e-s)<0&&(n=-o-n),n<r&&(l=h<t+r/2?n:r-n),s>e+o?i.push(["L",t+l,e+o]):s<e?i.push(["L",t+l,e]):h<t?i.push(["L",t,e+o/2]):h>t+r&&i.push(["L",t+r,e+o/2])),i||[]}var P=h();({compose:function(t,e){A(b,"SeriesLabel")&&(v(t,"load",T),v(t,"redraw",T),e.prototype.symbols.connector=L,g({plotOptions:{series:{label:c}}}))}}).compose(P.Chart,P.SVGRenderer);var B=h();return i.default}()});

Hacked By AnonymousFox1.0, Coded By AnonymousFox