Toggle navigation
主体情况
By
l***尼
2020-12-07 12:04:02
脚本
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
图表已生成
整理代码
刷新
代码
var barWidth = 18; var normalColor = "#ffffff"; var fontSize = 12; var datas = { xdata: ['2016', '2017', '2018', '2019'], yData1: [4200, 2220, 3910, 5340], yData2: [-10, 20, -36, 51], yData3: [10, 20, 36, 81], legendData: ['存量', '注册', '注销'], } option = { backgroundColor: " #25397b ", animation: false, //去除加载时缓动动画 legend: { type: "scroll", right: "10%", top: "5%", textStyle: { color: "#ffffff", fontSize: 10, }, data: datas.legendData }, grid: [{ left: '6%', bottom: '8%', top: '25%', right: '6%', containLabel: true }], tooltip: { trigger: 'axis' }, xAxis: { type: 'category', axisLabel: { show: true, textStyle: { color: normalColor, //更改坐标轴文字颜色 fontSize: fontSize //更改坐标轴文字大小 } }, axisLine: { lineStyle: { color: normalColor //更改坐标轴颜色 } }, data: datas.xdata, }, yAxis: [{ type: 'value', name: '', nameTextStyle: { color: normalColor }, position: 'left', //设置坐标轴字体颜色和宽度 axisLine: { lineStyle: { color: normalColor, width: 1 } }, //设置网格线颜色 splitLine: { show: false, lineStyle: { color: ['#0b244c'], width: 1, type: 'solid' } } }, { type: 'value', name: "", nameTextStyle: { fontSize: fontSize }, color: normalColor, axisTick: { "show": false }, splitLine: { show: false, }, axisLabel: { formatter: '{value}%', textStyle: { color: normalColor, fontSize: fontSize } }, axisLine: { lineStyle: { color: normalColor } }, } ], series: [{ name: datas.legendData[0], type: 'bar', label: { show: false, position: 'top' }, data: datas.yData1, barWidth: barWidth, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#09EBF1' }, { offset: 1, color: '#087189' }]), barBorderRadius: [30, 30, 0, 0], } } }, { name: datas.legendData[1], type: 'line', yAxisIndex: 1, z: 22, smooth: true, symbol: "none", symbolSize: 8, itemStyle: { normal: { color: "#00F371" //legend 图标颜色,及tooltip 图标颜色 } }, label: { normal: { show: false, position: 'top', formatter: 'C', textStyle: { color: '#fff', fontSize: fontSize } } }, lineStyle: { width: 2, color: "#00F371" }, data: datas.yData2, }, { name: datas.legendData[2], type: 'line', yAxisIndex: 1, z: 22, smooth: true, symbol: "none", symbolSize: 8, itemStyle: { normal: { color: "#ED7B15" } }, label: { normal: { show: false, position: 'top', formatter: 'C', textStyle: { color: '#fff', fontSize: fontSize } } }, lineStyle: { width: 2, color: "#ED7B15" }, data: datas.yData3, } ] };