{ "pandav:/defaultConfig.js": { "cubeCode": "Cube('pandav:/com/ml-bar-hori-group/3.0.18/defaultConfig',[],function(a){return a.exports={chart:{margin:{top:0,bottom:0,left:20,right:20},loadAmount:2e3,bar:{decorate:{line:{color:'rgba(255,255,255,0.5)'},shape:{fill:'#00baff',stroke:'#00baff'}}},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:'top-right'}}},axis:{xaxis:{isShow:!0,extent:{min:'auto',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:!1,color:'rgba(255,255,255,0.5)'},grid:{show:!1,color:'#434343'}},yaxis:{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:'0',amount:0,unit:''}},axisLine:{show:!1,color:'rgba(255,255,255,0.5)'},grid:{show:!1,color:'#fff'}}},series:{series:[{serieName:'\\u7CFB\\u52171',color:'#00baff'},{serieName:'\\u7CFB\\u52172',color:'#3de7c9'}]},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'}}}}},a.exports});", "requires": [], "buildLevel": 3, "outputDir": "/com/ml-bar-hori-group/3.0.18", "outputPath": "/com/ml-bar-hori-group/3.0.18/defaultConfig.js", "fileName": "/defaultConfig.js" }, "pandav:/index.js": { "cubeCode": "Cube('pandav:/com/ml-bar-hori-group/3.0.18',['pandav:/npm/bcore/0.0.22/event','pandav:/npm/jquery/2.1.4','pandav:/npm/lodash/4.17.11','pandav:/com/maliang-utils/0.0.21','pandav:/com/ml-bar-hori-group/3.0.18/bar','pandav:/com/legend/0.1.5','pandav:/com/ml-bar-hori-group/3.0.18/defaultConfig'],function(a,b,c){var d=c('pandav:/npm/bcore/0.0.22/event'),e=c('pandav:/npm/jquery/2.1.4'),f=c('pandav:/npm/lodash/4.17.11'),g=c('pandav:/com/maliang-utils/0.0.21'),h=c('pandav:/com/ml-bar-hori-group/3.0.18/bar'),i=c('pandav:/com/legend/0.1.5'),j=c('pandav:/com/ml-bar-hori-group/3.0.18/defaultConfig');return a.exports=d.extend(function(a,b){this.config=f.cloneDeep(j)||{theme:{},chart:{background:'transparent',margin:{top:6,bottom:0,left:50,right:40}},axis:{xaxis:{tickSize:2},yaxis:{tickSize:2}},legend:{innerStyle:{\"line-height\":1.3}},series:[{value:'1',color:'#2F8FBE'}],animation:{show:!0,animationDuration:1e3,animationEasing:'cubicInOut',animationDurationUpdate:300,animationUpdateFromPrevious:!0,animationAfterPreviousSeries:!1}},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,g=d.layout.loc.split('-')[0];this.chartDom=e('
'),this.legendDom=e('
'),'bottom'===g?(this.container.append(this.chartDom),this.container.append(this.legendDom)):(this.container.append(this.legendDom),this.container.append(this.chartDom)),this.legend=new i(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 h(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=g.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)),a.show){if(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))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(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