$(window).load(function(){$(".loading").fadeOut()}) $(function () { echarts_1(); echarts_3(); echarts_21(); echarts_4(); echarts_5(); echarts_6(); echarts_7(); function echarts_1() { // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('echart1')); option = { tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, legend: { data: ['业务1', '业务2', '业务3', '业务4'], left: 'center', textStyle: {color: "#fff"}, }, grid: { left: '0', top: '30', right: '10', bottom: '0', containLabel: true }, xAxis: [{ type: 'category', boundaryGap: false, data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], axisLine: { lineStyle: { color: 'rgba(255,255,255,0.12)' } }, axisLabel: { // margin: 10, color: '#e2e9ff', textStyle: { fontSize: 14 }, }, }], yAxis: [{ splitNumber:3, axisLabel: { formatter: '{value}', color: '#e2e9ff', }, axisLine: { show: false }, splitLine: { lineStyle: { color: 'rgba(255,255,255,0.12)', type:'dotted' } } }], series: [ { name: '业务1', type: 'line', smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { color: '#fbc20e', width: 2 } }, itemStyle: {normal: {color: '#fbc20e',}}, data: [6, 2, 5, 1, 7, 4, 13, 4, 18, 6, 8, 4], }, { name: '业务2', type: 'line', smooth: true, symbol: 'circle', symbolSize: 3, showSymbol: false, lineStyle: { normal: { color: '#f7717e', width: 2 } }, itemStyle: {normal: {color: '#f7717e',}}, data: [4, 6, 4, 8, 6, 8, 4, 6, 2, 5, 1, 7 ], }, { name: '业务3', type: 'line', smooth: true, symbol: 'circle', symbolSize: 3, showSymbol: false, lineStyle: { normal: { color: '#4670f4', width: 2 } }, itemStyle: {normal: {color: '#4670f4',}}, data: [8, 6, 8, 4,4, 6, 5,4, 6, 2, 1, 7 ], }, { name: '业务4', type: 'line', smooth: true, symbol: 'circle', symbolSize: 3, showSymbol: false, lineStyle: { normal: { color: '#64cd84', width: 2 } }, itemStyle: {normal: {color: '#64cd84',}}, data: [8,4, 6, 5,4, 6, 2, 1, 7, 6, 8, 4 ], } ] }; // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option); window.addEventListener("resize",function(){ myChart.resize(); }); } function echarts_21() { // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('echart21')); var option = { grid: { top: '10', left: '0', right: '5%', bottom: '0', containLabel: true }, yAxis: [{ type: 'category', data: ['textone', 'textwo', 'texthree', 'textfour'], inverse: true, axisTick: { show: false}, axisLabel: { textStyle: { color: 'rgba(255,255,255,.3)' } }, axisLine: { show: false } }], xAxis: [{ type: 'value', axisLabel: { show: false }, axisLine: { show: false }, splitLine: { show: false } }], series: [{ type: 'bar', barWidth: 10, data: [100, 80, 70, 60], label: { normal: { show: true, position: 'insideBottomRight', formatter: '{c}%', distance: 0, offset: [10, -15], color: '#fff', fontSize: 12, padding: [2, 5, 2, 5], backgroundColor: { image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAAA+CAYAAAD5wvNAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29t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}, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{ offset: 0, color: '#57eabf' // 0% 处的颜色 }, { offset: 1, color: '#2563f9' // 100% 处的颜色 }], false), barBorderRadius: 14 } } }, { type: "bar", barWidth: 10, xAxisIndex: 0, barGap: "-100%", data: [100, 100, 100, 100], itemStyle: { normal: { color: "#444a58", barBorderRadius: 14 } }, zlevel: -1 }] }; // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option); window.addEventListener("resize",function(){ myChart.resize(); }); } function echarts_3() { // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('echart3')); var plantCap = [{ name: '发明', value: '7' }, { name: '外观', value: '15' }, { name: '商标', value: '3' }, { name: '实用', value: '11' }, { name: '超市', value: '650' },{ name: '软件', value: '7' }]; var datalist = [{ offset: [56, 48], symbolSize: 80, // opacity: .95, color: '#0050e4', }, { offset: [30, 70], symbolSize: 60, color: '#fc4322' }, { offset: [0, 43], symbolSize: 40, color: '#e18310' }, { offset: [93, 30], symbolSize: 60, color: '#08ba79' }, { offset: [26, 19], symbolSize: 55, color: '#069fc5' }, { offset: [75, 75], symbolSize: 40, color: '#e18310' }]; var datas = []; for (var i = 0; i < plantCap.length; i++) { var item = plantCap[i]; var itemToStyle = datalist[i]; datas.push({ name: item.value + '\n' + item.name, value: itemToStyle.offset, symbolSize: itemToStyle.symbolSize, itemStyle: { normal: { color: itemToStyle.color, opacity: itemToStyle.opacity } }, }) } option = { grid: { show: false, top: 10, bottom: 10 }, xAxis: [{ gridIndex: 0, type: 'value', show: false, min: 0, max: 100, nameLocation: 'middle', nameGap: 5 }], yAxis: [{ gridIndex: 0, min: 0, show: false, max: 100, nameLocation: 'middle', nameGap: 30 }], series: [{ type: 'scatter', symbol: 'circle', symbolSize: 120, label: { normal: { show: true, formatter: '{b}', color: '#FFF', textStyle: { fontSize: '12' } }, }, data: datas }] }; myChart.setOption(option); window.addEventListener("resize",function(){ myChart.resize(); }); } function echarts_4() { // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('echart4')); option = { tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, legend: { data: ['昨日', '今日'], left: 'center', textStyle: {color: "#fff"}, }, grid: { left: '0', top: '30', right: '10', bottom: '0', containLabel: true }, xAxis: [{ type: 'category', boundaryGap: false, data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], axisLine: { lineStyle: { color: 'rgba(255,255,255,0.12)' } }, axisLabel: { // margin: 10, color: '#e2e9ff', textStyle: { fontSize: 14 }, }, }], yAxis: [{ splitNumber:3, axisLabel: { formatter: '{value}', color: '#e2e9ff', }, axisLine: { show: false }, splitLine: { lineStyle: { color: 'rgba(255,255,255,0.12)', type:'dotted' } } }], series: [ { name: '昨日', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { color: '#fbc20e', width: 2 } }, itemStyle: {normal: {color: '#fbc20e',}}, data: [6, 2, 5, 1, 7, 4, 13, 4, 18, 6, 8, 4], }, { name: '今日', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 3, showSymbol: false, lineStyle: { normal: { color: '#58c8da', width: 2 } }, itemStyle: {normal: {color: '#58c8da',}}, data: [4, 6, 4, 8, 6, 8, 4, 6, 2, 5, 1, 7 ], } ] }; // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option); window.addEventListener("resize",function(){ myChart.resize(); }); } function echarts_5() { var myChart = echarts.init(document.getElementById('echart5')); option = { tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, legend: { data: ['昨日', '今日'], left: 'center', textStyle: {color: "#fff"}, }, grid: { left: '0', top: '30', right: '10', bottom: '0', containLabel: true }, xAxis: [{ type: 'category', boundaryGap: false, data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], axisLine: { lineStyle: { color: 'rgba(255,255,255,0.12)' } }, axisLabel: { // margin: 10, color: '#e2e9ff', textStyle: { fontSize: 14 }, }, }], yAxis: [{ splitNumber:3, axisLabel: { formatter: '{value}', color: '#e2e9ff', }, axisLine: { show: false }, splitLine: { lineStyle: { color: 'rgba(255,255,255,0.12)', type:'dotted' } } }], series: [ { name: '昨日', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, lineStyle: { normal: { color: '#fbc20e', width: 2 } }, itemStyle: {normal: {color: '#fbc20e',}}, data: [8, 6, 8, 4,4, 6, 5,4, 6, 2, 1, 7 ], }, { name: '今日', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 3, showSymbol: false, lineStyle: { normal: { color: '#58c8da', width: 2 } }, itemStyle: {normal: {color: '#58c8da',}}, data: [8,4, 6, 5,4, 6, 2, 1, 7, 6, 8, 4 ], } ] }; myChart.setOption(option); window.addEventListener("resize",function(){ myChart.resize(); }); } function echarts_6() { var myChart = echarts.init(document.getElementById('echart6')); option = { tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, color: ["#248ff7",'#64cd84'], legend: { data: ['系统外部', '系统内部'], left: 'center', textStyle: {color: "#fff"}, itemWidth: 15, itemHeight: 10, }, grid: { left: '0', top: '30', right: '10', bottom: '0', containLabel: true }, xAxis: [{ type: 'category', // boundaryGap: false, data: ['1', '2', '3', '4', '5'], axisLine: { lineStyle: { color: 'rgba(255,255,255,0.12)' } }, axisLabel: { // margin: 10, color: '#e2e9ff', textStyle: { fontSize: 14 }, }, }], yAxis: [{ splitNumber:3, axisLabel: { formatter: '{value}', color: '#e2e9ff', }, axisLine: { show: false }, splitLine: { lineStyle: { color: 'rgba(255,255,255,0.12)', type:'dotted' } } }], series : [ { name:'系统外部', type:'bar', stack: '排名', data:[120, 132, 101, 134, 90], barWidth:15 }, { name:'系统内部', type:'bar', stack: '排名', data:[220, 182, 191, 234, 290], barWidth:15, itemStyle:{ normal:{ barBorderRadius: [30, 30, 0, 0], } } }, ] }; myChart.setOption(option); window.addEventListener("resize",function(){ myChart.resize(); }); } function echarts_7() { var myChart = echarts.init(document.getElementById('echart7')); option = { tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, legend: { data: ['昨日', '今日','平均'], left: 'center', textStyle: {color: "#fff"}, }, grid: { left: '0', top: '30', right: '10', bottom: '0', containLabel: true }, xAxis: [{ type: 'category', boundaryGap: false, data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], axisLine: { lineStyle: { color: 'rgba(255,255,255,0.12)' } }, axisLabel: { // margin: 10, color: '#e2e9ff', textStyle: { fontSize: 14 }, }, }], yAxis: [{ splitNumber:3, axisLabel: { formatter: '{value}', color: '#e2e9ff', }, axisLine: { show: false }, splitLine: { lineStyle: { color: 'rgba(255,255,255,0.12)', type:'dotted' } } }], series: [ { name: '昨日', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 5, showSymbol: false, areaStyle: { normal: { color: 'rgba(101,192,205,.3)' } }, lineStyle: { normal: { color: '#58c8da', width: 2 } }, itemStyle: {normal: {color: '#58c8da',}}, data: [8, 6, 8, 4,4, 6, 2,4, 6, 5, 1, 7 ], }, { name: '今日', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 3, showSymbol: false, areaStyle: { normal: { color: 'rgba(218,179,101,.3)' } }, lineStyle: { normal: { color: '#f7b851', width: 2 } }, itemStyle: {normal: {color: '#f7b851',}}, data: [8, 4, 6, 7, 6, 8, 4, 5, 4, 6, 2, 6 ], }, { name: '平均', type: 'line', // smooth: true, symbol: 'circle', symbolSize: 3, showSymbol: false, lineStyle: { normal: { color: '#fff', width: 1, type:'dotted' } }, itemStyle: {normal: {color: '#fff',}}, data: [5,5, 5, 5,5, 5, 5, 5, 5, 5, 5, 5 ], } ] }; myChart.setOption(option); window.addEventListener("resize",function(){ myChart.resize(); }); } })