@@ -120,9 +120,9 @@ const drawableDataset = computed(() => {
120120 const maxSubtotal = Math .max (... arr .map (a => a .subtotal ))
121121
122122 return arr .map ((a , i ) => {
123- const radiusReference = (slit .value / 2 ) * 0.5 ;
123+ const radiusReference = (slit .value / 2 ) * 0.7 ;
124124 const radius = radiusReference > svg .value .width / 16 ? svg .value .width / 16 : radiusReference;
125- const activeRadius = hoveredIndex .value === a .index ? svg .value .width / 20 : radius;
125+ const activeRadius = hoveredIndex .value === a .index ? svg .value .width / 16 : radius;
126126 const y = svg .value .absoluteHeight - padding .value .bottom - (svg .value .height * a .subtotal / calculateNiceScale (minSubtotal, maxSubtotal, 10 ).max );
127127 return {
128128 ... a,
@@ -136,7 +136,16 @@ const drawableDataset = computed(() => {
136136 value: s .values [i] ?? 0
137137 }
138138 })
139- }, a .x , y, activeRadius, activeRadius),
139+ }, a .x , y, activeRadius, activeRadius, 1.99999 , 2 , 1 , 360 , 105.25 , slit .value / 5 > 16 ? 16 : slit .value / 5 ),
140+ donutHover: makeDonut ({
141+ series: mutableDataset .value .map ((s , k ) => {
142+ return {
143+ color: s .color ,
144+ name: s .name ,
145+ value: s .values [i] ?? 0
146+ }
147+ })
148+ }, a .x , y, activeRadius, activeRadius, 1.99999 , 2 , 1 , 360 , 105.25 , 12 ),
140149 donutFocus: makeDonut ({
141150 series: mutableDataset .value .map ((s , k ) => {
142151 return {
@@ -145,7 +154,7 @@ const drawableDataset = computed(() => {
145154 value: s .values [i] ?? 0
146155 }
147156 })
148- }, svg .value .centerX , svg .value .centerY , svg .value .height / 5 , svg .value .height / 5 ),
157+ }, svg .value .centerX , svg .value .centerY , svg .value .height / 3.6 , svg .value .height / 3.6 , 1.99999 , 2 , 1 , 360 , 105.25 , svg . value . height / 6 ),
149158 }
150159 })
151160})
@@ -556,13 +565,22 @@ defineExpose({
556565 : r= " 3"
557566 : fill= " donutEvolutionConfig.style.chart.color"
558567 / >
568+ < g v- else - if = " hoveredIndex !== null && hoveredIndex === i" >
569+ < path
570+ v- for = " (arc, k) in datapoint.donutHover"
571+ : d= " arc.arcSlice"
572+ : fill= " `${arc.color}`"
573+ : stroke- width= " 1"
574+ : stroke= " donutEvolutionConfig.style.chart.backgroundColor"
575+ / >
576+ < / g>
559577 < g v- else >
560578 < path
561579 v- for = " (arc, k) in datapoint.donut"
562- : d= " arc.path "
563- : stroke = " `${arc.color}`"
564- : stroke- width= " hoveredIndex === i ? 12 : slit / 5 > 16 ? 16 : slit / 5"
565- fill = " none "
580+ : d= " arc.arcSlice "
581+ : fill = " `${arc.color}`"
582+ : stroke- width= " 0. 5"
583+ : stroke = " donutEvolutionConfig.style.chart.backgroundColor "
566584 / >
567585 < / g>
568586 < / g>
@@ -571,7 +589,7 @@ defineExpose({
571589 v- if = " datapoint.subtotal"
572590 : cx= " datapoint.x"
573591 : cy= " datapoint.y"
574- : r= " hoveredIndex === datapoint.index ? svg.width / 22 : slit / 6 "
592+ : r= " hoveredIndex === datapoint.index ? svg.width / 30 : slit / 10 "
575593 : fill= " donutEvolutionConfig.style.chart.backgroundColor"
576594 / >
577595 < / g>
@@ -662,7 +680,7 @@ defineExpose({
662680
663681 < g v- for = " arc in fixedDatapoint.donutFocus" >
664682 < path
665- : d= " calcNutArrowPath(arc, {x: arc.center.endX , y: arc.center.endY }, 12, 12, { x: svg.width / 2 + padding.left, y: padding.top + svg.height / 2}, true )"
683+ : d= " calcNutArrowPath(arc, {x: svg.centerX , y: svg.centerY }, 12, 12, false, false, 1 )"
666684 : stroke= " arc.color"
667685 stroke- width= " 1"
668686 stroke- linecap= " round"
@@ -678,16 +696,16 @@ defineExpose({
678696 / >
679697 < path
680698 v- for = " (arc, k) in fixedDatapoint.donutFocus"
681- : d= " arc.path "
682- : stroke = " `${arc.color}`"
683- : stroke- width= " svg.height / 7 "
684- fill = " none "
699+ : d= " arc.arcSlice "
700+ : fill = " `${arc.color}`"
701+ : stroke- width= " 1 "
702+ : stroke = " donutEvolutionConfig.style.chart.backgroundColor "
685703 / >
686704 < g v- for = " (arc, i) in fixedDatapoint.donutFocus" >
687705 < text
688706 : data- cy= " `donut-datalabel-value-${i}`"
689- : text- anchor= " calcMarkerOffsetX(arc, true, 0 ).anchor"
690- : x= " calcMarkerOffsetX(arc, true, 3 ).x"
707+ : text- anchor= " calcMarkerOffsetX(arc, true, 20 ).anchor"
708+ : x= " calcMarkerOffsetX(arc, true, 10 ).x"
691709 : y= " calcMarkerOffsetY(arc)"
692710 : fill= " donutEvolutionConfig.style.chart.layout.grid.yAxis.dataLabels.color"
693711 : font- size= " 10"
0 commit comments