Skip to content

Commit 0ced547

Browse files
committed
Improvement - VueUiDonut - Apply shadow option in polar mode
1 parent 845f08d commit 0ced547

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/components/vue-ui-donut.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,9 @@ defineExpose({
741741
<filter :id="`shadow_${uid}`" color-interpolation-filters="sRGB">
742742
<feDropShadow dx="0" dy="0" stdDeviation="10" flood-opacity="0.5" :flood-color="FINAL_CONFIG.style.chart.layout.donut.shadowColor" />
743743
</filter>
744+
<filter :id="`drop_shadow_${uid}`" color-interpolation-filters="sRGB" x="-50%" y="-50%" width="200%" height="200%" >
745+
<feDropShadow dx="0" dy="0" stdDeviation="3" flood-opacity="1" :flood-color="FINAL_CONFIG.style.chart.layout.donut.shadowColor" />
746+
</filter>
744747
</defs>
745748

746749
<template v-if="FINAL_CONFIG.type === 'classic'">
@@ -811,6 +814,17 @@ defineExpose({
811814
:d="polarAreas[i].path"
812815
fill="#FFFFFF"
813816
/>
817+
<g v-if="FINAL_CONFIG.style.chart.layout.donut.useShadow">
818+
<path
819+
v-for="(_arc, i) in currentDonut"
820+
class="vue-ui-donut-arc-path"
821+
:d="polarAreas[i].path"
822+
:fill="'transparent'"
823+
:stroke="FINAL_CONFIG.style.chart.backgroundColor"
824+
:stroke-width="FINAL_CONFIG.style.chart.layout.donut.borderWidth"
825+
:filter="`url(#drop_shadow_${uid})`"
826+
/>
827+
</g>
814828
<path
815829
v-for="(arc, i) in currentDonut"
816830
class="vue-ui-donut-arc-path"

0 commit comments

Comments
 (0)