Toggle navigation
水
By
1***去
2020-09-27 07:48:25
脚本
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 total = 50; //最大温度数据单独出来定义,方便环形总数的修改 var placeHolderStyle = { normal: { // label: { // show: false, // }, label: { show: true, position: 'inside', color: 'red', formatter: function(params) { return params.value; } }, labelLine: { show: false, } } }; option = { backgroundColor: "#344b58", title: { text: '水', //主标题 // subtext: '26℃', //副标题 textStyle: { //主标题样式 color: '#fff', fontWeight: 'bold', fontSize: 20 }, subtextStyle: { //副标题样式 color: '#fff', fontSize: 20, // fontWeight: 'bold', // color: '#0f0' }, left: 'center', // top: 'middle' }, tooltip: { show: true, trigger: 'item', //提示框触发类型,item数据项图形触发,主要应用于无类目轴的图表(散点图、饼形图等) // formatter: function(params, ticket, callback) { //第一个参数数据集、第二个参数是异步回调标志、第三个参数是异步回调 // return params.seriesName + ": " + params.value + "℃"; //系列名称:数据值 // } }, color: ['#5DC4C4', '#C43CA9', '#053afe'], //调色盘颜色列表,默认情况下图例和饼形环图颜色使用 legend: { // top: "124px", top: "17.5%", left: "50%", itemHeight: 20, //图例的高度 itemGap: 35, // itemGap: 10, //图例之间的间距 data: ['水耗', '能耗指标'], //图例的数据数组 textStyle: { color: '#fff' }, selectedMode: true, //图例选择模式 orient: "vertical" //图例布局方式 }, series: [{ name: '水耗', type: 'pie', clockWise: false, //顺时加载 hoverAnimation: false, //鼠标移入变大 // radius: [180, 230],//控制环的大小前内后外 radius: ['65%', '85%'],//控制环的大小前内后外 itemStyle: placeHolderStyle, // label: { // normal: { // show: false, // } // }, label: { show: true, position: 'inside', color: '#ffff', formatter: function(params) { return params.value; } }, data: [{ value: 28, // itemStyle: { // normal: { // color: '#dc1439' // } // } }, { value: total - 28, itemStyle: { normal: { color: 'transparent' } }, tooltip: { show: false }, label: { show: false, position: 'inside', color: '#ffff', formatter: function(params) { return params.value; } }, } ] }, { name: '能耗指标', type: 'pie', clockWise: false, //顺时加载 hoverAnimation: false, //鼠标移入变大 // radius: [120, 170], //控制环的大小前内后外 radius: ['40%', '60%'],//控制环的大小前内后外 itemStyle: placeHolderStyle, data: [{ value: 26, itemStyle: { normal: { color: '#C43CA9' } }, }, { value: total - 26, itemStyle: { normal: { color: 'transparent' } }, label: { show: false, position: 'inside', color: '#ffff', formatter: function(params) { return params.value; } }, tooltip: { show: false }, } ] }, ] };