Toggle navigation
双轴折线图
By
小***3
2020-06-24 08:22:27
脚本
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
图表已生成
整理代码
刷新
代码
option = { backgroundColor: '#031A32', tooltip: { trigger: "axis", axisPointer: { type: "shadow", label: { show: true } } }, grid: { left: "4%", top: "18%", right: "5%", bottom: "22%" }, legend: { data: ["昨日总人数", "今日实时人数", "昨日使用率"], top: "4%", textStyle: { color: "#1FC3CE", fontSize: 14 } }, xAxis: { data: [ "会议室1", "会议室2", "会议室3", "会议室4", "会议室5", "会议室6", "会议室7", "会议室8", "会议室9", "会议室10", "会议室11", "会议室12" ], axisLine: { show: true, //隐藏X轴轴线 lineStyle: { color: "#3d5269", width: 1 } }, axisTick: { show: true, //隐藏X轴刻度 alignWithLabel: true }, axisLabel: { show: true, textStyle: { color: "#396A87", //X轴文字颜色 fontSize: 14 }, interval: 0, rotate: 30 } }, yAxis: [{ type: "value", name: "人数", nameTextStyle: { color: "#396A87", fontSize: 14 }, splitLine: { show: true, lineStyle: { width: 1, color: "#3d5269" } }, axisTick: { show: false }, axisLine: { show: false }, axisLabel: { show: true, textStyle: { color: "#396A87", fontSize: 14 } } }, { type: "value", name: "使用率%", nameTextStyle: { color: "#396A87", fontSize: 14 }, position: "right", splitLine: { show: false }, axisTick: { show: false }, axisLine: { show: false, lineStyle: { color: "#396A87", width: 2 } }, axisLabel: { show: true, formatter: "{value} %", //右侧Y轴文字显示 textStyle: { color: "#396A87", fontSize: 14 } } } ], series: [{ name: "昨日总人数", type: "bar", barWidth: 18, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#00FFFF" }, { offset: 1, color: "#0080FF" } ]) } }, data: [24, 45, 43, 35, 76, 154, 86, 42, 68, 97, 24, 34] }, { name: "今日实时人数", type: "bar", barWidth: 18, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#E29052" }, { offset: 1, color: "#FA5A53" } ]) } }, data: [133, 23, 114, 67, 89, 35, 67, 96, 90, 46, 75, 85] }, { name: "昨日使用率", type: "line", yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用 showAllSymbol: true, //显示所有图形。 symbol: "circle", //标记的图形为实心圆 symbolSize: 6, //标记的大小 itemStyle: { //折线拐点标志的样式 color: "#26D9FF", borderColor: "#26D9FF", width: 2, shadowColor: "#26D9FF", shadowBlur: 2 }, lineStyle: { color: "#26D9FF", width: 2, shadowBlur: 2 }, data: [4.2, 3.5, 2.9, 7.8, 2, 3, 4.2, 3.5, 2.9, 7.8, 2, 3] } ] }