Toggle navigation
出勤率
By
p***若
2019-12-16 03:14:17
脚本
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
图表已生成
整理代码
刷新
代码
data = { x: ['1旅1营1连', '1旅1营2连', '1旅1营3连', '1旅2营1连', '1旅2营2连', '1旅2营3连', '1旅2营4连', '1旅2营5连', '1旅2营6连', '1旅3营3连'], y: [85, 52, 83, 95, 70, 30, 90, 98, 85, 87] } var yMax = 100; var dataShadow = []; var yData = data.y; for (var i = 0; i < yData.length; i++) { dataShadow.push(yMax); } var option = { color: ['#25c987'], backgroundColor: "transparent", title: { text: '出勤率', textStyle: { color: "#666", fontWeight: "bold", fontSize: 16 }, left: 'center', }, tooltip: { trigger: 'axis', formatter: "组 织:{b1}
{a1}: {c1}%", backgroundColor: 'rgba(0,0,0,0.25)', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: '' // 默认为直线,可选为:'line' | 'shadow' } }, grid: { left: '15px', top: '30px', right: '15px', bottom: '20px', containLabel: true }, dataZoom: [{ show: true, realtime: true, bottom: 0, height: 20, fillerColor: "rgba(238,238,238,1)", borderColor: "#ccc", backgroundColor: "rgba(255,255,255,1)", start: 45, end: 65 }, { type: 'inside', realtime: true, start: 45, end: 65 } ], xAxis: [{ type: 'category', data: data.x, axisTick: { show: true, }, axisLine: { lineStyle: { color: '#999', width: 1, } }, axisLabel: { interval: 0, //rotate: '35' } }], yAxis: [{ type: 'value', name: '%', nameTextStyle: { width: '15', height: '15' }, nameGap: '-5', splitLine: { show: true, lineStyle: { type: 'solid', color: '#e7e7e7' } }, axisTick: { show: true }, axisLine: { lineStyle: { width: 1, color: '#666' } } }], series: [{ type: 'bar', itemStyle: { normal: { color: 'rgba(238, 238, 238,1)' }, emphasis: { color: "rgba(238, 238, 238,1)" }, }, barGap: '-100%', barWidth: 40, data: dataShadow, animation: false }, { name: '出勤率', type: 'bar', barWidth: 40, itemStyle: { emphasis: { color: "#f1a727" }, }, data: yData } ] };