Toggle navigation
折线图
By
i***明
2019-07-15 06:33:41
脚本
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 a = 15;//X fontSize var b = 15;//轴数据 fontSize var xAxisTextColor = '#FFFFFF';//'#4e7199';//字体颜色 var legendColor = '#FFFFFF';//legend颜色 option = { backgroundColor:'#000000', tooltip: { trigger: 'axis', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: 'line' // 默认为直线,可选为:'line' | 'shadow' }, }, legend: { textStyle: { fontSize: a, color: legendColor }, data: ['油中气体', '微水', '铁芯接地', 'SF₆气体压力', 'SF₆气体水分', "避雷器"] }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: { type: 'category',//填充部分 boundaryGap: false,//填充部分 splitLine: {show: false},//去掉网格 axisLabel: { textStyle: {//字体样式 fontSize: a, color: xAxisTextColor, }, interval: 0 }, data: ["1","2","3","4","5"] }, yAxis: [ {//第一个Y轴 name: '%', nameTextStyle: { color: xAxisTextColor, fontSize: a, }, type: 'value', splitLine: {//网线 show: false, lineStyle: { type: 'dotted' } }, //min: min,//设置Y轴最小值 // max: 100,//设置Y轴最大值 axisLabel: {//左边Y轴字 formatter: '{value}', textStyle: { color: xAxisTextColor, fontSize: a, } }, axisTick: {//去掉轴上面的刻度 show: false }, axisLine: {//右边Y轴坐标线 show: false, } }, ], series: [ { name: '油中气体', type: 'line', symbolSize: 8,//拐点大小 symbol: 'circle',//拐点样式 itemStyle: { normal: { lineStyle: { width: 2,//折线宽度 //type: 'dotted',//虚线 }, color: '#DF595A',//柱子颜色 } }, data: ["11","12","10","9","8"] }, { name: '微水', type: 'line', symbolSize: 8,//拐点大小 symbol: 'circle',//拐点样式 itemStyle: { normal: { lineStyle: { width: 2,//折线宽度 //type: 'dotted',//虚线 }, color: '#DFCD5B',//柱子颜色 } }, data: ["8","11","12","10","9"] }, { name: '铁芯接地', type: 'line', symbolSize: 8,//拐点大小 symbol: 'circle',//拐点样式 itemStyle: { normal: { lineStyle: { width: 2,//折线宽度 //type: 'dotted',//虚线 }, color: '#2DF7F2',//柱子颜色 } }, data: ["9","8","11","12","10"] }, { name: 'SF₆气体压力', type: 'line', symbolSize: 8,//拐点大小 symbol: 'circle',//拐点样式 itemStyle: { normal: { lineStyle: { width: 2,//折线宽度 //type: 'dotted',//虚线 }, color: '#DE5BC5',//柱子颜色 } }, data: ["10","9","8","11","12"] }, { name: 'SF₆气体水分', type: 'line', symbolSize: 8,//拐点大小 symbol: 'circle',//拐点样式 itemStyle: { normal: { lineStyle: { width: 2,//折线宽度 //type: 'dotted',//虚线 }, color: '#A35AE0',//柱子颜色 } }, data: ["12","10","9","8","11"] }, { name: '避雷器', type: 'line', symbolSize: 8,//拐点大小 symbol: 'circle',//拐点样式 itemStyle: { normal: { lineStyle: { width: 2,//折线宽度 //type: 'dotted',//虚线 }, color: '#2DC6F2',//柱子颜色 } }, data: ["11","12","10","9","8"] } ] };