Toggle navigation
气泡
By
i***明
2019-07-05 05:43:11
脚本
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 = 22;//X fontSize var b = 15;//轴数据 fontSize var xAxisTextColor = '#FFFFFF';//'#4e7199';//字体颜色 var legendColor = '#FFFFFF';//legenmin var min=0; option = { backgroundColor:'#000000', tooltip: { trigger: 'axis', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: 'line' // 默认为直线,可选为:'line' | 'shadow' }, formatter: function (params) { var html = ''; if (params.length > 0) { Xindex = params[0].dataIndex; for (var int = 0; int < params.length; int++) { html += params[int].seriesName + ':' + params[int].data[1] + '
'; } } return html; } }, legend: { data: ['今年合格率', '去年合格率'], textStyle: { fontSize: a, color: legendColor }, }, xAxis: { data: ["1","2","3","4"], type: 'category', splitNumber: 1,//X轴间隔 splitLine: {show: false},//去掉网格 axisTick: {//去掉轴上面的刻度 show: false }, axisLine: {//轴坐标线 show: false, }, axisLabel: { textStyle: {//字体样式 fontSize: a, color: xAxisTextColor, }, }, }, yAxis: { name: '%', nameTextStyle: { color: xAxisTextColor, fontSize: a, }, type: 'value', splitLine: {//网线 show: false, lineStyle: { type: 'dashed' } }, 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: 'scatter', data: [ ["1", 87], ["2",55], ["3", 85], ["4", 87] ], symbolSize: function (data) {//气泡大小 return 35; }, itemStyle: {//气泡颜色 normal: { shadowBlur: 10, shadowColor: 'rgba(25, 100, 150, 0.5)',//阴影 color: new echarts.graphic.RadialGradient(0.5, 0.5, 0.5, [{//里面内容位置 offset: 0, color: 'rgba(128, 206, 238,0)'//里面内容 }, { offset: 1, color: 'rgba(11, 166, 238,1)'//外面框 }]) } } }, { name: '去年合格率', type: 'scatter', data: [ ["1", 97], ["2",95], ["3", 95], ["4", 97] ], symbolSize: function (data) {//气泡大小 return 35; }, itemStyle: {//气泡颜色 normal: { shadowBlur: 10, shadowColor: 'rgba(120, 36, 50, 0.5)',//阴影 color: new echarts.graphic.RadialGradient(0.5, 0.5, 0.6, [{//里面内容位置 offset: 0, color: 'rgba(230, 168, 255,0)'//里面内容 }, { offset: 1, color: 'rgb(191, 8, 255)'//外面框 }]) } } }] };