$(function () { layer.load(2); $.getScript("https://cidc.oss-cn-chengdu.aliyuncs.com/js/echarts.js", function () { layer.closeAll('loading'); var data1 = ["a","b","c","d","e"]; var value1 = [123,123,234,23434,534]; var data2 = ["a","b","c","d","e"]; var value2 = [213,32423,345,465,76]; var data3 = ["a","b","c","d","e"]; var value3 = [1231,233,4243,534,645]; var data4 = ["123","213","2343","346","5765","76","8798","123","3456","5676","7898","8567"]; var value4 = [123,343,34,4566,678,798,556,373,868,435,867,678]; var data5 = ["67868","464","464","46","6","61","64","6","03","1","61","61"]; var value5 = [868,6,6,4,614,64,61,46,46,61,4,61]; var data6 = ["161","16","16","4","564","64","61","61","1","61","6","61"]; var value6 = [464,46,46,6,654,64,1,4964,1,61,1,61]; var data7 = ["a","b","c","d","e"]; var value7 = [123,23,324,546,676]; var data8 = ["a","b","c","d","e"]; var value8 = [123,4354,54,45,34]; var data9 = ["a","b","c","d","e"]; var value9 = [543,345,356,654756,565]; var myChart = echarts.init(document.getElementById('data51')); var option = { tooltip: {}, legend: {}, grid: { left: '10%', right: '20%', top: '5%', bottom: '5%', containLabel: true }, xAxis: { splitLine: { show: false, }, axisLabel: { color: "#FAC203", show: false } }, yAxis: { data: data1, axisLabel: { color: "#fff", fontSize: "12px" }, axisLine: { lineStyle: { color: '#FAC203' } } }, series: [{ type: 'bar', barWidth: '50%', itemStyle: { color: '#FAC203', borderColor: '#FFE232', borderWidth: 1, }, data: value1, label: { normal: { show: true, formatter: function (params) { return echarts.format.addCommas(params.value); }, position: 'right', fontSize: 14, color: '#fff', align: 'left', offset: [5, 2] } } }] }; myChart.setOption(option); var myChart1 = echarts.init(document.getElementById('data52')); var option1 = { tooltip: {}, legend: {}, grid: { left: '10%', right: '20%', top: '5%', bottom: '5%', containLabel: true }, xAxis: { splitLine: { show: false, }, axisLabel: { color: "#FAC203", show: false } }, yAxis: { data: data2, axisLabel: { color: "#fff", fontSize: "12px" }, axisLine: { lineStyle: { color: '#FAC203' } } }, series: [{ type: 'bar', barWidth: '50%', itemStyle: { color: '#FAC203', borderColor: '#FFE232', borderWidth: 1, }, data: value2, label: { normal: { show: true, formatter: function (params) { return echarts.format.addCommas(params.value); }, position: 'right', fontSize: 14, color: '#fff', align: 'left', offset: [5, 2] } } }] }; myChart1.setOption(option1); var myChart3 = echarts.init(document.getElementById('data53')); var option3 = { tooltip: {}, legend: {}, grid: { left: '10%', right: '20%', top: '5%', bottom: '5%', containLabel: true }, xAxis: { splitLine: { show: false, }, axisLabel: { color: "#FAC203", show: false } }, yAxis: { data: data3, axisLabel: { color: "#fff", fontSize: "12px" }, axisLine: { lineStyle: { color: '#FAC203' } } }, series: [{ type: 'bar', barWidth: '50%', itemStyle: { color: '#FAC203', borderColor: '#FFE232', borderWidth: 1, }, data: value3, label: { normal: { show: true, formatter: function (params) { return echarts.format.addCommas(params.value); }, position: 'right', fontSize: 14, color: '#fff', align: 'left', offset: [5, 2] } } }] }; myChart3.setOption(option3); var myChart4 = echarts.init(document.getElementById('data54')); var option4 = { tooltip: { trigger: 'axis', axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } } }, legend: { show: false, }, grid: { left: '5%', right: '5%', top: '15%', bottom: '15%' }, xAxis: { data: ["01月","02月","03月","04月","05月","06月","07月","08月","09月","10月","11月","12月"], boundaryGap: false, type: 'category', axisLabel: { color: "#fff", fontSize: "12px" }, axisLine: { lineStyle: { color: '#896F35' } } }, yAxis: {type: 'value', show: false, }, series: [{ name: '同比', type: 'line', stack: 'Total', areaStyle: {}, emphasis: { focus: 'series' }, data: data4 }, { name: '环比', type: 'line', stack: 'Total', label: { show: true, position: 'top', color: '#fff', }, areaStyle: {}, emphasis: { focus: 'series' }, data: value4 }] }; myChart4.setOption(option4); var myChart5 = echarts.init(document.getElementById('data55')); var option5 = { tooltip: { trigger: 'axis', axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } } }, legend: { show: false, }, grid: { left: '5%', right: '5%', top: '15%', bottom: '15%' }, xAxis: { data: ["01月","02月","03月","04月","05月","06月","07月","08月","09月","10月","11月","12月"], boundaryGap: false, type: 'category', axisLabel: { color: "#fff", fontSize: "12px" }, axisLine: { lineStyle: { color: '#896F35' } } }, yAxis: {type: 'value', show: false, }, series: [{ name: '同比', type: 'line', stack: 'Total', areaStyle: {}, emphasis: { focus: 'series' }, data: data5 }, { name: '环比', type: 'line', stack: 'Total', label: { show: true, position: 'top', color: '#fff', }, areaStyle: {}, emphasis: { focus: 'series' }, data: value5 }] }; myChart5.setOption(option5); var myChart6 = echarts.init(document.getElementById('data56')); var option6 = { tooltip: { trigger: 'axis', axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } } }, legend: { show: false, }, grid: { left: '5%', right: '5%', top: '15%', bottom: '15%' }, xAxis: { data: ["01月","02月","03月","04月","05月","06月","07月","08月","09月","10月","11月","12月"], boundaryGap: false, type: 'category', axisLabel: { color: "#fff", fontSize: "12px" }, axisLine: { lineStyle: { color: '#896F35' } } }, yAxis: {type: 'value', show: false, }, series: [{ name: '同比', type: 'line', stack: 'Total', areaStyle: {}, emphasis: { focus: 'series' }, data: data6 }, { name: '环比', type: 'line', stack: 'Total', label: { show: true, position: 'top', color: '#fff', }, areaStyle: {}, emphasis: { focus: 'series' }, data: value6 }] }; myChart6.setOption(option6); var myChart7 = echarts.init(document.getElementById('data57')); var option7= { tooltip: {}, legend: {}, grid: { left: '10%', right: '20%', top: '5%', bottom: '5%', containLabel: true }, xAxis: { splitLine: { show: false, }, axisLabel: { color: "#FAC203", show: false } }, yAxis: { data: data7, axisLabel: { color: "#fff", fontSize: "12px" }, axisLine: { lineStyle: { color: '#FAC203' } } }, series: [{ type: 'bar', barWidth: '50%', itemStyle: { color: '#FAC203', borderColor: '#FFE232', borderWidth: 1, }, data: value7, label: { normal: { show: true, formatter: function (params) { return echarts.format.addCommas(params.value); }, position: 'right', fontSize: 14, color: '#fff', align: 'left', offset: [5, 2] } } }] }; myChart7.setOption(option7); var myChart8 = echarts.init(document.getElementById('data58')); var option8 = { tooltip: {}, legend: {}, grid: { left: '10%', right: '20%', top: '5%', bottom: '5%', containLabel: true }, xAxis: { splitLine: { show: false, }, axisLabel: { color: "#FAC203", show: false } }, yAxis: { data: data8, axisLabel: { color: "#fff", fontSize: "12px" }, axisLine: { lineStyle: { color: '#FAC203' } } }, series: [{ type: 'bar', barWidth: '50%', itemStyle: { color: '#FAC203', borderColor: '#FFE232', borderWidth: 1, }, data: value8, label: { normal: { show: true, formatter: function (params) { return echarts.format.addCommas(params.value); }, position: 'right', fontSize: 14, color: '#fff', align: 'left', offset: [5, 2] } } }] }; myChart8.setOption(option8); var myChart9 = echarts.init(document.getElementById('data59')); var option9 = { tooltip: {}, legend: {}, grid: { left: '5%', right: '28%', top: '5%', bottom: '5%', containLabel: true }, xAxis: { splitLine: { show: false, }, axisLabel: { color: "#FAC203", show: false } }, yAxis: { data: data9, axisLabel: { color: "#fff", fontSize: "11px" }, axisLine: { lineStyle: { color: '#FAC203' } } }, series: [{ type: 'bar', barWidth: '50%', itemStyle: { color: '#FAC203', borderColor: '#FFE232', borderWidth: 1, }, data: value9, label: { normal: { show: true, formatter: function (params) { return echarts.format.addCommas(params.value); }, position: 'right', fontSize: 12, color: '#FFE232', align: 'left', offset: [0, 1] } } }] }; myChart9.setOption(option9); var dom = document.getElementById('map'); var myChart_map = echarts.init(dom, null, { renderer: 'canvas', useDirtyRect: false }); var option_map; myChart_map.showLoading(); $.get('/js/cq.json', function (geoJson) { myChart_map.hideLoading(); echarts.registerMap('CHONGQING', geoJson); myChart_map.setOption( (option_map = { tooltip: { trigger: 'item', formatter: '{b}' }, series: [ { name: '重庆市地图', type: 'map', layoutSize: { width: '100%', height: '80%' }, map: 'CHONGQING', itemStyle: { normal: { areaColor: '#046EFE', }, emphasis: { areaColor: '#c1eeee' } }, label: { show: true }, data: [ { name: '万州区',code:'500101', }, { name: '涪陵区',code:'500102', }, { name: '渝中区',code:'500103', }, { name: '大渡口区',code:'500104', }, { name: '江北区',code:'500105', }, { name: '沙坪坝区',code:'500106', }, { name: '九龙坡区',code:'500107', }, { name: '南岸区',code:'500108', }, { name: '北碚区',code:'500109', }, { name: '万盛区',code:'500110', }, { name: '双桥区',code:'500111', }, { name: '渝北区',code:'500112', }, { name: '巴南区',code:'500113', }, { name: '黔江区',code:'500114', }, { name: '长寿区',code:'500115', }, { name: '綦江区',code:'500222', }, { name: '潼南区',code:'500223', }, { name: '铜梁区',code:'500224', }, { name: '大足区',code:'500225', }, { name: '荣昌区',code:'500226', }, { name: '璧山区',code:'500227', }, { name: '城口县',code:'500229', }, { name: '丰都县',code:'500230', }, { name: '垫江县',code:'500231', }, { name: '武隆区',code:'500232', }, { name: '忠县',code:'500233', }, { name: '开州区',code:'500234', }, { name: '云阳县',code:'500235', }, { name: '奉节县',code:'500236', }, { name: '巫山县',code:'500237', }, { name: '巫溪县',code:'500238', }, { name: '石柱土家族自治县',code:'500240', }, { name: '秀山土家族苗族自治县',code:'500241', }, { name: '酉阳土家族苗族自治县',code:'500242', }, { name: '彭水苗族土家族自治县',code:'500243', }, { name: '江津区',code:'500381', }, { name: '合川区',code:'500382', }, { name: '永川区',code:'500383', }, { name: '南川区',code:'500384', }, ] } ] }) ); }); if (option_map && typeof option_map === 'object') { myChart_map.setOption(option_map); } myChart_map.on('click', function (params) { console.log(params); console.log(params.name); window.location.href="/kanban/county/"+params.data.code+".html"; }); window.addEventListener('resize', myChart_map.resize); }); })