{ "pandav:/utils.js": { "cubeCode": "Cube('pandav:/com/bar-capsule/3.0.15/utils',['pandav:/npm/lodash/4.6.1'],function(a,d,e){function g(a,d,e){return d in a?Object.defineProperty(a,d,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[d]=e,a}function i(a){for(var f=[],d=0,p=a.length;d=a.length){var g=a[1];return e.x+','+e.y+(g?'L'+g.x+','+g.y:'')}a.forEach(function(a){d&&d.x===a.x&&d.y===d.y||(f.push(a.x),f.push(a.y),d=a)});i(f,!1,[[0,0],[1,1]])},getDisplayValueFromData:function(a){return a&&f.isNumber(+a)&&''+a},setAutoMargin:function(a){if(!a)return null;var d=a.margin||a.chart.margin;if(!d)return null;var e=d.top,f=d.right;d.top=e||a.yaxis.show&&a.yaxis.textShow&&a.yaxis.label&&3*a.yaxis.fontSize||0,d.right=f||a.xaxis.show&&a.xaxis.textShow&&a.xaxis.label&&a.xaxis.label.length&&2*a.xaxis.fontSize||0}},a.exports});", "requires": [], "buildLevel": 3, "outputDir": "/com/bar-capsule/3.0.15", "outputPath": "/com/bar-capsule/3.0.15/utils.js", "fileName": "/utils.js" }, "pandav:/legend.js": { "cubeCode": "Cube('pandav:/com/bar-capsule/3.0.15/legend',['pandav:/npm/bcore/0.0.18/event','pandav:/npm/jquery/2.1.4','pandav:/npm/lodash/4.6.1'],function(a,b,c){function d(a){\"@babel/helpers - typeof\";return d='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},d(a)}function e(a){if('string'==typeof a)return a;if('object'===('undefined'==typeof a?'undefined':i(a)))if(a.hasOwnProperty('type')){if('flat'===a.type)return a.value;if('linearGradient'===a.type){var b=a.value,c=b.angle,d=b.stops,e=d&&Array.isArray(d)&&d.map(function(a){return[a.color,a.offset+'%'].join(' ')}).join(', ');return e?'linear-gradient('+(h.toNumber(c||0)+90)+'deg, '+e+')':''}}else{if('single'===a.style)return a.value;if('double'===a.style)return'linear-gradient('+((h.toNumber(a.angle)||0)+90)+'deg, '+a.from+', '+a.to+')'}}var f=c('pandav:/npm/bcore/0.0.18/event'),g=c('pandav:/npm/jquery/2.1.4'),h=c('pandav:/npm/lodash/4.6.1'),i='function'==typeof Symbol&&'symbol'===d(Symbol.iterator)?function(b){return d(b)}:function(b){return b&&'function'==typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?'symbol':d(b)},j=h.template('
px <%= hori %>px; display: inline-flex; align-items:center;color:<%= fontColor%>;font-weight:<%= fontWeight%>; font-size:<%= fontSize%>px;\">; width: <%= itemWidth %>px; height: <%= itemHeight %>px;\"><%= content %>
');return a.exports=f.extend(function(a,b){this.config={theme:{},innerStyle:null},this.container=g(a),this.apis=b.apis,this._data=null,this.init(b)},{init:function(a){this.mergeConfig(a)},render:function(a,b){a=this.data(a);var c=this.mergeConfig(b),d=c.textarea,f=e(d.color),g='';a&&a.length&&a.forEach(function(a){g+=j({color:e(a.color),itemWidth:c.textarea.fontSize,itemHeight:c.textarea.fontSize,content:a.showName,fontColor:f,fontSize:d.fontSize,fontWeight:d.fontWeight,verti:c.layout.margin.vertiInterval/2,hori:c.layout.margin.horiInterval/2})});var h=c.layout.loc.split('-');this.container.html(g).css({textAlign:h[1],fontFamily:''+c.textarea.fontFamily}),c.innerStyle&&this.container.css(c.innerStyle)},resize:function(a,b){this.updateLayout(a,b)},data:function(a){return a&&(this._data=a),this._data},mergeConfig:function(a){return a?(this.config.theme=h.defaultsDeep(a.theme||{},this.config.theme),this.config=h.defaultsDeep(a||{},this.config),this.config):this.config},clear:function(){this.container&&this.container.empty()},destroy:function(){this.container&&this.container.empty(),this._data=null}}),a.exports});", "requires": [], "buildLevel": 3, "outputDir": "/com/bar-capsule/3.0.15", "outputPath": "/com/bar-capsule/3.0.15/legend.js", "fileName": "/legend.js" }, "pandav:/index.js": { "cubeCode": "Cube('pandav:/com/bar-capsule/3.0.15',['pandav:/npm/bcore/0.0.18/event','pandav:/npm/jquery/2.1.4','pandav:/npm/lodash/4.6.1','pandav:/com/bar-capsule/3.0.15/bar','pandav:/com/bar-capsule/3.0.15/legend','pandav:/com/bar-capsule/3.0.15/utils'],function(a,b,c){var d=c('pandav:/npm/bcore/0.0.18/event'),e=c('pandav:/npm/jquery/2.1.4'),f=c('pandav:/npm/lodash/4.6.1'),g=c('pandav:/com/bar-capsule/3.0.15/bar'),h=c('pandav:/com/bar-capsule/3.0.15/legend'),i=c('pandav:/com/bar-capsule/3.0.15/utils'),j={chart:{margin:{top:0,bottom:0,left:0,right:20},loadAmount:2e3,bar:{hullPadding:1,paddingColor:'rgba(0,0,0,0)',color:'rgba(255,255,255,0.2)',thickness:1},numericalLabel:{show:!1,textStyle:{fontFamily:'Microsoft Yahei',fontWeight:'normal',fontSize:10,color:'#000'},pos:'center',emptyData:!1},legend:{show:!0,textarea:{fontFamily:'Microsoft Yahei',fontWeight:'normal',fontSize:10,color:'rgba(255,255,255,0.5)'},layout:{margin:{horiInterval:8,vertiInterval:0},loc:'bottom-center'}}},axis:{xaxis:{isShow:!0,boundaryGap:.6,interval:.6,label:{show:!0,format:'%m\\u6708',textarea:{fontFamily:'Microsoft Yahei',fontWeight:'normal',fontSize:10,color:'rgba(255,255,255,0.5)'},display:{angle:'45',amount:0,unit:''}},axisLine:{show:!0,color:'rgba(255,255,255,0.5)'},grid:{show:!1,color:'#fff'}},yaxis:{isShow:!0,extent:{max:'dataMax'},label:{show:!0,format:'.0f',textarea:{fontFamily:'Microsoft Yahei',fontWeight:'normal',fontSize:10,color:'rgba(255,255,255,0.6)'},display:{amount:6,unit:'\\u5355\\u4F4D'}},axisLine:{show:!0,color:'rgba(255,255,255,0.5)'},grid:{show:!1,color:'#434343'}}},series:{series:[{serieName:'\\u7CFB\\u52171',color:'#00baff'},{serieName:'\\u7CFB\\u52172',color:'#3de7c9'},{serieName:'\\u7CFB\\u52173',color:'#ffffff'}]},others:{animation:{show:!0,setting:{animationEasing:'cubicInOut',animationAfterPreviousSeries:!1},enter:{animationDuration:1e3},update:{animationDurationUpdate:300,animationUpdateFromPrevious:!0}},tooltip:{show:!0,hideDelay:100,trigger:{type:'item',action:'hover'},textStyle:{fontFamily:'Microsoft Yahei',fontWeight:'normal',fontSize:14,color:'#fff'},axisPointer:{show:!0,_type:'line',lineStyle:{width:1,_type:'solid',color:'#f00'}},bgBox:{backgroundColor:'rgba(0, 0, 0, 0.65)',customSize:{show:!1,width:150,height:50},padding:10,offset:{xOffset:6,yOffset:10},border:{borderWidth:0,borderColor:'#333'}}}}};return a.exports=d.extend(function(a,b){this.config=f.cloneDeep(j),this.container=e(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=e('
'),this.legendDom=e('
'),'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.legend.render(c.series.series,d),this.chartDom.height(this.container.height()-(d.show&&this.legendDom.height()||0)),this.chart=new g(this.chartDom[0],f.cloneDeep(c)),this.legendDom.css('display',d.show&&'block'||'none'),this._bindEvent()},render:function(a,b){var c=b&&b.options||b,d=this.mergeConfig(c);if(a=this.data(a),a&&a.length){var e=i.conflictConfigWithData(d,a,[{configField:{type:'array',field:'serieName',parent:'series.series'},dataField:'s',priority:'config',newConfigField:'showName'}]);this.legend.render(e.series.series,e.chart.legend),this.config.chart.height=this.container.height()-(this.config.chart.legend.show&&this.legendDom.height()||0),this.chartDom.height(this.config.chart.height),a&&this.chart.render(a,e),this._cfg=e}},updateStyle:function(){},setColors:function(){},data:function(a){return a&&(this._data=f.clone(a),this._data.length&&this._data.forEach(function(a){a.y=f.toNumber(a.y)})),this._data},mergeConfig:function(a){return a?(this.config.theme=f.defaultsDeep(a.theme||{},this.config.theme),this.setColors(),a.series&&(this.config.series=a.series),this.config=f.defaultsDeep(a||{},this.config),this.config):this.config},resize:function(a,b){var c=b-(this.config.chart.legend.show&&this.legendDom.outerHeight()||0)-20;this.chartDom.height(b),this.mergeConfig({chart:{width:a,height:c}}),this.chart.resize(a,c)},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&&f.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&&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=b.animationUpdateFromPrevious;b.animationUpdateFromPrevious=!1;var e=b.animationDurationUpdate;b.animationDurationUpdate=c.animationDuration,this.chart.render(this.data(),this._cfg),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=0