let points = [ { name : '市城市管理局' , desc : { type : 1 , } , } , { name : '科大讯飞' , desc : { type : 2 , } , } , { name : '市水利局' , desc : { type : 1 , } , } , { name : '市政法委' , desc : { type : 1 , } , } , { name : '市自然资源和规划局' , desc : { type : 1 , } , } , { name : '市生态环境局' , desc : { type : 1 , } , } , { name : '市大数据局' , desc : { type : 3 , } , } ,
] ;
let color = [ '#ffffff' , '#36fff6' , '#ffe93a' , '#67f95f' ] ;
let oneArr = [ { name : '中心点' , desc : { type : 0 , } , symbol : 'none' , symbolSize : 233 , } ,
] ;
let erArr = points;
let allArr = [ ... oneArr, ... erArr] , dataArr = [ ] ;
allArr. forEach ( ( el, ind ) => { if ( el. desc. type > 0 ) { el. symbolSize = 50 ; el. symbol = 'path://M544 552.325V800a32 32 0 0 1-32 32 31.375 31.375 0 0 1-32-32V552.325L256 423.037a32 32 0 0 1-11.525-43.512A31.363 31.363 0 0 1 288 368l224 128 222.075-128a31.363 31.363 0 0 1 43.525 11.525 31.988 31.988 0 0 1-11.525 43.513L544 551.038z m0 0,M64 256v512l448 256 448-256V256L512 0z m832 480L512 960 128 736V288L512 64l384 224z m0 0' ; el. itemStyle = { color : color[ el. desc. type] , } ; } el. label = { normal : { show : true , position : 'bottom' , distance : 10 , color : color[ el. desc. type] , } , } ;
} ) ;
function CalutePointToSplitCircle ( arr, option ) { const newArray = [ ] ; const { length : arLen } = arr; let single_angle = ( 360 / arLen) . toFixed ( 2 ) ; let UtilCalute = { calute_x : ( ang, radius ) => { return ( Math. cos ( ( ang