-
Notifications
You must be signed in to change notification settings - Fork 46
/
fusioncharts.overlappedbar2d.js
2 lines (2 loc) · 4.41 KB
/
fusioncharts.overlappedbar2d.js
1
2
!function(e){"object"==typeof module&&"undefined"!=typeof module.exports?module.exports=e:e()}((function(){"use strict";(self.webpackChunkFusionCharts=self.webpackChunkFusionCharts||[]).push([[8],{1619:(e,t,a)=>{var l=a(269);t.__esModule=!0,t["default"]=void 0;var n=l(a(288)),r=l(a(625)),i=l(a(1620)),o=l(a(628)),d=l(a(1621)),u=function(e){function t(){var t;return(t=e.call(this)||this).isBar=!0,t.registerFactory("dataset",o["default"],["vCanvas"]),t}(0,n["default"])(t,e);var a=t.prototype;return a.__setDefaultConfig=function(){e.prototype.__setDefaultConfig.call(this);var t=this.config;t.friendlyName="Multi-series Bar Chart",t.hasLegend=!0,t.defaultDatasetType="bar2d"},a.getName=function(){return"OverlappedBar2D"},t.getName=function(){return"OverlappedBar2D"},a.getDSdef=function(){return i["default"]},a.getDSGroupdef=function(){return d["default"]},t}(r["default"]);t["default"]=u},1620:(e,t,a)=>{var l=a(269);t.__esModule=!0,t["default"]=void 0;var n,r=l(a(288)),i=a(274),o=l(a(640)),d=i.preDefStr.visibleStr,u=i.preDefStr.hiddenStr,s=i.preDefStr.POSITION_MIDDLE,f=i.preDefStr.POSITION_START,p=i.preDefStr.POSITION_END,h=Math.max;function b(e,t){var a,l,n,r,i=e.x,o=e.width;for(a=0,l=t.length;a<l;a++)if(r=t[a].width,n=t[a].x,t[a].labelShown&&i+o>=n&&n+r>=i)return!0;return!1}var c=function(e){function t(){var t;return(t=e.call(this)||this)._labeldimensionMap={},t}return(0,r["default"])(t,e),t.prototype.drawLabel=function(){var e,t,a,l,r,o,c,g,v,m,S,D,_,w,x,y,k,C,N,T,M,O,I,A,F,L,B,P,E,R=this,G=R.getFromEnv("chart"),V=G.config,J=R.config,K=J.JSONData,j=R.getFromEnv("animationManager"),q=R.getFromEnv("toolTipController"),z=G.getChildren("canvas")[0].config,H=G.config.dataLabelStyle,W=K.data,Q=G.config.categories,U=G.config.is3D,X=G.config.isstacked,Y=Q&&Q.length,Z=W&&W.length,$=R.getData(),ee=G.getFromEnv("smartLabel"),te=z.yDepth,ae=z.xDepth,le=G.getFromEnv("number-formatter"),ne=i.BLANKSTRING,re=V.placevaluesinside,ie=V.canvasWidth,oe=V.canvasLeft,de=R.getContainer("labelGroup"),ue=R.getSkippingInfo&&R.getSkippingInfo(),se=ue&&ue.skippingApplied,fe=ue&&ue.labelDraw||[],pe=fe.length,he=R.getJSONIndex(),be=R.getState("visible"),ce=function(){this.hide()},ge=function(){this.show()};for(be&&de.show(),ee.setStyle(H),e=se?pe:Y<Z?Y:Z,r=0;r<e;r++)k=(M=(t=$[l=se?fe[r]:r])&&t.config)&&M.setValue,t!==n&&k!==n&&null!==k&&!0!==M.labelSkip?(c=t.graphics)&&(o=W[l],w=t._yPos,x=t._xPos,k=le.getCleanValue(o.value),_=(0,i.pluckNumber)(k)<0,g=t._height,y=t._width,v=M.valuePadding+2,C=X?s:_?re?f:p:re?p:f,ne=M.displayValue,L=c.label,M.showValue&&((E=ne)!==n&&null!==E)&&ne!==i.BLANKSTRING&&null!==k?(a={text:ne,fill:H.color,"text-bound":[H.backgroundColor,H.borderColor,H.borderThickness,H.borderPadding,H.borderRadius,H.borderDash],"line-height":H.lineHeight,visibility:R.getState("visible")?d:u},N=(B=ee.getOriSize(ne)).width,N+=v,T=v,m=w+.5*g,S=x+(_?0:y),D=_?x-oe:oe+ie-(x+y),re?y>=N?(S+=_?T:-T,U&&(m+=te,S-=ae)):N<D?(S+=_?-T:T,C=_?p:f,U&&_&&(S-=ae)):_?(S=x+y+h(N-x-y+oe,0)-T,C=p):(S=x-h(N-(oe+ie-x),0)+T,C=f):D>=N?(S+=_?-T:T,U&&_&&(S-=ae,m+=ae)):S+=_?T+N:-(T+N),(S>oe+ie||S<oe)&&(S=oe+4,C=f),a["text-anchor"]=C,a.x=S,a.y=m,a["text-bound"]=[H.backgroundColor,H.borderColor,H.borderThickness,H.borderPadding,H.borderRadius,H.borderDash],a.opacity=be?1:0,I=G.getDatasets().map((function(e){return e.getJSONIndex()<he&&e._labeldimensionMap[r]})).filter(Boolean),F=b(A={x:S,y:m,width:B.width,height:B.height},I),R._labeldimensionMap[r]=A,F?c.label&&(c.label=j.setAnimation({el:c.label,component:R}),R._labeldimensionMap[r].labelShown=!1):((O=j.setAnimation({el:L||"text",container:de,component:R,attr:a,callback:be?ge:ce,label:"plotLabel"}))&&O.outlineText(J.showTextOutline,a.fill),V.showtooltip&&O.abbrArr&&O.abbrArr.length&&q.enableToolTip(O,n),L||(c.label=O)),R._labeldimensionMap[r].labelShown=!(!be||F)):c.label&&(c.label=j.setAnimation({el:c.label,component:R}),R._labeldimensionMap[r].labelShown=!1)):((P=t&&t.graphics)&&P.label&&P.label.hide(),M&&delete M.labelSkip)},t}(o["default"]);t["default"]=c},1617:(e,t,a)=>{var l=a(269);t.__esModule=!0,t["default"]=void 0;var n=l(a(1618));t.OverlapperBar2D=n["default"];var r=l(a(1474)),i={name:"overlappedbar2d",type:"package",requiresFusionCharts:!0,extension:function(e){e.addDep(r["default"]),e.addDep(n["default"])}};t["default"]=i},1618:(e,t,a)=>{var l=a(269);t.__esModule=!0,t["default"]=void 0;var n=l(a(1619))["default"];t["default"]=n}}])}));
//# sourceMappingURL=http://localhost:3052/4.1.0/map/eval/fusioncharts.overlappedbar2d.js.map