Toggle navigation
柱-折线图(含间隔背景色)
By
黄***伦
2019-02-14 07:05:14
脚本
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: '#0f375f', grid: { top: "25%", bottom: "10%" }, tooltip: { trigger: "axis", axisPointer: { type: "shadow", label: { show: true } } }, legend: { data: ["同比", "投资额"], top: "15%", textStyle: { color: "#ffffff" } }, xAxis: { data: [ "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" ], axisLine: { show: false //隐藏X轴轴线 }, axisTick: { show: false //隐藏X轴刻度 }, axisLabel: { show: true, textStyle: { color: "#ebf8ac" //X轴文字颜色 } } }, yAxis: [{ type: "value", name: "亿元", nameTextStyle: { color: "#ebf8ac" }, splitLine: { show: false }, splitLine: { show: false }, axisTick: { show: false }, axisLine: { show: false }, axisLabel: { show: true, textStyle: { color: "#ebf8ac" } } }, { type: "value", name: "同比", nameTextStyle: { color: "#ebf8ac" }, position: "right", splitLine: { show: false }, splitLine: { show: false }, axisTick: { show: false }, axisLine: { show: false }, axisLabel: { show: true, formatter: "{value} %", //右侧Y轴文字显示 textStyle: { color: "#ebf8ac" } } }, { type: "value", gridIndex: 0, min: 50, max: 100, splitNumber: 8, splitLine: { show: false }, axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false }, splitArea: { show: true, areaStyle: { color: ["rgba(250,250,250,0.0)", "rgba(250,250,250,0.05)"] } } } ], series: [{ name: "同比", type: "line", yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用 smooth: true, //平滑曲线显示 showAllSymbol: true, //显示所有图形。 symbol: "circle", //标记的图形为实心圆 symbolSize: 10, //标记的大小 itemStyle: { //折线拐点标志的样式 color: "#058cff" }, lineStyle: { color: "#058cff" }, areaStyle:{ color: "rgba(5,140,255, 0.2)" }, data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] }, { name: "投资额", type: "bar", barWidth: 15, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#6f3d9e" }, { offset: 1, color: "#3637a3" } ]) } }, data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] } ] };