var xdata = ['北京', '天津', '宁夏', '陕西', '青海', '四川', '山东', '河南']; var data = [700, 600, 800, 200, 255, 845, 455, 122]; var mouth6 = ['2021.1', '2021.2', '2021.3', '2021.4', '2021.5', '2021.6', '2021.7', '2021.8', '2021.9'] var app = {}; option = { //你的代码 backgroundColor: "rgba(0,0,0,1)", //背景色 tooltip: { show: true }, // tooltip: { // trigger: "axis", // axisPointer: { // 坐标轴指示器,坐标轴触发有效 // type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' // }, // // borderRadius: 5, // // borderColor: "#6baab2", // // borderWidth: 1, // formatter: function(params) { // params[0].data.nameCode // let dot = '<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;background-color:#02C4DD"></span>'; // return ( // params[0].name + // "<br>" + // "杆塔数量 :" + // params[0].value // ); // } // }, grid: { left: "4%", right: "4%", bottom: "3%", top: "18%", containLabel: true }, xAxis: { data: xdata, triggerEvent: true, axisTick: { show: false }, axisLine: { show: false }, axisLabel: { show: true, rotate: 0, interval: 0, textStyle: { //padding: [14,0,0,0], fontSize: 11, color: "rgba(255,255,255,1)" } } }, yAxis: { name: "游客数量", triggerEvent: true, nameTextStyle: { color: "rgba(255,255,255,1)", fontSize: 11, padding: [0, 0, 10, -20] }, axisLine: { show: true, lineStyle: { color: "#0a3e98", width: 1, type: "solid" } }, splitLine: { lineStyle: { color: "#063374", type: "dotted" } }, axisTick: { show: false }, axisLabel: { show: true, textStyle: { color: "#fff", fontSize: 11 } } }, // color: ["#e54035"], series: [{ name: "游客客源地分析", barMinHeight: 10, type: "pictorialBar", barCategoryGap: "60%", // symbol: 'path://M0,10 L10,10 L5,0 L0,10 z', symbol: "path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z", itemStyle: { normal: { //barBorderRadius: 5, //渐变色 color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#01EAED" }, { offset: 0.5, color: "#02C4DD" }, { offset: 1, color: "#029ED9" } ]) } }, label: { normal: { show: false, position: "top", textStyle: { color: "#fff", fontSize: 20 } } }, data: data, z: 10 } ] };