Skip to content

Commit 5cc6306

Browse files
committed
Fix - VueUiDonut - Use ghostless donut set for labels too
1 parent 1e8a9c6 commit 5cc6306

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@
110110
"vitest": "^3.1.1",
111111
"vue": "^3.5.14"
112112
}
113-
}
113+
}

src/components/vue-ui-donut.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ defineExpose({
11041104
</template>
11051105

11061106
<!-- DATALABELS -->
1107-
<g v-for="(arc, i) in currentDonut.filter(el => !el.ghost)" :filter="getBlurFilter(i)"
1107+
<g v-for="(arc, i) in noGhostDonut.filter(el => !el.ghost)" :filter="getBlurFilter(i)"
11081108
:class="{ 'animated': FINAL_CONFIG.useCssAnimation }">
11091109
<g v-if="FINAL_CONFIG.style.chart.layout.labels.dataLabels.useLabelSlots">
11101110
<foreignObject
@@ -1119,7 +1119,7 @@ defineExpose({
11191119
isVisible: isArcBigEnough(arc) && mutableConfig.dataLabels.show,
11201120
textAlign: calcMarkerOffsetX(arc, true, 16, true).anchor,
11211121
flexAlign: calcMarkerOffsetX(arc, true, 16).anchor,
1122-
percentage: displayArcPercentage(arc, currentDonut),
1122+
percentage: displayArcPercentage(arc, noGhostDonut),
11231123
}" />
11241124
</div>
11251125
</foreignObject>
@@ -1150,7 +1150,7 @@ defineExpose({
11501150
:font-size="FINAL_CONFIG.style.chart.layout.labels.percentage.fontSize"
11511151
:style="`font-weight:${FINAL_CONFIG.style.chart.layout.labels.percentage.bold ? 'bold' : ''}`"
11521152
@click="selectDatapoint(arc, i)">
1153-
{{ displayArcPercentage(arc, currentDonut) }} {{
1153+
{{ displayArcPercentage(arc, noGhostDonut) }} {{
11541154
FINAL_CONFIG.style.chart.layout.labels.value.show ? `(${applyDataLabel(
11551155
FINAL_CONFIG.style.chart.layout.labels.value.formatter,
11561156
arc.value,
@@ -1182,7 +1182,7 @@ defineExpose({
11821182
:font-size="FINAL_CONFIG.style.chart.layout.labels.percentage.fontSize"
11831183
:style="`transition: all 0.1s ease-in-out; font-weight:${FINAL_CONFIG.style.chart.layout.labels.percentage.bold ? 'bold' : ''}`"
11841184
@click="selectDatapoint(arc, i)">
1185-
{{ displayArcPercentage(arc, currentDonut) }} {{
1185+
{{ displayArcPercentage(arc, noGhostDonut) }} {{
11861186
FINAL_CONFIG.style.chart.layout.labels.value.show ? `(${applyDataLabel(
11871187
FINAL_CONFIG.style.chart.layout.labels.value.formatter,
11881188
arc.value,
@@ -1216,7 +1216,7 @@ defineExpose({
12161216
style="overflow: visible; pointer-events: none">
12171217
<div>
12181218
<slot name="plot-comment"
1219-
:plot="{ ...arc, textAlign: calcMarkerOffsetX(arc, true, 16, true).anchor, flexAlign: calcMarkerOffsetX(arc, true, 16).anchor }" />
1219+
:plot="{ ...arc, textAlign: calcMarkerOffsetX(arc, true, 16, true).anchor, flexAlign: calcMarkerOffsetX(arc, true, 16).anchor, isFirstLoad }" />
12201220
</div>
12211221
</foreignObject>
12221222
<foreignObject v-if="isArcBigEnough(arc) && FINAL_CONFIG.type === 'polar'"
@@ -1226,7 +1226,7 @@ defineExpose({
12261226
style="overflow: visible; pointer-events: none">
12271227
<div>
12281228
<slot name="plot-comment"
1229-
:plot="{ ...arc, textAlign: getPolarAnchor(polarAreas[i].middlePoint), flexAlign: getPolarAnchor(polarAreas[i].middlePoint) }" />
1229+
:plot="{ ...arc, textAlign: getPolarAnchor(polarAreas[i].middlePoint), flexAlign: getPolarAnchor(polarAreas[i].middlePoint), isFirstLoad }" />
12301230
</div>
12311231
</foreignObject>
12321232

0 commit comments

Comments
 (0)