Toggle navigation
柱状图横向双柱
By
段佳伟灬
2018-10-15 07:01:38
脚本
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 option = { backgroundColor: 'black', title:{ text:'综合风险指数排名', x: '2%', y: '8%', textStyle:{color:"#fff",fontSize:"20"}}, tooltip: { trigger: 'axis' }, textStyle: { color: '#32cbd7', fontSize: '10px' }, grid: { left: '3%', right: '8%', bottom: '3%', top: '15%', containLabel: true }, calculable: true, yAxis: [{ data: [ "市住建委", "市市市国规委", "市环保局", "市城管委", "市市场监督管理局", "市发改委", "市农业局", "市民政局", "市检察院", "市司法局", "市法院", "市公安局", "市水务局", "市人社局", "市交委", "市文广新局" ], axisLine: { lineStyle: { color: 'rgb(20,203,215,0.2)' } }, //刻度线是否显示 axisTick: { show: false }, axisLabel: { interval: 0, show: true }, splitLine: { show: false, lineStyle: { // 使用深浅的间隔色 color: 'rgb(20,203,215,0.2)' } } }], xAxis: [{ type: 'value', name: '', axisLine: { show: false, symbolOffset: [0, 10], lineStyle: { color: 'rgb(20,203,215,0.2)' } }, axisTick: { show: false, }, splitLine: { show: true, lineStyle: { color: 'rgb(20,203,215,0.2)' } } }], series: [{ name: '综合风险指数', barWidth: '10px', type: 'bar', barGap: '10%', barCategoryGap: '60%', itemStyle: { normal: { barBorderRadius: [0, 30, 30, 0], //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组 color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [{ offset: 0, color: 'red' }, { offset: 0.5, color: 'blue' }, { offset: 1, color: 'yellow' } ] ) } }, data: [ 99, 95, 85, 79, 73, 68, 61, 57, 50, 47, 41, 34, 30, 22, 19, 10 ], zlevel: 11 }] }