Toggle navigation
32mg/m³
By
hao123hahaha
2018-12-20 09:35: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
图表已生成
整理代码
刷新
代码
let Chart = { Config: { y_font_color: '#60F194', x_font_color: '#fff', y_line_color: '#184483', x_line_color: '#184483', split_line_color: 'rgba(0,53,115,0.6)' }, chart_color: ['#5EF0FE', '#E91346'], }; let row = { value: 32, //设置值 percent: 0.1 //设置颜色弧度占比 } // 实现两个圆弧拼接在一起,形成一个整圆,两个圆弧可以单独设置样式 options = [{ backgroundColor: '#008989', title: { text: row.value + 'mg/m³', subtext: "入水量", x: 'center', top: '41%', itemGap: 30, textStyle: { color: Chart.chart_color[0], fontSize: '200%', fontWeight: 'normal' }, subtextStyle: { color: '#fff', fontSize: '160%', fontWeight: 'normal' } }, series: [{ name: 'frontCircle', hoverAnimation: false, type: 'pie', clockWise: true, radius: [110, 130], itemStyle: { normal: { label: { show: false }, labelLine: { show: false }, color: Chart.chart_color[0] } }, data: [{ value: 360 * row.percent }, { value: 360 * (1 - row.percent), itemStyle: { normal: { color: 'rgba(0,0,0,0)', label: { show: false }, labelLine: { show: false } }, emphasis: { color: 'rgba(0,0,0,0)' } } } ] }, { name: 'backCircle', hoverAnimation: false, type: 'pie', clockWise: false, radius: [115, 125], itemStyle: { normal: { color: 'rgba(200,200,200,.2)', label: { show: true }, labelLine: { show: false } } }, data: [{ value: 360 * (1-row.percent), }, { value: 360 * row.percent, //注意调整此处,实现真实开口的背景色的开口值 itemStyle: { normal: { color: 'rgba(0,0,0,0)', label: { show: false }, labelLine: { show: false } }, emphasis: { color: 'rgba(0,0,0,0)' } } } ] } ] }, { backgroundColor: '#265E96', title: { text: row.value + 'mg/m³', subtext: '出水量', x: 'center', top: '41%', //设置主标题和副标题之间的间隔 itemGap: 30, textStyle: { color: Chart.chart_color[1], fontSize: '200%', fontWeight: 'normal' }, //副标题文字样式设置 subtextStyle: { color: '#fff', fontSize: '160%', fontWeight: 'normal' } }, series: [{ name: 'frontCircle', hoverAnimation: false, type: 'pie', //顺时针方向加载 clockWise: true, radius: [110, 130], itemStyle: { normal: { label: { show: false }, labelLine: { show: false }, color: Chart.chart_color[1] } }, //注意,data的两个元素,value的总和等于360,一个加,另一个减 //可以实现两个弧度拼合成一个整圆,针对每个圆弧都可以单独的调整 //其显示的样式。 data: [{ value: 360 * row.percent }, { value: 360 * (1 - row.percent), itemStyle: { normal: { color: 'rgba(0,0,0,0)', label: { show: false }, labelLine: { show: false } }, //设置高亮部分是透明的,鼠标悬浮在上面时候就感觉没有颜色变化的效果 emphasis: { color: 'rgba(0,0,0,0)' } } } ] }, //绘制一个底圆弧 { name: 'backCircle', hoverAnimation: false, type: 'pie', //逆时针加载 clockWise: false, radius: [115, 125], itemStyle: { normal: { color: 'rgba(200,200,200,.2)', label: { show: true }, labelLine: { show: false } } }, data: [{ value: 360 * (1-row.percent), }, { value: 360 * row.percent, itemStyle: { normal: { color: 'rgba(0,0,0,0)', label: { show: false }, labelLine: { show: false } }, emphasis: { color: 'rgba(0,0,0,0)' } } } ] } ] } ];