Toggle navigation
折线图
By
困***里
2020-10-26 01:45:31
脚本
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:"#000", grid: { left: '3%', right: '5%', bottom: '3%', top:'80px', containLabel: true }, xAxis: { type: 'category', data: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"], axisTick:{ show: false }, axisLine:{ //轴线样式 lineStyle:{ color:'#666cb4', width:1,//这里是为了突出显示加上的 } }, axisLabel:{ show: true, textStyle: { color: '#fff', //更改坐标轴文字颜色 fontSize: 14, fontFamily: 'SourceHanSansSC-Regular', fontSize: 14, fontWeight: 'normal', fontStretch: 'normal', lineHeight: 40, letterSpacing: 0, padding: [15, 0, 0, 0] }, }, boundaryGap: false, //设置图表从原点开始 }, yAxis: { type: 'value', name:"(个)", nameTextStyle:{//y轴上方单位的颜色 color:'#fff', fontFamily: 'SourceHanSansSC-Regular', fontSize: 14, fontWeight: 'normal', fontStretch: 'normal', lineHeight: 19, letterSpacing: 0, padding: [0, 0, 0, -60] //上右下左 设置y轴单位的位置 }, axisTick:{ //去除刻度线 show: false }, axisLine:{ //轴线样式 lineStyle:{ color:'#666cb4', width:1,//这里是为了突出显示加上的 } }, axisLabel:{ show: true, textStyle: { color: '#fff', //更改坐标轴文字颜色 fontSize: 14, fontFamily: 'SourceHanSansSC-Regular', fontSize: 14, fontWeight: 'normal', fontStretch: 'normal', lineHeight: 19, letterSpacing: 0, top:'50%' }, }, splitLine:{ //设置网格颜色 show: true, lineStyle:{ color: ['#3e4172'], width: 1, type: 'solid' } }, //boundaryGap: ['0%', '0%'], //设置y轴刻度间距 }, series: [ { type: 'line', data: ["1000","2200","1500","1000","900","1800","1700","2000","3500","2200","200","0"], smooth: true, //设置曲线平滑 symbol: "none", //取消折点圆圈 symbolSize: 7, color:"#389ce6", areaStyle:{ type : 'default', //渐变色实现 color : new echarts.graphic.LinearGradient(0, 0, 0, 1,//变化度 //三种由深及浅的颜色 [{ offset : 0, color : 'rgba(36,155,245,0.4)' },{ offset : 1, color : 'rgba(36,155,245,0)' } ]), }, lineStyle:{ color: '#25A0FC', //改变折线颜色 width:3 } } ] };