Toggle navigation
双条形图
By
c***J
2021-01-29 02:58:34
脚本
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 xAxis = ['文学院','历史文化学院','哲学与政府管理学院','马克思主义学院','教育学院','美术学院','外国语学院','新闻传播学院','地理学院','化学学院']; var data1 = [28763,14237,10224,5561,5677,5546,7589,6521,4061,5079]; var data2 = [16.3,12.6,11.8,9.9,9.5,9.3,8.8,8.7,6.9,6.8]; option = { legend: { data: ['学院借阅总册次', '人均借阅册次'], type: "scroll", //icon: 'ret', height: '88%', left: '15%', bottom: '2', itemGap: 200, itemWidth: 10, itemHeight: 10, textStyle: { fontSize: '12', color: '#666', }, }, tooltip: { show: true, trigger: 'axis', axisPointer: { type: 'shadow' } }, grid: [{ show: false, left: '8%', top: '2%', bottom: '8%', containLabel: true, width: '25%' }, { show: false, left: '50%', top: '2%', bottom: '8%', width: '0%' }, { show: false, right: '8%', top: '2%', bottom: '8%', containLabel: true, width: '25%' } ], xAxis: [{ type: 'value', inverse: true, axisLabel: { show: false, }, axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: false } }, { gridIndex: 1, show: false }, { gridIndex: 2, type: 'value', axisLabel: { show: false, }, axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: false } }], yAxis: [{ type: 'category', inverse: true, position: 'right', data: xAxis, axisLabel: { show: false, }, axisLine: { show: false }, axisTick: { show: false } }, { gridIndex: 1, type: 'category', inverse: true, position: 'center', data: xAxis, axisLine: { show: false }, axisLabel: { show: true, textStyle: { color: "#666666", //X轴文字颜色 fontSize: '12', align:'center', } }, axisTick: { show: false } }, { gridIndex: 2, type: 'category', inverse: true, position: 'left', data: xAxis, axisLabel: { show: false, }, axisLine: { show: false }, axisTick: { show: false } }], series: [{ name: '学院借阅总册次', type: 'bar', barWidth: 8, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#6D9BFF' // 0% 处的颜色 }, { offset: 1, color: '#2E64EF' // 100% 处的颜色 }], false), barBorderRadius: [4, 0, 0, 4], } }, label: { show: true, position: 'left' }, data: data1 }, { xAxisIndex: 2, yAxisIndex: 2, name: '人均借阅册次', type: 'bar', barWidth: 8, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#FFAF25' // 0% 处的颜色 }, { offset: 1, color: '#E83D79' // 100% 处的颜色 }], false), barBorderRadius: [0, 4, 4, 0], } }, label: { show: true, position: 'right' }, data: data2 }] };