Toggle navigation
进行中工单一览
By
韩***翎
2019-07-31 10:53:51
脚本
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 positionTotal = ; // var baifenbi = [5, 7, 30, 18]; var grayBar = [8, 17, 34, 26]; var paiming = [4, 3, 2, 1]; var zongjine = [500, 1000, 2000, 3000, ]; var xingm = ['紧急', '严重', '一般', '轻微']; var colorSet; var baifenbi = [{ value: '5', itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ offset: 0, color: '#AE5126' // 0% 处的颜色 }, { offset: 1, color: '#FF9D44' // 100% 处的颜色 }]) } }, { value: '7', itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ offset: 0, color: '#97E402' // 0% 处的颜色 }, { offset: 1, color: '#D5FE58' // 100% 处的颜色 }]) } }, { value: '30', itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ offset: 0, color: '#00BD9D' // 0% 处的颜色 }, { offset: 1, color: '#5DFFA5' // 100% 处的颜色 }]) } }, { value: '18', itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ offset: 0, color: '#0054FF' // 0% 处的颜色 }, { offset: 1, color: '#00F2FF' // 100% 处的颜色 }]) } }, ]; var rich = { //富文本 white: { //自定义颜色 color: '#ffffff', fontSize: 16, padding: [20, 0] }, blue: { color: '#00BAFF', fontSize: 16, padding: [65, 50] }, gray: { color: '#fff', fontSize: 20, padding: [0, -20] }, weight: { color: '#fff', fontSize: 30, fontWeight: 600, padding: [0, 25] } }; option = { backgroundColor: '#02061d', color: ['#61A8FF'], //进度条颜色 /* grid: { left: '-10%', //如果离左边太远就用这个...... //right: '14%', bottom: '5%', top: '5%', containLabel: true },*/ xAxis: [{ show: false, }, //由于下边X轴已经是百分比刻度了,所以需要在顶部加一个X轴,刻度是金额,也隐藏掉 { show: false, } ], yAxis: { type: 'category', axisLabel: { show: false, //让Y轴数据不显示 }, itemStyle: { }, axisTick: { show: false, //隐藏Y轴刻度 }, axisLine: { show: false, //隐藏Y轴线段 }, data: xingm, }, series: [ //背景色--------------------我是分割线君------------------------------// { show: true, type: 'bar', barGap: '-100%', barWidth: '25%', //统计条宽度 itemStyle: { normal: { color: 'rgba(1,47,80,0.2)', borderColor: 'rgba(0,151,254,.8)' }, }, z: 1, data: grayBar, label: { normal: { show: true, textStyle: { color: '#fff', fontSize: 20 }, position: 'right', formatter: function(data) { return "{weight|" + grayBar[data.dataIndex] + '}{gray|' + '起' + '}' }, rich: rich } }, }, //蓝条--------------------我是分割线君------------------------------// { show: true, type: 'bar', barGap: '-100%', barWidth: '25%', //统计条宽度 itemStyle: { normal: { color: { type: 'bar', // colorStops: colorSet, globalCoord: false, // 缺省为 false } }, }, max: 1, label: { normal: { show: true, textStyle: { color: '#fff', //百分比颜色 fontSize: 20 }, position: 'insideBottomLeft', formatter: function(data) { return '{blue|' + '已处理:' + baifenbi[data.dataIndex].value + '起' + '}' }, rich: rich } }, labelLine: { show: false, }, z: 2, data: baifenbi, }, //数据条--------------------我是分割线君------------------------------// { show: true, type: 'bar', xAxisIndex: 1, //代表使用第二个X轴刻度!!!!!!!!!!!!!!!!!!!!!!!! barGap: '-100%', barWidth: '25%', //统计条宽度 itemStyle: { normal: { barBorderRadius: 200, color: 'transparent' }, }, label: { normal: { show: true, //label 的position位置可以是top bottom left,right,也可以是固定值 //在这里需要上下统一对齐,所以用固定值 position: [0, '-100%'], formatter: function(data) { return '{white|' + xingm[data.dataIndex] + "}"; // '}{gray|' + grayBar[data.dataIndex] + "起" + '}'; }, rich: rich } }, data: zongjine } ] };