Toggle navigation
隧道内人员情况
By
r***e
2017-12-21 08:30:21
脚本
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 legends = [{name:"二衬", value:6, color:'green'},{name:"初衬", value:3},{name : "爆破", value:9}, {name : "支护", value:1}, {name:"钢筋工", value:6},{name:"木工", value:3},{name : "架子工", value:9}, {name : "电工", value:1}, {name : "钳工", value:1}]; option = { title: { x:5, text: '隧道内人员情况', textStyle:{ color:'#eee', } }, tooltip : { trigger: 'axis', axisPointer : { // 坐标轴指示器,坐标轴触发有效 type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' }, formatter:function(params,ticket,callback){ //console.log(params); var tip = ""; for(var i in params){ if(params[i].value[0] > 0){ tip = "时长:" + params[i].value[0] + "分钟"; } } return tip; } }, backgroundColor:'#04334c', color:['#48cda6','#fd87ab','#11abff','#efdf33','#968ade','#89cd46','#7d85cb','#61abff','#4fdf33'], legend: { orient: 'vertical', // 'vertical' x:5, y:50, textStyle: { color: '#eee' }, formatter:function(name){ for(var i in legends){ if(legends[i].name == name){ return name + "(" + legends[i].value + ")"; } } return name; }, data: legends }, calculable : true, dataZoom : [{ yAxisIndex:[0,1], show : true, realtime : true, orient: 'vertical', // 'horizontal' x: 480, y: 80, backgroundColor: 'rgba(0,0,0,0)', width: 20, height: '88%', start : 10, end : 90 }], grid:[ { left: 150, right: '4%', top: '10%', width: 130, bottom: '45%', height: '50%', //设置grid高度 containLabel: true } ,{ left: 350, right: '4%', top: '10%', width: 130, height: '50%', //设置grid高度 }], xAxis: [ { gridIndex:0, type: 'value', axisTick: {show: false}, axisLine: {show:false}, axisLabel: {show:false}, splitArea: {show:false}, splitLine: {show:false} }, { gridIndex:1, type: 'value', axisTick: {show: false}, axisLine: {show:false}, axisLabel: {show:false}, splitArea: {show:false}, splitLine: {show:false} }], yAxis: [{ name: '左线(7) 时长', axisLine: {show:false}, axisTick: {show:false}, nameTextStyle: { fontWeight: 'bold', color: '#eee' }, axisLabel:{textStyle:{ color: '#eee'}}, gridIndex:0, type: 'category', data: ['陈迪','肖东菁','高川','冯超','明明','徐丹','向珍','史靖文','宫昊','冯媛媛','李青','王国花','李子月','推卸','宫昊'] },{ name:'右线(27) 时长', axisLine: {show:false}, axisTick: {show:false}, nameTextStyle: { fontWeight: 'bold', color: '#eee' }, axisLabel:{textStyle:{ color: '#eee'}}, gridIndex:1, type: 'category', data: ['周杰','白桦','张涵','章伟','王晗','刘思思','黄芙蓉','宋阳','肖锋','毛泽尧','徐夕武','张百玲'] }], series: [ { xAxisIndex: 0, yAxisIndex: 0, type: 'bar', stack:'group1', name: '二衬', barWidth:15, itemStyle:{color:'#eee'}, label: { normal: { show: true, position: 'insideLeft', formatter: function(object){ if(object.value[0] > 0){ return object.value[0]; }else{ return ""; } }, } }, data: [[46,0],[0,1],[0,2],[0,3],[46,4],[146,5],[26,6],[0,7],[36,8],[0,9],[0,10],[0,11],[0,12],[0,13],[0,14]] }, { xAxisIndex: 0, yAxisIndex: 0, type: 'bar', stack:'group1', name: '初衬', barWidth:15, label: { normal: { show: true, position: 'insideLeft', formatter: function(object){ if(object.value[0] > 0){ return object.value[0]; }else{ return ""; } }, } }, data: [[0,0],[21,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[86,9],[50,10],[0,11],[0,12],[0,13],[0,14]] }, { xAxisIndex: 0, yAxisIndex: 0, type: 'bar', stack:'group1', name: '爆破', barWidth:15, label: { normal: { show: true, position: 'insideLeft', formatter: function(object){ if(object.value[0] > 0){ return object.value[0]; }else{ return ""; } }, } }, data: [[0,0],[0,1],[34,2],[0,3],[0,4],[0,5],[0,6],[69,7],[0,8],[0,9],[0,10],[0,11],[0,12],[33,13],[0,14]] }, { xAxisIndex: 0, yAxisIndex: 0, type: 'bar', stack:'group1', name: '支护', barWidth:15, label: { normal: { show: true, position: 'insideLeft', formatter: function(object){ if(object.value[0] > 0){ return object.value[0]; }else{ return ""; } }, } }, data: [[0,0],[0,1],[0,2],[90,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[32,11],[55,12],[0,13],[0,14]] }, { xAxisIndex: 0, yAxisIndex: 0, stack:'group1', type: 'bar', name: '钢筋工', barWidth: 15,//固定柱子宽度 label: { normal: { show: true, position: 'insideLeft', formatter: function(object){ if(object.value[0] > 0){ return object.value[0]; }else{ return ""; } }, } }, data: [[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[23,14]] }, { xAxisIndex: 1, yAxisIndex: 1, type: 'bar', stack:'group2', name: '木工', barWidth:15, label: { normal: { show: true, position: 'insideLeft', formatter: function(object){ if(object.value[0] > 0){ return object.value[0]; }else{ return ""; } }, } }, data: [[45,0],[68,1],[0,2],[90,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[23,14]] }, { xAxisIndex: 1, yAxisIndex: 1, type: 'bar', stack:'group2', name: '架子工', barWidth:15, label: { normal: { show: true, position: 'insideLeft', formatter: function(object){ if(object.value[0] > 0){ return object.value[0]; }else{ return ""; } }, } }, data: [[0,0],[0,1],[90,2],[0,3],[56,4],[0,5],[0,6],[76,7],[0,8],[0,9],[0,10],[0,11],[0,12],[0,13],[23,14]] }, { xAxisIndex: 1, yAxisIndex: 1, type: 'bar', stack:'group2', name: '电工', barWidth:15, label: { normal: { show: true, position: 'insideLeft', formatter: function(object){ if(object.value[0] > 0){ return object.value[0]; }else{ return ""; } }, } }, data: [[0,0],[0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],[56,8],[87,9],[89,10],[88,11],[24,12]] }, { xAxisIndex: 1, yAxisIndex: 1, type: 'bar', stack:'group2', name: '钳工', barWidth:15, label: { normal: { show: true, position: 'insideLeft', formatter: function(object){ if(object.value[0] > 0){ return object.value[0]; }else{ return ""; } }, } }, data: [[0,0],[0,1],[0,2],[0,3],[0,4],[56,5],[77,6],[0,7],[0,8],[0,9],[0,10],[0,11],[0,12]] } ] };