BIEE中echarts实现多层图-点击按钮显示不同图divid=div1style=width:80px;height:20px;border:1pxsolid#000000;background:#00ccff;color:#ffffff;font-weight:bolder;font-family:微软雅黑;font-size:13px;float:leftonclick=change_list(1)align=center授信通过人数/divdivid=div2style=width:80px;height:20px;border:1pxsolid#000000;background:#00ccff;color:#ffffff;font-weight:bolder;font-family:微软雅黑;font-size:13px;float:leftonclick=change_list(2)align=center保费收入/divdivid=div3style=width:80px;height:20px;border:1pxsolid#000000;background:#00ccff;color:#ffffff;font-weight:bolder;font-family:微软雅黑;font-size:13px;float:leftonclick=change_list(3)align=center说得对/divbr/br/!--为ECharts准备一个具备大小(宽高)的Dom--divid=main1style=height:250px;width:800px;/div!--ECharts单文件引入--scriptsrc=/analyticsRes/echarts/echarts.js/scriptscripttype=text/javascript//路径配置require.config({paths:{echarts:'/analyticsRes/echarts'}});category_list1=[];//水平标签数组,本例用于存放月份sp_list=[];//pre_list=[];pre_list1=[];change=[];category_list1.push('@1');sp_list.push(@2);pre_list.push(@3);change=sp_list;functionchange_list(par){switch(par){case1:change=sp_list;break;case2:change=pre_list;break;case3:change=pre_list1;break;}require(['echarts','echarts/chart/bar',//使用柱状图就加载bar模块,按需加载'echarts/chart/line',//使用柱状图就加载line模块,按需加载],function(ec){//基于准备好的dom,初始化echarts图表varmyChart=ec.init(document.getElementById('main1'));varoption={backgroundColor:'#ffffff',tooltip:{show:true,trigger:'item',},grid:{x:50,x2:50,borderWidth:0},toolbox:{show:true,orient:'vertical',feature:{mark:{show:true},magicType:{show:true,type:['line','bar']},restore:{show:true},saveAsImage:{show:true}}},xAxis:[{type:'category',boundaryGap:true,'axisLabel':{'interval':0,rotate:20,textStyle:{color:'#fff'}},splitLine:{show:false},axisLine:{show:true},axisLabel:{show:true},data:category_list1,}],yAxis:[{type:'value',show:true,name:保费(万元),axisLine:{show:false},axisLabel:{show:false},axisTick:{show:false},splitLine:{show:false},}],series:[{name:保费收入,type:bar,barWidth:25,itemStyle:{normal:{label:{show:true,position:top,textStyle:{color:'#FFFF00'}},borderRadius:2,color:'#578ACA'}},data:change},]};//为echarts对象加载数据myChart.setOption(option);});};require(['echarts','echarts/chart/bar',//使用柱状图就加载bar模块,按需加载'echarts/chart/line',//使用柱状图就加载line模块,按需加载],function(ec){//基于准备好的dom,初始化echarts图表varmyChart=ec.init(document.getElementById('main1'));varoption={backgroundColor:'#ffffff',tooltip:{show:true,trigger:'item',},grid:{x:50,x2:50,borderWidth:0},toolbox:{show:true,orient:'vertical',feature:{mark:{show:true},magicType:{show:true,type:['line','bar']},restore:{show:true},saveAsImage:{show:true}}},xAxis:[{type:'category',boundaryGap:true,'axisLabel':{'interval':0,rotate:20,textStyle:{color:'#fff'}},splitLine:{show:false},axisLine:{show:true},axisLabel:{show:true},data:category_list1,}],yAxis:[{type:'value',show:true,name:保费(万元),axisLine:{show:false},axisLabel:{show:false},axisTick:{show:false},splitLine:{show:false},}],series:[{name:保费收入,type:bar,barWidth:25,itemStyle:{normal:{label:{show:true,position:top,textStyle:{color:'#FFFF00'}},borderRadius:2,color:'#578ACA'}},data:change},]};//为echarts对象加载数据myChart.setOption(option);});/script