Toggle navigation
整改清单
By
l***尼
2020-11-13 07:13:49
脚本
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 = "#00d6fd"; var fontSize = 12; var datas = { xdata: ['2016', '2017', '2018', '2019'], yData1: [4200, 2220, 3910, 5340], yData2: [-10, 20, -36, 51], legendData: ['整改数量', '整改率'], } option = { animation: false, //去除加载时缓动动画 legend: { show: true, right: '30px', y: '12px', textStyle: { color: '#00d6fd', fontSize: 12 }, itemHeight: 12, //修改icon图形大小 selectedMode: true, //取消图例上的点击事件 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: true, 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: '整改数量', 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: '#00d88b' }, { offset: 1, color: '#147065' }]) } } }, { name: datas.legendData[1], type: 'line', yAxisIndex: 1, z: 22, smooth: true, symbol: "none", symbolSize: 8, itemStyle: { normal: { color: "#EDEE18" } }, label: { normal: { show: false, position: 'top', formatter: 'C', textStyle: { color: '#fff', fontSize: fontSize } } }, lineStyle: { width: 2, color: "#FFCE59" }, data: datas.yData2, } ] };