Toggle navigation
日模块点击数
By
南***墨
2018-10-19 07:50:59
脚本
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
图表已生成
整理代码
刷新
代码
let yAxisData = ["在线值机", "航班查询", "机场地图", "机场商业", "中转流程", "操作演示", "中转优惠", "酒店服务"]; let contData = [41, 88, 24, 21, 2, 5, 4, 2]; let yesterdayList = [61, 165, 44, 47, 7, 6, 35, 8]; let maxpoint = Math.max.apply(null, contData); if (maxpoint < 50) { maxpoint = 50; } else if (maxpoint < 100) { maxpoint = 100; } else if (maxpoint < 150) { maxpoint = 150; } else if (maxpoint < 300) { maxpoint = 300; } else if (maxpoint < 500) { maxpoint = 500; } else if (maxpoint < 700) { maxpoint = 700; } else if (maxpoint < 1000) { maxpoint = 1000; } let _bgshow = []; for (let j = 0; j < contData.length; j++) { _bgshow.push(maxpoint) } var option = { backgroundColor: '#0a2a43', tooltip: {}, grid: { top: "3%", left: "20%", right: "20%" }, xAxis: [ { type: "value", show: true, axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false }, splitLine: { show: false } } ], yAxis: [ { type: "category", position: "left", data: yAxisData, axisLine: { show: false }, axisTick: { show: false }, axisLabel: { textStyle: { color: "#ced0d3", fontSize: 12 } }, nameTextStyle: { fontSize: 16, color: "#ced0d3" }, splitLine: { show: false } }, { type: "category", position: "left", data: yAxisData, axisLine: { show: false }, axisTick: { show: false }, axisLabel: { textStyle: { color: "#ced0d3", fontSize: 12 } }, nameTextStyle: { fontSize: 16, color: "#ced0d3" }, splitLine: { show: false } } ], series: [ { name: "", type: "bar", barWidth: 20, //柱图宽度 silent: true, yAxisIndex: 0, label: { normal: { show: true, color: "#fff", formatter: function(data) { // return contData[data.dataIndex]; return ( contData[data.dataIndex] + "/" + yesterdayList[data.dataIndex] ); }, position: "right", textStyle: { color: "#ff7e00", fontSize: 16 } } }, itemStyle: { normal: { color: "transparent" } }, data: _bgshow }, { name: "", type: "bar", barWidth: 20, silent: false, yAxisIndex: 1, label: { normal: { show: true, position: "insideRight", formatter: " ", color: "#fff" } }, itemStyle: { emphasis: {}, normal: { color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [ { offset: 0, color: "#09394e" }, { offset: 1, color: "#01bad5" } ]) } }, data: contData // data: contData.map(function(item, index) { // return parseInt(item / _boyShould[index] * 100) // }), } ] };