Toggle navigation
柱形图左右对称
By
g***涵
2018-08-21 10:52:22
脚本
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 myData = [ '浙江大华', '家和物联', '海康威视', '杭州消安', '泛海三江', '中辰科技', '汇点科技', '超翔科技' ] var data = [ [389, 259, 262, 324, 233, 432, 267, 245], [121, 388, 233, 309, 432, 345, 675, 245] ] var option = { backgroundColor: 'rgba(1, 36, 65, 0.8)', legend: { show: false }, tooltip: { show: true, formatter:function(params){ return params.seriesName + '
' + params.name + ':' + params.data; } }, grid: [{ show: false, left: '5%', top: 0, bottom: 0, width: '5%' }, { show: false, left: '13%', top: 0, bottom: 0, containLabel: true, width: '15%' }, { show: false, left: '31%', top: 0, bottom: 0, containLabel: true, width: '15%' }, { show: false, left: '49%', top: 0, bottom: 0, containLabel: true, width: '15%' }, { show: false, left: '67%', top: 0, bottom: 0, containLabel: true, width: '15%' }, { show: false, left: '85%', top: 0, bottom: 0, containLabel: true, width: '15%' } ], xAxis: [{ show: false, }, { gridIndex: 1, axisLine: { show: false }, axisTick: { show: false }, position: 'top', axisLabel: { show: false }, splitLine: { show: false } }, { gridIndex: 2, axisLine: { show: false }, axisTick: { show: false }, position: 'top', axisLabel: { show: false }, splitLine: { show: false } }, { gridIndex: 3, axisLine: { show: false }, axisTick: { show: false }, position: 'top', axisLabel: { show: false }, splitLine: { show: false } }, { gridIndex: 4, axisLine: { show: false }, axisTick: { show: false }, position: 'top', axisLabel: { show: false }, splitLine: { show: false } }, { gridIndex: 5, axisLine: { show: false }, axisTick: { show: false }, position: 'top', axisLabel: { show: false }, splitLine: { show: false } } ], yAxis: [{ type: 'category', inverse: false, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: true, interval: 0, textStyle: { color: '#50afff', fontSize: 14 } }, data: myData.map(function(value) { return { value: value, textStyle: { align: 'center' } } }) }, { gridIndex: 1, type: 'category', inverse: false, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false }, data: myData }, { gridIndex: 2, type: 'category', inverse: false, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false }, data: myData }, { gridIndex: 3, type: 'category', inverse: false, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false }, data: myData }, { gridIndex: 4, type: 'category', inverse: false, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false }, data: myData }, { gridIndex: 5, type: 'category', inverse: false, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false }, data: myData } ], series: [{ name: '2019', type: 'bar', barWidth: 10, barMinWidth: 5, xAxisIndex: 1, yAxisIndex: 1, itemStyle: { normal: { color: '#4ca8f6', barBorderRadius: 50 } }, data: data[0] }, { name: '2018', type: 'bar', barWidth: 10, xAxisIndex: 2, yAxisIndex: 2, itemStyle: { normal: { color: '#00d484', barBorderRadius: 50 } }, data: data[1] }, { name: '2017', type: 'bar', barWidth: 10, xAxisIndex: 3, yAxisIndex: 3, itemStyle: { normal: { color: '#00d484', barBorderRadius: 50 } }, data: data[1] }, { name: '2016', type: 'bar', barWidth: 10, xAxisIndex: 4, yAxisIndex: 4, itemStyle: { normal: { color: '#00d484', barBorderRadius: 50 } }, data: data[1] }, { name: '2015', type: 'bar', barWidth: 10, xAxisIndex: 5, yAxisIndex: 5, itemStyle: { normal: { color: '#00d484', barBorderRadius: 50 } }, data: data[1] } ] }