123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500 |
- var dom = document.getElementById("firsttab1");
- var dom2 = document.getElementById("firsttab2");
- var dom3 = document.getElementById("firsttab3");
- var dom4 = document.getElementById("firsttab4");
- var dom5 = document.getElementById("firsttab5");
- var dom6 = document.getElementById("firsttab6");
- var dom7 = document.getElementById("firsttab7");
- var dom8 = document.getElementById("firsttab8");
- var dom9 = document.getElementById("charbar");
- var dom10 = document.getElementById("charbar2");
- var dom11 = document.getElementById("secondRighttextChar");
- var dom12 = document.getElementById("secondRighttextChar1");
- var dom13 = document.getElementById("secondChar");
- var dom14 = document.getElementById("contentChar1");
- var dom15 = document.getElementById("contentChar2");
- var myChart = echarts.init(dom,"wonderland");
- var myChart2= echarts.init(dom2,"wonderland");
- var myChart3 = echarts.init(dom3,"wonderland");
- var myChart4 = echarts.init(dom4,"wonderland");
- var myChart5 = echarts.init(dom5,"wonderland");
- var myChart6= echarts.init(dom6,"wonderland");
- var myChart7 = echarts.init(dom7,"wonderland");
- var myChart8 = echarts.init(dom8,"wonderland");
- var myChart9 = echarts.init(dom9,"wonderland");
- var myChart10 = echarts.init(dom10,"wonderland");
- var myChart11 = echarts.init(dom11,"wonderland");
- var myChart12 = echarts.init(dom12,"wonderland");
- var myChart13 = echarts.init(dom13,"wonderland");
- var myChart14 = echarts.init(dom14,"wonderland");
- var myChart15 = echarts.init(dom15,"wonderland");
- window.addEventListener("resize", () => {
- this.myChart.resize();
- this.myChart2.resize();
- this.myChart3.resize();
- this.myChart4.resize();
- this.myChart5.resize();
- this.myChart6.resize();
- this.myChart7.resize();
- this.myChart8.resize();
- this.myChart9.resize();
- this.myChart10.resize();
- this.myChart11.resize();
- this.myChart12.resize();
- this.myChart13.resize();
- this.myChart14.resize();
- this.myChart15.resize();
- });
- option = {
- tooltip: {
- trigger: 'item',
- formatter: "{a} <br/>{b}: {c} ({d}%)"
- },
- series: [
- {
- name:'访问来源',
- type:'pie',
- radius: ['40%', '80%'],
- avoidLabelOverlap: false,
- label: {
- normal: {
- show: false,
- position: 'center'
- },
- emphasis: {
- show: true,
- textStyle: {
- fontSize: '30',
- fontWeight: 'bold'
- }
- }
- },
- labelLine: {
- normal: {
- show: false
- }
- },
- data:[
- {value:2.5, name:'2.5',itemStyle:{
- color:"#0268e8"
- }}
- ]
- }
- ]
- };
- if (option && typeof option === "object") {
- myChart.setOption(option, true);
- }
- if (option && typeof option === "object") {
- myChart2.setOption(option, true);
- }
- if (option && typeof option === "object") {
- myChart3.setOption(option, true);
- }
- if (option && typeof option === "object") {
- myChart4.setOption(option, true);
- }
- if (option && typeof option === "object") {
- myChart5.setOption(option, true);
- }
- if (option && typeof option === "object") {
- myChart6.setOption(option, true);
- }
- if (option && typeof option === "object") {
- myChart7.setOption(option, true);
- }
- if (option && typeof option === "object") {
- myChart8.setOption(option, true);
- }
- option1 = {
- title : {
- x:'center'
- },
- tooltip : {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- legend: {
- orient: 'vertical',
- left: 'right',
- data: ['发代开','发票发','纳税申','发票旧','发认证']
- },
- series : [
- {
- name: '业务办理',
- type: 'pie',
- radius : '35%',
- center: ['50%', '60%'],
- data:[
- {value:335, name:'发票代开'},
- {value:310, name:'发票发售'},
- {value:234, name:'纳税申报'},
- {value:135, name:'发票验旧'},
- {value:1548, name:'发票认证'}
- ],
- itemStyle: {
- emphasis: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- },
- normal:{
- color:function(params) {
- //自定义颜色
- var colorList = [
- '#01b7ff', '#fd7c28', '#6fb440', '#ffc800', '#2d89dc',
- ];
- textStyle : {
- // fontWeight : 300 ,
- fontSize : 8 //文字的字体大小
- }
- return colorList[params.dataIndex]
- }
- }
- }
- }
- ]
- };
- if (option1 && typeof option1 === "object") {
- myChart9.setOption(option1, true);
- }
- if (option1 && typeof option1 === "object") {
- myChart10.setOption(option1, true);
- }
- option2 = {
- color: ['#3398DB'],
- tooltip : {
- trigger: 'axis',
- axisPointer : { // 坐标轴指示器,坐标轴触发有效
- type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis : [
- {
- type : 'category',
- data : ['省级', '市级'],
- axisTick: {
- alignWithLabel: true
- },
- axisTick: {
- show: false
- },
- axisLine: {
- lineStyle: {
- type: 'solid',
- color: '#fff',//左边线的颜色
- width:'2'//坐标线的宽度
- }
- },
- axisLabel: {
- textStyle: {
- color: '#fff',//坐标值得具体的颜色
- }
- }
- }
- ],
- yAxis : [
- {
- type : 'value',
- axisTick: {
- show: false
- },
- splitLine:{
- show:false
- },
- axisLine: {
- lineStyle: {
- type: 'solid',
- color: '#fff',//左边线的颜色
- width:'2'//坐标线的宽度
- }
- },
- axisLabel: {
- textStyle: {
- color: '#fff',//坐标值得具体的颜色
- }
- }
- }
- ],
- series : [
- {
- name:'直接访问',
- type:'bar',
- barWidth: '60%',
- data:[32.62, 52.68],
- itemStyle:{
- normal:{
- color: function (params){
- var colorList = ['#05fef8','#fedc00'];
- return colorList[params.dataIndex];
- }
- }
- }
- }
- ]
- };
- if (option2 && typeof option2 === "object") {
- myChart11.setOption(option2, true);
- }
- option3 = {
- tooltip: {
- trigger: 'item',
- formatter: "{a} <br/>{b}: {c} ({d}%)"
- },
- legend: {
- orient: 'vertical',
- x: 'left',
- data:['直接问','件营销','联盟广告','视频广告','搜索引擎']
- },
- series: [
- {
- name:'省级市级',
- type:'pie',
- radius: ['30%', '70%'],
- avoidLabelOverlap: false,
- label: {
- normal: {
- show: false,
- position: 'center'
- },
- emphasis: {
- show: true,
- textStyle: {
- fontSize: '30',
- fontWeight: 'bold'
- }
- }
- },
- itemStyle:{
- normal:{
- color: function (params){
- var colorList = ['#05fef8','#fedc00'];
- return colorList[params.dataIndex];
- }
- }
- },
- labelLine: {
- normal: {
- show: false
- }
- },
- data:[
- {value:335, name:'省级以上'},
- {value:310, name:'市级以上'}
- ]
- }
- ]
- };
- if (option3 && typeof option3 === "object") {
- myChart12.setOption(option3, true);
- }
- // Generate data
- var category = [];
- var dottedBase = +new Date();
- var lineData = [];
- var barData = [];
- for (var i = 0; i < 20; i++) {
- var date = new Date(dottedBase += 3600 * 24 * 1000);
- category.push([
- date.getFullYear(),
- date.getMonth() + 1,
- date.getDate()
- ].join('-'));
- var b = Math.random() * 200;
- var d = Math.random() * 200;
- barData.push(b)
- lineData.push(d + b);
- }
- // option
- option4 = {
- backgroundColor: '#0f375f',
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- legend: {
- data: ['line', 'bar'],
- textStyle: {
- color: '#ccc'
- }
- },
- xAxis: {
- data: category,
- axisLine: {
- lineStyle: {
- color: '#ccc'
- }
- }
- },
- yAxis: {
- splitLine: {show: false},
- axisLine: {
- lineStyle: {
- color: '#ccc'
- }
- }
- },
- series: [{
- name: 'line',
- type: 'line',
- smooth: true,
- showAllSymbol: true,
- symbol: 'emptyCircle',
- symbolSize: 5,
- data: lineData
- }, {
- name: 'bar',
- type: 'bar',
- barWidth: 5,
- itemStyle: {
- normal: {
- barBorderRadius: 5,
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1,
- [
- {offset: 0, color: '#fbb307'},
- {offset: 1, color: '#84f00e'}
- ]
- )
- }
- },
- data: barData
- }, {
- name: 'line',
- type: 'bar',
- barGap: '-100%',
- barWidth: 10,
- itemStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1,
- [
- {offset: 0, color: 'rgba(20,200,212,0.5)'},
- {offset: 0.2, color: 'rgba(20,200,212,0.2)'},
- {offset: 1, color: 'rgba(20,200,212,0)'}
- ]
- )
- }
- },
- z: -12,
- data: lineData
- }, {
- name: 'dotted',
- type: 'pictorialBar',
- symbol: 'rect',
- itemStyle: {
- normal: {
- color: '#0f375f'
- }
- },
- symbolRepeat: true,
- symbolSize: [12, 4],
- symbolMargin: 1,
- z: -10,
- data: lineData
- }]
- };
- if (option4 && typeof option4 === "object") {
- myChart13.setOption(option4, true);
- }
- option5 = {
- xAxis: {
- type: 'category',
- axisTick: {
- alignWithLabel: true
- },
- axisTick: {
- show: false
- },
- data: ['7:00', '8:00', '9:00', '10:00', '11:00', '12:00', '13:00','14:00'],
- axisLine: {
- lineStyle: {
- type: 'solid',
- color: '#fff',//左边线的颜色
- width:'2'//坐标线的宽度
- }
- },
- axisLabel: {
- textStyle: {
- color: '#fff',//坐标值得具体的颜色
- }
- }
- },
- yAxis: {
- type: 'value',
- axisTick: {
- show: true
- },
- splitLine:{
- // show:false
- },
- axisLine: {
- lineStyle: {
- type: 'solid',
- color: '#fff',//左边线的颜色
- width:'2'//坐标线的宽度
- }
- },
- axisLabel: {
- textStyle: {
- color: '#fff',//坐标值得具体的颜色
- }
- }
- },
- series: [{
- data: [5, 8, 20, 22, 24, 22, 35,18,10,1],
- type: 'line',
- smooth:.2,
- color:'#04fefa'
- }]
- };
- if (option5 && typeof option5 === "object") {
- myChart14.setOption(option5, true);
- }
- if (option5 && typeof option5 === "object") {
- myChart15.setOption(option5, true);
- }
|