{ "pandav:/dchart-pie-multi-radius/index.js": { "cubeCode": "Cube('pandav:/com/ml-pie-image/3.0.12/dchart-pie-multi-radius',['pandav:/com/ml-pie-image/3.0.12/dchart-pie-multi-radius/theme.css','pandav:/com/ml-pie-image/3.0.12/dchart-pie-multi-radius/dchart-pie-with-extension-cord','pandav:/npm/d3/3.5.12','pandav:/npm/dchart-core/2.6.31/util'],function(a,b,c){function d(a,b){var c={paxis:{dx:null,key:'x',label:function(a){var c=parseInt(b&&b['font-size']||10),d=c&&10>c?10:c;return''+a.y+'%'+a.x+''}},innerArr:[.6,.64,.55,.695,.535,.535,.7845,.593,.7347],outerArr:[.73,.91,.99,.72,.79,.679,.81,.824,.7834],\"default-color\":'#1F6086',colors:['#fff','#3590BC','#1F6086','#fff','#69908E','#3590BC','#fff','#22539A','#69908E'],arc:{},fixed:2};this.classNameSpace='pie-multi-radius-chart',c=g.deepMerge(c,b),e.call(this,a,c)}c('pandav:/com/ml-pie-image/3.0.12/dchart-pie-multi-radius/theme.css','');var e=c('pandav:/com/ml-pie-image/3.0.12/dchart-pie-multi-radius/dchart-pie-with-extension-cord'),f=c('pandav:/npm/d3/3.5.12'),g=c('pandav:/npm/dchart-core/2.6.31/util');return d=e.extend(d,{data:function(a){void 0!==a&&null!==a&&(this._data=a);var b=this.options,c=b.pyaxis.key;return this._data.forEach(function(a){a[c].value=g.toNumber(a[c].value)}),this._data},beforeCore:function(){var a=Math.min;this.el&&this.el.classed(this.classNameSpace,!0),e.prototype.beforeRender.call(this);var b=this.options,c=b.arc._radius;b.paxis.dx=b.paxis.dx&&a(b.paxis.dx,b.innerWidth/2)||b.innerWidth/2;var f=g.map(b.innerArr,function(a){return c*a}),h=g.map(b.outerArr,function(a){return c*a});b.arc.innerRadius=function(a,b){return b>f.length?0:f[b]},b.arc.outerRadius=function(a,b){return b>h.length?0:h[b]};var i=this.getComs('background','bg'),d=i.select('.bg-outer-circle')[0][0]?i.select('.bg-outer-circle'):i.append('circle').attr({class:'bg-outer-circle'}),j=i.select('.bg-inner-circle')[0][0]?i.select('.bg-inner-circle'):i.append('circle').attr({class:'bg-inner-circle'});d.attr({cx:b.innerWidth/2,cy:b.innerHeight/2,r:c+2}),j.attr({cx:b.innerWidth/2,cy:b.innerHeight/2,r:c-2});var k=this.data(),l=g.sumBy(k,''.concat(b.pyaxis.key,'.value'));b.paxis.label=b.paxis.nlabel||function(a){var c=parseInt(b&&b['font-size']||10),d=c&&10>c?10:c;return''+(100*a.y.value/l).toFixed(b.fixed||2)+'%'+a.x+''}},beforeRender:function(){this.renderBG('bg',this.svg[0][0],{});this.beforeCore()},updateBeforeRender:function(){d.prototype.beforeCore.call(this)},_labelCordAdjust:function(a){a.forEach(function(a){return a&&a.position&&a.position.length?void(a.position[1].y=a.position[2].y):null})}}),a.exports=d,a.exports});", "requires": [ "pandav:/dchart-pie-multi-radius/theme.css.js", "pandav:/dchart-pie-multi-radius/dchart-pie-with-extension-cord.js" ], "buildLevel": 3, "outputDir": "/com/ml-pie-image/3.0.12/dchart-pie-multi-radius", "outputPath": "/com/ml-pie-image/3.0.12/dchart-pie-multi-radius/index.js", "fileName": "/dchart-pie-multi-radius/index.js" }, "pandav:/index.js": { "cubeCode": "Cube('pandav:/com/ml-pie-image/3.0.12',['pandav:/npm/bcore/0.0.22/event','pandav:/npm/lodash/4.17.11','pandav:/npm/jquery/2.1.4','pandav:/com/ml-pie-image/3.0.12/pie','pandav:/com/legend/0.1.5','pandav:/com/ml-pie-image/3.0.12/utils','pandav:/com/ml-pie-image/3.0.12/defaultConfig'],function(a,b,c){var d=c('pandav:/npm/bcore/0.0.22/event'),e=c('pandav:/npm/lodash/4.17.11'),f=c('pandav:/npm/jquery/2.1.4'),g=c('pandav:/com/ml-pie-image/3.0.12/pie'),h=c('pandav:/com/legend/0.1.5'),i=c('pandav:/com/ml-pie-image/3.0.12/utils'),j=c('pandav:/com/ml-pie-image/3.0.12/defaultConfig');return a.exports=d.extend(function(a,b){this.config=e.cloneDeep(j),this.container=f(a).css('padding','10px 0'),this.chart=null,this.legend=null,this.init(b)},{init:function(a){var b=a&&a.options||a;this.apis=b.apis;var c=this.mergeConfig(b),d=c.chart.legend,i=d.layout.loc.split('-')[0];this.chartDom=f('
'),this.legendDom=f('
'),'bottom'===i?(this.container.append(this.chartDom),this.container.append(this.legendDom)):(this.container.append(this.legendDom),this.container.append(this.chartDom)),this.legend=new h(this.legendDom[0],d),this.chartDom.height(this.container.height()-(d.show&&this.legendDom.height()||0)),this.chart=new g(this.chartDom[0],e.cloneDeep(c)),this.legendDom.css('display',d.show&&'block'||'none'),this._bindEvent()},updateStyle:function(){},data:function(a){return a&&(this._data=e.clone(a)),this._data.length&&this._data.forEach(function(a){a.y=e.toNumber(a.y)}),this._data},render:function(a,b){var c=b&&b.options||b,d=this.mergeConfig(c);if(a=this.data(a),a&&a.length){var f=d.chart.legend;d.series.series=i.fixArray4cycle(d.series.series,a.length),e.map(d.series.series,function(b,c){b.showName=a[c]?a[c].x:null}),this.legend.render(d.series.series,f);var g=this.container.height()-(f.show&&this.legendDom.height()||0);this.chartDom.height(g),this.config.height=g,a&&this.chart.render(a,d),this._cfg=d}},setColors:function(){},mergeConfig:function(a){return a?(this.config.theme=e.defaultsDeep(a.theme||{},this.config.theme),this.setColors(),a.series&&(this.config.series=a.series),this.config=e.defaultsDeep(a||{},this.config),this.config):this.config},resize:function(a,b){this.chart.resize(a,b-(this.config.chart.legend.show&&this.legendDom.outerHeight()||0)-20)},updateLegendLayout:function(a){var b=this.config.chart.legend;if(b.show!==a.show&&(this.legendDom.css('display',a.show&&'block'||'none'),this.config.chart.height=this.container.height()-(a.show&&this.legendDom.height()||0)),b.textarea.fontSize!==a.textarea.fontSize&&(this.legendDom.find('.legend-item').css('fontSize',a.textarea.fontSize),this.config.chart.height=this.container.height()-(a.show&&this.legendDom.height()||0)),JSON.stringify(b.layout.margin)!==JSON.stringify(a.layout.margin)){var c=a.layout.margin;this.legendDom.find('.legend-item').css('margin',c.vertiInterval+'px '+c.horiInterval+'px'),this.config.chart.height=this.container.height()-(a.show&&this.legendDom.height()||0)}var d=b.layout.loc.split('-')[0],e=a.layout.loc.split('-')[0];d!==e&&('top'===e?this.container[0].appendChild(this.chartDom[0]):'bottom'===e&&this.container[0].appendChild(this.legendDom[0])),this.render(null,{chart:{legend:a}})},clear:function(){this.chart&&this.chart.clear(),this.legend&&e.isFunction(this.legend.clear)&&this.legend.clear()},destroy:function(){this.chart&&this.chart.destroy(),this.chart=null,this.legend&&this.legend.destroy(),this.legend=null,this.chartDom=null,this.legendDom=null,this.container&&this.container.empty(),this._data=null},startAnimate:function(){if(!(this.chart&&this.chart.chart))return!1;if(this._cfg){this.chart.chart.clearAllAnimation();var a=this._cfg.others.animation,b=a.update,c=a.enter,d=a.animationUpdateFromPrevious;b.animationUpdateFromPrevious=!1;var e=b.animationDurationUpdate;b.animationDurationUpdate=c.animationDuration,this.chart.render(),b.animationDurationUpdate=e,b.animationUpdateFromPrevious=d}},clearAnimate:function(){this.chart&&this.chart.chart&&this.chart.chart.resumeToAnimationEnd()},_bindEvent:function(){var a=this;if(this.chart&&this.chart.chart){var b=this.chart.chart;['click'].forEach(function(c){b.on(c,function(b){var d=b.data;return a.emit(c,d)})})}},highlight:function(){var a=0a.length)&&(b=a.length);for(var c=0,e=Array(b);cs){var t=[r,s];s=t[0],r=t[1]}var u,v=k(r-s),x=0,y=b,z=c.map(function(a){var b=a.position[2];return b.y>x&&(x=b.y),b.yv&&(v=x-r);q;)for(z.forEach(function(a){var b=(j.apply(y,a.targets)+h.apply(y,a.targets))/2;a.pos=h(j(h(h(y,b-a.size/2)),v-a.size/2),-p/2)}),q=!1,u=z.length;u--;)if(0B.pos&&(A.size+=B.size,A.targets=A.targets.concat(B.targets),A.pos+A.size>v&&(A.pos=v-A.size),z.splice(u,1),q=!0)}u=0,z.forEach(function(a){var b=r;a.targets.forEach(function(){c[u].position[2].y=a.pos+b,b+=p,u++})}),w.isFunction(n)&&n(c,l,m,g,o)}function t(a,b,c,k,l,m,n){var o,p=(a.startAngle+a.endAngle)/2||1;o='function'==typeof c?c(a,b):c;var q=[{x:o*g(p),y:-o*f(p)},{x:k*g(p),y:-k*f(p)},{x:p>e?-l:l,y:-k*f(p)}];return a.label&&(q[2].y=a.label,q[1].y=j(h(-m-n/2,a.label),m+n/2)),q}var u=c('pandav:/npm/dchart-core/2.6.31/pie/pie'),v=c('pandav:/npm/d3/3.5.12'),w=c('pandav:/npm/dchart-core/2.6.31/util');return r=u.extend(r,{beforeRender:function(){u.prototype.beforeRender.call(this);var a=this.options;a.arc._radius=a.arc.radius||j(a.innerHeight,a.innerWidth)/2-20,a.paxis._dr=a.paxis.dr||a.arc._radius+20,a.animation&&(this.removeAllListeners('end.animate'),this.on('end.animate',function(b){var c=b.dom,b=b.data,h=a.paxis._dr,j=a.paxis.dx,k=a.arc.outerRadius||a.arc._radius,l=(b.startAngle+b.endAngle)/2;'function'==typeof k&&(k=k(d,i)),c.append('path').attr({class:'serie-cord',d:function(){var a=[{x:k*g(l),y:-k*f(l)},{x:h*g(l),y:-h*f(l)},{x:l>e?-j:j,y:-h*f(l)}];return w.pos2Path(a,!0)}}).style({fill:'none',stroke:'#fff'});var m=c.select('.serie-label');m.attr('transform','translate('+(l>e?-j-m.node().getBBox().width:j)+', '+-h*f(l)+')')}))},updateBeforeRender:function(){r.prototype.beforeRender.call(this)},afterRender:function(){u.prototype.afterRender.call(this);var a=this.options,b=a.paxis._dr,c=a.paxis.dx,g=a.arc.outerRadius||a.arc._radius,h=this.data(),j={right:[],left:[]},k=this.series.select('.serie-label').node().getBBox(),m=k||{},o=m.height,p=m.width,q=a.innerHeight/2,r=this.series.selectAll('.series-pies .serie').data();r.forEach(function(a,h){var k=(a.startAngle+a.endAngle)/2||1,l=q-b*f(k);k<=e?(j.right.length&&l-o*f(k)j.left[j.left.length-1]&&(l=j.left[j.left.length-1]-o),a.isRight=!1,j.left.push(l)),a.label=l-q,a.position=t(a,h,g,b,c,q,o)});var x=j.right,y=x.length;r.forEach(function(a,b){return a.__index__=b});var z=r.filter(function(a){return a.isRight}).sort(function(c,a){return c.position[2].y-a.position[2].y}),A=r.filter(function(a){return!a.isRight}).sort(function(c,a){return c.position[2].y-a.position[2].y}),B={dr:b,labelSize:{width:p,height:o},canvasSize:{startY:-q,endY:q},center:{x:0,y:0},labelCordAdjust:this._labelCordAdjust.bind(this)};s(Object.assign({},B,{labels:z,isRight:!0})),s(Object.assign({},B,{labels:A,isRight:!1})),r=[].concat(l(A),l(z)).sort(function(c,a){return c.__index__-a.__index__});var C=this.series.select('.series-cords')[0][0]?this.series.select('.series-cords'):this.series.insert('g','.series-pies').attr('class','series-cords');C.attr('transform','translate('+a.innerWidth/2+','+a.innerHeight/2+')');var D=this.series.select('.series-labels'),E=C.selectAll('.serie-cord').data(this._pieData),F=function(b,c){var e=b.position;this.attr({d:w.pos2Path(e,!0)}).style({stroke:a.colors[c]&&a.colors[c].res||a.defaultColor.res||'#fff'}),v.select(D.selectAll('.serie-label')[0][c]).transition().duration(a.animation?a.animationDuration:0).attr({transform:'translate('+e[2].x+', '+e[2].y+')'}).style('text-anchor',function(){return c.domain{display:none}.pie-multi-radius-chart .con-svg .axis .tick line{stroke:#fff}.pie-multi-radius-chart .bg-inner-circle,.pie-multi-radius-chart .bg-outer-circle{fill:none;stroke:#fff}.pie-multi-radius-chart .con-svg .series .serie-cord{stroke:#fff}\";return m.exports});", "requires": [], "buildLevel": 4, "outputDir": "/com/ml-pie-image/3.0.12/dchart-pie-multi-radius", "outputPath": "/com/ml-pie-image/3.0.12/dchart-pie-multi-radius/theme.css.js", "fileName": "/dchart-pie-multi-radius/theme.css" }, "pandav:/initFilterScript/JArray.js": { "cubeCode": "Cube('pandav:/com/ml-pie-image/3.0.12/initFilterScript/JArray',[],function(a){return a.exports});", "requires": [], "buildLevel": 0, "outputDir": "/com/ml-pie-image/3.0.12/initFilterScript", "outputPath": "/com/ml-pie-image/3.0.12/initFilterScript/JArray.js", "fileName": "/initFilterScript/JArray.js" }, "pandav:/initFilterScript/JObject.js": { "cubeCode": "Cube('pandav:/com/ml-pie-image/3.0.12/initFilterScript/JObject',[],function(a){return a.exports});", "requires": [], "buildLevel": 0, "outputDir": "/com/ml-pie-image/3.0.12/initFilterScript", "outputPath": "/com/ml-pie-image/3.0.12/initFilterScript/JObject.js", "fileName": "/initFilterScript/JObject.js" }, "pandav:/utils.js": { "cubeCode": "Cube('pandav:/com/ml-pie-image/3.0.12/utils',['pandav:/npm/lodash/4.17.11'],function(a,b,c){function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var e=c('pandav:/npm/lodash/4.17.11');return a.exports={threeD2Two:function(a,b,c,f,g,h){if(void 0===b||void 0===c||void 0===f||void 0===g)return a;g=e.map(g,function(a){return a+='',a});var i={},j=[],k=[],l=e.groupBy(a,function(a){var c=a[b];return i[c]||(i[c]=!0),a[b]});j=e.uniq(e.map(a,b)),h&&j.sort(h);var n={y:'z',z:'y'};return j.length&&j.forEach(function(a){var h=l[a],i=e.cloneDeep(l[a][0]);i[b]=a,e.map([].concat(c),function(e){i[e]=g.map(function(e){var g;return{value:0,__isNull:!0,data:(g={},d(g,b,a),d(g,c,0),d(g,f,e),g)}})}),h.sort(function(c,a){return e.indexOf(h,c[f]+'')-e.indexOf(h,a[f]+'')}),e.map(h,function(a){var b=e.indexOf(g,a[f]+'');0<=b&&void(e.isArray(c)?e.map(c,function(c){i[c][b]={value:a[c],__isNull:!1,data:e.omit(a,n[c])}}):i[c][b]={value:a[c],__isNull:!1,data:e.omit(a,n[c])})}),k.push(i)}),k},twoD2Three:function(a,b,c,d,f){if(void 0===b||void 0===c||void 0===d||void 0===f)return a;var g=[];return e.map(a,function(a){e.map(a.y,function(e,h){if(f[h]){var i={};i[b]=a[b],i[c]=e,i[d]=f[h],g.push(i)}})}),g},getSeriesValue:function(a,b){return e.uniq(e.map(a,b))},fixSeries4cycle:function(a,b,c,d,f){var g=e.uniq(e.map(b,c)),h=this.fixArray4cycle(a,g.length);return h.length&&h.forEach(function(b,c){var e=a[c]?a[c][d]||g[c]:g[c];f&&f(b,e)}),h},fixArray4cycle:function(a,b){if(b<=a.length)return a;var c=parseInt(b/a.length),d=b%a.length,f=e.concat.apply(this,this.fillArr(a,c));return f=e.concat(f,e.slice(a,0,d)),f},fillArr:function(a,b){for(var c=[],d=0;d'+a.x+'',f=''+(n.real&&d.toFixed(n.decimal)||(c?(100*(d/c)).toFixed(n.decimal):0)+'%')+'';return(n.show?f:'')+(o.show&&e||'')};var r=l.animation,s=r.enter,t=r.update,u=r.setting;return Object.assign(g,Object.assign({},s)),Object.assign(g,Object.assign({},t)),Object.assign(g,Object.assign({},u)),g.animation=l.animation.show,g.tooltip=f(a.others.tooltip,b,a),g}function e(a){var b=a.serie,c=a.color,d=a.value,e=a.key;return'
\\n '+(e?e+': ':'')+d+'
'}function f(a,b,c){if(!a)return{};var d=h.cloneDeep(a),f=a.trigger,g=a.textStyle,i=a.bgBox;f&&f.action&&(d.triggerMethod=f.action),d.trigger='item',a.beforeFormat&&(d.beforeFormat=a.beforeFormat);var j=c.series.series;if(d.formatter=function(a,d){var f='
',g=c.chart.numericalLabel,h=j[d],k=b.map(function(a){return a.y.value}).reduce(function(b,c){return b+c},0),i=(k?(100*(a.y.value/k)).toFixed(g.decimal):0)+'%';return a.y&&(f+=e({color:h.color,key:a.x,value:a.y.value+' ('+i+')'})),f},void 0!==a.enterFocus&&(d.enterFocus=a.enterFocus),void 0!==a.hideDelay&&(d.hideDelay=a.hideDelay),g&&(d.color=g.color,d.fontSize=g.fontSize+'px',d.fontFamily=g.fontFamily,d.fontWeight=g.fontWeight),i){var k=i.offset,l=i.border,m=i.customSize;d.backgroundColor=i.backgroundColor,k&&void 0!==k.xOffset&&(d.xOffset=k.xOffset),k&&void 0!==k.yOffset&&(d.yOffset=k.yOffset),m&&(d.autoSize=!m.show,d.width=m.width,d.height=m.height),l&&(l.borderColor&&(d.borderColor=l.borderColor),void 0!==l.borderWidth&&(d.borderWidth=l.borderWidth))}return d}var g=c('pandav:/npm/bcore/0.0.22/event'),h=c('pandav:/npm/lodash/4.17.11'),i=c('pandav:/npm/jquery/2.1.4'),j=c('pandav:/com/ml-pie-image/3.0.12/dchart-pie-multi-radius'),k=c('pandav:/com/ml-pie-image/3.0.12/utils');return a.exports=g.extend(function(a,b){this.config={theme:{},chart:{background:'transparent'},legend:{},series:[{value:'1',color:'#2F8FBE'}],tooltip:{show:!0,trigger:'item',triggerMethod:'hover',beforeFormat:null,enterFocus:!0,hideDelay:300,textStyle:{color:'#fff',fontSize:14,fontFamily:'Microsoft Yahei',fontWeight:'normal'},bgBox:{color:'rgba(0, 0, 0, 0.65)',padding:10,xOffset:6,yOffset:10,customSize:{show:!1,width:300,height:150},borderColor:'#333',borderWidth:0}}},this.container=i(a),this._width=this.container.width(),this.init(b)},{init:function(a){this.apis=a.apis;var b=this.mergeConfig(a);this.chart=new j(this.container[0],b.chart)},isSafeNumber:function(a){return h.isNumber(a)&&!h.isNaN(a)&&h.isFinite(a)?a:null},render:function(a,b){var c=this.mergeConfig(b);a=this.data(a),a&&a.length&&(this.chart.render(a,d(c,a,this._width,c.height)),this.updateStyle())},updateStyle:function(){var a=this.config,b=this.chart.el;if(b){var c=h.sumBy(this._data,'y');0===c&&b.select('.series-cords').selectAll('.serie-cord').style('stroke','none'),b.selectAll('.serie-bg').style('stroke','none'),b.select('.con-svg').style('background','transparent'),b.select('.background').style('display','none'),b.selectAll('.series-pies .serie').style('stroke','none');var d=a.chart.labelLine.show;b.select('.series-cords').style('display',d||h.isUndefined(d)?'block':'none');var e=this.chart.options,f=this.chart.svg.select('.img')[0][0]?this.chart.svg.select('.img'):this.chart.svg.append('image').attr({class:'img'}),g=a.chart.pie,i=g.imageOpacity,j=g.imagePreserveAspect,k=g.imageScale,l=g.imageSize,m=j||h.isUndefined(j),n=(m?k:l.width)||.2,o=(m?k:l.height)||.2;f.attr({\"xlink:href\":function(){return a.chart.pie.image||''},x:.5*e.innerWidth*(1-.5*n),y:.5*e.innerHeight*(1-.5*o),width:.5*e.innerWidth*n,height:.5*e.innerHeight*o,opacity:i||1,preserveAspectRatio:m?'xMidYMid meet':'none'})}},setColors:function(){},hasS:function(a){var b=0;return h.map(a,function(a){return void 0!==a.s&&b++}),b===a.length||0!==b&&!1},data:function(a){return a&&(this.__data=h.clone(a)),this._data=this.hasS(this.__data)?k.threeD2Two(this.__data,'x','y','s',k.getSeriesValue(this.config.series.series,'value')):h.cloneDeep(this.__data).map(function(a){return a.y={value:a.y,data:h.clone(a)},a}),this._data},mergeConfig:function(a){return a?(this.config.theme=h.defaultsDeep(a.theme||{},this.config.theme),this.setColors(),a.series&&(this.config.series=a.series),this.config=h.defaultsDeep(a||{},this.config),this.config):this.config},resize:function(a,b){this._width=a,this.config.height=b,this.render()},clear:function(){this.chart&&this.chart.empty()},destroy:function(){this.chart&&this.chart.off(),this.chart&&this.chart.destroy(),this._data=this.__data=null}}),a.exports});", "requires": [ "pandav:/dchart-pie-multi-radius/index.js", "pandav:/utils.js" ], "buildLevel": 2, "outputDir": "/com/ml-pie-image/3.0.12", "outputPath": "/com/ml-pie-image/3.0.12/pie.js", "fileName": "/pie.js" } }