Toggle navigation
美国储蓄、投资和经常账户赤字
By
小***了
2018-04-23 06:53: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 = { title: [{ text: '美国储蓄、投资和经常账户赤字', left: 'center' }, { subtext: '这个图反映的是储蓄缺口(两根折线\n之间的阴影部分)和净出口的关系\n', subtextStyle: { fontStyle: 'bold' }, left: 80, top: 100 }, ], tooltip: { //?触发类型 trigger: 'axis', axisPointer: { type: 'cross' } }, legend: { orient: 'vertical', left: 'left', data: ['投资', '储蓄', '经常账户赤字'] }, grid: { left: '3%', right: '4%', top: '20%', bottom: '3%', containLabel: true }, //工具栏组件 toolbox: { show: true, feature: { saveAsImage: {} //是否保存图片 } }, xAxis: { type: 'category', //X轴均为category,Y轴均为value //设置为类目轴 // boundaryGap: false, //数值轴两端的空白策略 //类目在分割线上 data: [1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016] }, yAxis: { type: 'value', name: "千亿美元", axisLabel: { formatter: '{value}' }, axisPointer: { snap: true } }, series: [{ name: "投资", type: 'line', // stack:'总量', label: { normal: { show: true, position: 'top' } }, lineStyle: { normal: { type: 'dashed' } }, data: [12.84, 12.38, 13.09, 13.99, 15.51, 16.25, 17.52, 19.25, 20.77, 22.53, 24.24, 23.42, 23.69, 24.93, 27.65, 30.41, 32.33, 32.36, 30.59, 25.25, 27.53, 28.78, 31.26, 32.99, 35.11, 37.02, 36.67] }, { name: '储蓄', type: 'line', stack: '总量', smooth: true, label: { normal: { show: true, position: 'bottom' } }, data: [12.06, 12.1, 12.74, 13.34, 14.58, 15.35, 16.56, 18.23, 19.14, 19.96, 20.48, 19.74, 19.42, 19.9, 21.46, 23.2, 24.62, 25.17, 23.36, 21.3, 22.4, 22.98, 25.6, 28.07, 30.36, 31.78, 31.46], markArea: { data: [ [{ name: '金融危机', xAxis: '2006' }, { xAxis: '2009' }] ], label: { normal: { show: true, fontSize: 15, fontWeight: 'bold', color: '#2f4554' } }, itemStyle: { normal: { color: '#61a0a8', opacity: 0.2 } } } }, { name: '储蓄缺口', type: 'line', smooth: true, stack: '总量', areaStyle: { normal: { color: 'green', opacity: 0.1 } }, lineStyle: { normal: { type: 'dashed', color: 'rgba(0,0,0,0)' } }, data: [0.78, 0.28, 0.35, 0.65, 0.93, 0.9, 0.96, 1.02, 1.63, 2.57, 3.76, 3.68, 4.27, 5.03, 6.19, 7.21, 7.71, 7.19, 7.23, 3.95, 5.13, 5.8, 5.66, 4.92, 4.75, 5.24, 5.21], }, { name: '经常账户赤字', type: 'bar', label: { normal: { show: true, position: 'top' } }, itemStyle: { normal: { color: 'green', opacity: 0.6 } }, data: [0.79, 0.03, 0.52, 0.85, 1.22, 1.14, 1.25, 1.41, 2.15, 2.88, 4.03, 3.9, 4.51, 5.19, 6.32, 7.45, 8.06, 7.11, 6.81, 3.73, 4.31, 4.45, 4.26, 3.5, 3.74, 4.35, 4.52] } ] };