Toggle navigation
组合图
By
尤学谦
2017-09-06 07:03:56
脚本
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 xs = ['2013', '2014', '2015', '2016', '2017', '2018', '2019']; option = { tooltip: { trigger: 'axis', axisPointer: { type: 'cross', crossStyle: { color: '#999' } } }, color: ['pink', 'green', '#a9b0d3', '#476fd4'], grid: [ { x: '7%', y1: '7%', height: '40%', left: '10%' }, { x: '5%', y2: '5%', height: '35%', left: '10%', //bottom: '5%' } ], xAxis: [ { show: false, //隐藏了x轴 type: 'category', gridIndex: 0, //对应前面grid的索引位置(第一个) axisTick: { show: false }, axisLabel: { //interval:showNum, //x轴显示的数量,我这里是动态算的 }, axisPointer: { // show: false }, data: xs, }, { type: 'category', gridIndex: 1, //对应前面grid的索引位置(第二个) axisTick: { show: false }, axisLabel: { //interval:showNum, }, data: xs, } ], //y轴,不管有几个x轴,几个y轴,或者图,只要找到他对应的grid图的序号索引就可以精准匹配 yAxis: [ { type: 'value', gridIndex: 1, //对应前面grid的索引位置(第二个) name: '总GMV', //nameLocation:'end', splitLine: { show: true }, top: 50, nameLocation: 'middle', nameTextStyle: { padding: 25 }, position: 'left', axisLine: { show: false, }, axisLabel: { formatter: '{value}' } }, { show: false, type: 'value', gridIndex: 1, nameLocation: 'middle', name: '总GMV', nameTextStyle: { padding: 25 }, splitLine: { show: true }, position: 'left', axisLine: { show: false, }, axisLabel: { formatter: '{value}' } }, { type: 'value', gridIndex: 0, name: '接单量', nameTextStyle: { padding: 40 }, position: 'left', nameLocation: 'middle', splitLine: { show: true }, //nameLocation: 'start',//y轴name的位置 //inverse: true, axisLine: { show: false, }, axisLabel: { formatter: '{value}', textStyle: { fontSize: 12 //y轴坐标轴上的字体大小 } }, }, ], series: [{ name: '接单量', // type:'bar', // name: "累产气量" type: "line", xAxisIndex: 0, yAxisIndex: 2, data: [58645, 138575, 169930, 186999, 196261, 255398, 295343] }, { type: 'bar', stack: '总量', barWidth: 30, xAxisIndex: 1, yAxisIndex: 0, data: [18, 27, 40, 72, 100, 123, 247] }, { type: 'bar', stack: '总量', barWidth: 30, xAxisIndex: 1, yAxisIndex: 0, data: [10, 27, 60, 52, 60, 103, 147] } ] };