Toggle navigation
容量系数
By
一***行
2019-10-28 06:04:29
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
var yName = ['昂科能源12', '华能国际', '龙源', '三峡', '神华集团', '中电投', '江苏国信']; var value = ['21.23', '22', '1.12', '2.5', '4.8', '12', '27']; var valueMax = ['27', '27', '27', '27', '27', '27', '27']; option = { tooltip: { trigger: 'axis', show: true, formatter: (params) => { // console.log('params', params) return params[0].name + `
` + `装机容量:` + params[0].value + `万千瓦`; }, axisPointer: { type: 'shadow' } }, grid: { left: '3%', right: '3%', bottom: '2%', width: '92%', height: '100%', top: "2%", containLabel: true }, xAxis: { show: false, type: 'value', boundaryGap: [0, 0.01] }, yAxis: [{ type: 'category', // data: ['昂科能源','华能国际','龙源','三峡','神华集团','中电投','江苏国信'], data: yName, axisLabel: { show: true, // 强制显示所有标签 interval: 0, textStyle: { color: "#fff", fontSize: 14 }, formatter: function(value) { var res = value; if (res.length > 5) { res = res.substring(0, 4) + ".."; } return res; } }, axisLine: { show: true, lineStyle: { color: 'red', width: 0, //这里是为了突出显示加上的 } }, // 隐藏x轴刻度 axisTick: { show: false } }, { type: 'category', // data: ['昂科能源','华能国际','龙源','三峡','神华集团','中电投','江苏国信'], data: value, axisLabel: { show: true, margin: -80, // 强制显示所有标签 interval: 0, textStyle: { color: "#fff", fontSize: 14 } }, axisLine: { show: false, lineStyle: { color: '#2F798e', width: 2, //这里是为了突出显示加上的 } }, // 隐藏x轴刻度 axisTick: { show: false } } ], series: [{ name: '', type: 'bar', barGap: '-100%', zlevel: 10, // data: [1000,2344,2566,2890,3000,3500,4000], data: value, barWidth: '20%',//宽度 itemStyle: { normal: { color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{ offset: 0, color: 'rgb(0,150,255)' }, { offset: 1, color: '#0000ff' } ]), // 设置柱状图的圆角 上右下左 barBorderRadius: [100, 100, 100, 100] } }, }, { name: '', type: 'bar', // data: [20, 20, 20, 20, 20, 20, 20], data: valueMax, barWidth: '20%', //宽度 itemStyle: { normal: { color: "#000", barBorderRadius: [100, 100, 100, 100] } }, } ] };