Toggle navigation
柱形堆叠 坐标设置,统计总量展示
By
清***0
2020-07-16 03:43:43
脚本
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: "#161627", legend: { data: [ // 设为circle 默认 rect { name: "河北", icon: "circle" }, { name: "山东", icon: "circle" }, { name: "北京", icon: "circle" } ], textStyle: { color: "#fff", fontSize: 14 } }, tooltip: { trigger: "axis", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow" // 默认为直线,可选为:'line' | 'shadow' } }, xAxis: { type: "value", position: "top", // 坐标轴的线 文字 axisLabel: { // 位置 上右下左 padding: [0, 0, 10, 0], textStyle: { color: "white", fontSize: 14 } }, // 横坐标的纵向分割线 splitLine: { show: false }, // 坐标分割线的 显隐 长度 axisTick: { show: true, length: 12 }, // 坐标轴的线颜色 axisLine: { lineStyle: { color: "#0068B7", width: 2 } } }, yAxis: { type: "category", data: [ "应急队伍", "应急专家", "应急装备物资", "避难场所", "物资储备库" ], // 坐标轴 文字样式 axisLabel: { // 位置 上右下左 padding: [0, 5, 0, 0], textStyle: { color: "white", fontSize: 14 } }, // 坐标分割线的 显隐 axisTick: { show: false }, // 坐标轴的线颜色 axisLine: { lineStyle: { color: "#0068B7", width: 2 } } }, series: [ { name: "总计", type: "bar", barGap: "-96%", barWidth: "18", data: [1000, 1000, 1000, 1000, 1000], itemStyle: { normal: { color: "rgba(255,255,255,0.1)", borderWidth: 1, borderColor: "#0068B7" } } }, { name: "河北", data: [120, 200, 150, 80, 70], type: "bar", stack: "统计", barWidth: "16" }, { name: "山东", data: [120, 200, 150, 80, 70], type: "bar", stack: "统计", barWidth: "16" }, { name: "北京", data: [120, 200, 150, 80, 70], type: "bar", stack: "统计", barWidth: "16", // 最后一个 显示统计数据 可传递变量获取值 label: { show: true, position: "right", fontSize: 13, padding: [0, 0, 0, 5], color: "#fff", formatter: function() { return "可传递变量"; } } } ] };