日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

echarts实现水波球

發(fā)布時(shí)間:2023/12/10 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 echarts实现水波球 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.


需要下載"echarts-liquidfill": "^2.0.6",這個(gè)插件,在main.js中導(dǎo)入插件

import 'echarts-liquidfill'

以下代碼為配置項(xiàng),注釋的地方是紅色虛線(xiàn),用來(lái)標(biāo)識(shí)標(biāo)準(zhǔn)值在水波球的位置

let barEcharts = this.$echarts.init(this.$refs.middleEchart)const data = [13.22/16.76, 13.22/16.76]let max = 96.1let option = {title:{text:'90%',textStyle:{fontSize: 80,fontFamily: 'Microsoft Yahei',fontWeight: 'normal',color: '#fff',fontWeight:'bold',},x:'center',y:'35%'},graphic: [{type: 'group',left: 'center',top: '60%',children: [{type: 'text',z: 100,left: '10',top: 'middle',style: {fill: '#fff',text: '塌陷土地治理率',font: '43px Microsoft YaHei'}}]}],// x軸xAxis: {show: false // 不顯示},// y軸yAxis: {axisLine: {show: false},axisLabel: {fontSize: 18,color: "#d8bb93"}},grid: {top: '15%',right: '20%',bottom: '15%',left: '20%'},series:[{type: 'liquidFill',color: [{type: 'linear',x: 0,y: 0,x2: 0,y2: 1,colorStops: [{offset: 1,color: 'rgba(0, 108, 154, 1)'}, {offset: 0.5,color: 'rgba(0, 155, 219, .5)'}, {offset: 0,color: 'rgba(0, 155, 219, 0)'}],globalCoord: false}],radius: '78%', // 半徑大小center: ['50%', '50%'], // 布局位置data, // 水球波紋值backgroundStyle: {color: '#1D1C1B' //背景顏色},outline: { // 輪廓設(shè)置show: true,borderDistance: 5, // 輪廓間距itemStyle: {// borderColor: '#ECE2BD', // 輪廓顏色borderColor: '#006D9B', // 輪廓顏色borderWidth: 4, // 輪廓大小shadowBlur: 'none' // 輪廓陰影}},label: {show: false}},// {// type: 'line', // 折線(xiàn)圖// markLine: {// label: {// show: true,// position: 'right',// fontSize: 16,// // color: 'red',// formatter: function (params) {// // params = "考核指標(biāo):\n" + max*100 + "%";// params = max * 100 + "%";// return params// }// },// emphasis: {// label: {// show: true,// position: 'right',// fontSize: 16,// // color: 'red',// formatter: function (params) {// params = "考核\n指標(biāo)\n" + max * 100 + "%";// return params// }// },// lineStyle: { // 標(biāo)線(xiàn)樣式// width: 2,// color: 'red',// type: 'dashed'// },// },// // silent: true, // 不觸發(fā)鼠標(biāo)事件// symbol: 'none', // 標(biāo)線(xiàn)兩端樣式// lineStyle: { // 標(biāo)線(xiàn)樣式// width: 2,// color: 'red',// type: 'dashed'// },// data: [// { // 標(biāo)線(xiàn)數(shù)據(jù)// // lineStyle: {// // color: '#d8bb93'// // },// yAxis: max// // yAxis: this.echart1Data.ptcfkTarget && this.echart1Data.ptcfkTarget !== '' ?// // this.echart1Data.ptcfkTarget / 100 : '-', y 軸// }// ]// }// }]}barEcharts.setOption(option)

總結(jié)

以上是生活随笔為你收集整理的echarts实现水波球的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。