var xdata = [ "2020年1月", "2020年2月", "2020年3月", "2020年4月", "2020年5月", "2020年6月", "2020年7月", "2020年8月", "2020年9月", "2020年10月", "2020年11月", "2020年12月", "2021年1月", "2021年2月", "2021年3月", "2021年4月", "2021年5月", "2021年6月", "2021年7月", "2021年8月", "2021年9月", "2021年10月", "2021年11月", "2021年12月", "2022年1月", "2022年2月", "2022年3月", "2022年4月", "2022年5月", "2022年6月", "2022年7月", "2022年8月", "2022年9月", "2022年10月", "2022年11月", "2022年12月", "2023年1月", ]; let ydata1 = [ 4834, 21064, 39718, 60403, 80592, 99462, 119186, 139761, 159104, 179736, 199419, 219352, 239330, 257502, 277621, 297114, 317264, 336764, 356914, 377064, 396564, 416714, 436214, 456364, 476514, 494714, 513398, 533312, 557715, 578333, 598843, 616761, 634101, 652019, 664769, 677944, 686461 ] let ydata2 = [ 1560, 7451, 15127, 23907, 32837, 41347, 50181, 59408, 68079, 77333, 86194, 95215, 104276, 112536, 121681, 130554, 139730, 148610, 157786, 166962, 175842, 185018, 193898, 203071, 212247, 220535, 228047, 235161, 243073, 249225, 255339, 260733, 265953, 271347, 276147, 281107, 283253, ] let dataValue = [ 243, 327, 374, 442, 431, 425, 428, 437, 439, 439, 436, 431, 430, 432, 432, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 418, 795, 872, 787, 740, 629, 629, 629, 643, 643, 765, ]; let dataValue1 = [ 576, 630, 703, 686, 546, 544, 544, 551, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 495, 376, 386, 401, 403, 400, 400, 400, 422, 422, 467, ]; option = { backgroundColor: '#031d33', legend: { top: 10, itemWidth: 20, itemHeight: 10, // icon: "roundRect", left: "center", padding: 0, textStyle: { color: "#E6E6E7", fontSize: 14, padding: [2, 0, 0, 0], }, }, color: ["#ffe050", "#ffe050", "#04c4fb", "#04c4fb"], grid: { containLabel: true, left: "4%", right: "4%", bottom: 10, top: 140, }, xAxis: { type: "category", data: xdata, axisLine: { show: true, textStyle: { color: "#1ebfda", }, lineStyle: { color: "#1ebfda", //刻度线的颜色 }, }, axisTick: { show: false, }, axisLabel: { color: "#fff", fontSize: 12, interval: 0, rotate: 50 }, }, yAxis: [ { // name: "万千瓦时", nameTextStyle: { fontSize: 20, color: "#fff", }, max: 2000000, min: 1000, type: "log", splitLine: { show: false, lineStyle: { color: "#1ebfda", type: "dashed", }, }, axisLine: { show: true, textStyle: { color: "#1ebfda", }, lineStyle: { color: "#1ebfda", //刻度线的颜色 }, }, axisTick: { show: false, }, axisLabel: { color: "#fff", fontSize: 18, }, }, { // name: "万千瓦时", nameTextStyle: { fontSize: 20, color: "#fff", }, type: "log", // splitNumber : 5, // max: 900, min: 1, splitLine: { show: false, lineStyle: { color: "#1ebfda", type: "dashed", }, }, axisLine: { show: true, textStyle: { color: "#1ebfda", }, lineStyle: { color: "#1ebfda", //刻度线的颜色 }, }, axisTick: { show: false, }, axisLabel: { color: "#fff", fontSize: 18, }, } ], series: [ { name: '保障', type: 'line', yAxisIndex: 1, symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 smooth: true, lineStyle: { normal: { width: 1, color: '#00ffa2', // 线条颜色 }, }, itemStyle: { normal: { color: '#00f0ff',//拐点颜色 // borderColor: '#fff600',//拐点边框颜色 // borderWidth: 13//拐点边框大小 // label: { // show: true, //开启显示 // color: '#fff', // position: 'top', //在上方显示 // formatter: function (res) { // if (res.value) { // return res.value // } else { // return 0 // } // }, // }, }, }, symbolSize: 4, //设定实心点的大小 data: dataValue, }, { name: '人数', type: 'line', yAxisIndex: 1, symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆 smooth: true, lineStyle: { normal: { width: 1, color: '#ffba00', // 线条颜色 }, }, itemStyle: { normal: { color: '#fff600',//拐点颜色 // borderColor: '#fff600',//拐点边框颜色 // borderWidth: 13//拐点边框大小 // label: { // show: true, //开启显示 // color: '#fff', // position: 'top', //在上方显示 // formatter: function (res) { // if (res.value) { // return res.value // } else { // return 0 // } // }, // }, }, }, symbolSize: 4, //设定实心点的大小 data: dataValue1, }, { name: "来电", data: ydata1, type: "bar", barWidth: 6, itemStyle: { color: { x: 0, y: 0, x2: 0, y2: 1, type: "linear", global: false, colorStops: [ { offset: 0, color: "#ffac3f", }, { offset: 1, color: "#ffd750", }, ], }, }, label: { show: false, }, }, { type: "pictorialBar", barMaxWidth: "6", symbol: "diamond", symbolOffset: ["-3.5", "2"], symbolSize: [6, 3], }, { data: ydata1, type: "pictorialBar", barMaxWidth: "6", symbolPosition: "end", symbol: "diamond", symbolOffset: ["-3.5", "-2"], symbolSize: [6, 3], zlevel: 2, }, { name: "非电", data: ydata2, type: "bar", barWidth: 6, itemStyle: { color: { x: 0, y: 0, x2: 0, y2: 1, type: "linear", global: false, colorStops: [ { offset: 0, color: "#1390ff", }, { offset: 1, color: "#00d9fa", }, ], }, }, label: { show: false, }, }, { type: "pictorialBar", barMaxWidth: "6", symbol: "diamond", symbolOffset: ["3.5", "2"], symbolSize: [6, 3], }, { data: ydata2, type: "pictorialBar", barMaxWidth: "6", symbolPosition: "end", symbol: "diamond", symbolOffset: ["3.5", "-2"], symbolSize: [6, 3], zlevel: 3, }, ], };