option = { backgroundColor: '#0a142f', title: { text: '按发电企业统计', subtext: '', x: '20px', y: '20px', textStyle: { fontSize: 18, fontWeight: 'bolder', color: '#fff' // 主标题文字颜色 }, subtextStyle: { color: '' // 副标题文字颜色 } }, tooltip: { show: false, confine: true, }, grid: { left: '15%', right: '10%', bottom: '10%', top: '10%', containLabel: true }, xAxis: { show: true, type: 'value', name: '', position:'top', // 坐标轴线 axisLine: { show: true, lineStyle: { color: 'rgba(255, 255, 255, 0.5)', type: 'dashed' }, }, // 坐标轴小标记 axisTick: { show: false, }, // 坐标轴文本标签 axisLabel: { textStyle: { color: 'rgba(255, 255, 255, 0.5)', }, }, // 分隔线 splitLine: { show: true, lineStyle: { color: 'rgba(255, 255, 255, 0.5)', type: 'dashed' }, }, // 分隔区域 splitArea: { show: false, }, }, yAxis: { data: ['华安水电厂', '双口渡水电公司', '金湖电力公司', '漳平能源公司', '西门发电公司', '年海水电厂', '南靖水电厂', '华安水电厂'], axisLine: { lineStyle: { color: 'rgba(255, 255, 255, 0.5)', }, }, axisLabel: { textStyle: { color: 'rgba(255, 255, 255, 0.5)', }, }, axisTick: { show: false, }, splitLine: { show: false, }, }, series: [ { name: '', type: 'bar', zlevel: 2, barWidth: 14, itemStyle: { normal: { barBorderRadius: 0, label: { show: true, position: 'right', color: '#fff', fontFamily: 'Bebas', }, color: { type: 'linear', x: 0, y: 0, x2: 1, y2: 0, colorStops: [ { offset: 0, color: 'rgba(61, 137, 247, 0)', // 0% 处的颜色 }, { offset: 0.7, color: 'rgba(61, 137, 247, 0.7)', // 100% 处的颜色 }, { offset: 1, color: 'rgba(61, 137, 247, 1)', // 100% 处的颜色 }, ], global: false, // 缺省为 false }, }, }, data: [6532, 5740, 7321, 4891, 2356, 3656, 4555, 3235], }, ], };