| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("echarts")):"function"==typeof define&&define.amd?define(["echarts"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).segmentedDoughnutCustomSeriesInstaller=t(e.echarts)}(this,(function(e){"use strict";var t=function(t,r){var s=[],o=t.itemPayload,n=Math.max(1,o.segmentCount||1),a=Math.max(0,r.value(0)||0),i=o.center||["50%","50%"],l=o.radius||["50%","60%"],d=r.getWidth(),h=r.getHeight(),c=Math.min(d,h),u=e.number.parsePercent(i[0],r.getWidth()),p=e.number.parsePercent(i[1],r.getHeight()),f=e.number.parsePercent(l[1],c/2),g=e.number.parsePercent(l[0],c/2),m=(e.zrUtil.retrieve2(o.padAngle,2)||0)*Math.PI/180,y=(2*Math.PI-m*n)/n,b={type:"group",children:[]};s.push(b);var w=o.backgroundStyle||{},x=!1!==w.show,v={fill:w.color||"rgba(180, 180, 180, 0.2)",stroke:w.borderColor||"none",lineWidth:w.borderWidth||0,lineType:w.borderType||"solid",opacity:w.opacity||1,shadowBlur:w.shadowBlur||0,shadowColor:w.shadowColor||"rgba(0, 0, 0, 0)",shadowOffsetX:w.shadowOffsetX||0,shadowOffsetY:w.shadowOffsetY||0},P={type:"group",children:[]};s.push(P);for(var A=r.style(),M=r.styleEmphasis(),C=-Math.PI/2,S=(f-g)/2,T=0;T<n;++T){var k=C+(y+m)*T,I=C+(y+m)*T+y;x&&b.children.push({type:"sector",shape:{cx:u,cy:p,r0:g,r:f,cornerRadius:S,startAngle:k,endAngle:I,clockwise:!0},style:v,silent:!0}),T<a&&P.children.push({type:"sector",shape:{cx:u,cy:p,r0:g,r:f,cornerRadius:S,startAngle:k,endAngle:I,clockwise:!0},style:A,styleEmphasis:M})}var O,W=o.label;W&&W.show&&(O={type:"text",style:{text:e.format.formatTpl(W.formatter||"{c}/{b}",{$vars:["seriesName","b","c","d"],seriesName:t.seriesName,b:n,c:a,d:Math.round(a/n*100)+"%"}),fontSize:W.fontSize||12,fill:W.color||"#000",textAlign:"center",textVerticalAlign:"middle"},x:u,y:p},s.push(O));return{type:"group",children:s}};return{install:function(e){e.registerCustomSeries("segmentedDoughnut",t)}}})); |
| //# sourceMappingURL=index.min.js.map |