Skip to content

Commit aaeef78

Browse files
committed
VueUiDonut hide average label during serie segregation animation
1 parent 72a0287 commit aaeef78

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/components/vue-ui-donut.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,11 @@ defineExpose({
673673
:font-size="donutConfig.style.chart.layout.labels.hollow.total.value.fontSize"
674674
:style="`font-weight:${donutConfig.style.chart.layout.labels.hollow.total.value.bold ? 'bold': ''}`"
675675
>
676-
{{ dataLabel({p: donutConfig.style.chart.layout.labels.hollow.total.value.prefix, v: total, s: donutConfig.style.chart.layout.labels.hollow.total.value.suffix}) }}
676+
{{ dataLabel({
677+
p: donutConfig.style.chart.layout.labels.hollow.total.value.prefix,
678+
v: total,
679+
s: donutConfig.style.chart.layout.labels.hollow.total.value.suffix
680+
}) }}
677681
</text>
678682

679683
<text
@@ -696,7 +700,12 @@ defineExpose({
696700
:font-size="donutConfig.style.chart.layout.labels.hollow.average.value.fontSize"
697701
:style="`font-weight:${donutConfig.style.chart.layout.labels.hollow.average.value.bold ? 'bold': ''}`"
698702
>
699-
{{ donutConfig.style.chart.layout.labels.hollow.average.value.prefix }} {{ isNaN(average.toFixed(donutConfig.style.chart.layout.labels.hollow.average.value.rounding)) ? "-" : Number(average.toFixed(donutConfig.style.chart.layout.labels.hollow.average.value.rounding)).toLocaleString() }} {{ donutConfig.style.chart.layout.labels.hollow.average.value.suffix }}
703+
{{ isAnimating ? '--' : dataLabel({
704+
p: donutConfig.style.chart.layout.labels.hollow.average.value.prefix,
705+
v: average,
706+
s: donutConfig.style.chart.layout.labels.hollow.average.value.suffix,
707+
r: donutConfig.style.chart.layout.labels.hollow.average.value.rounding
708+
}) }}
700709
</text>
701710

702711
<!-- DATALABELS -->

0 commit comments

Comments
 (0)