Skip to content

Commit f167fc7

Browse files
committed
Improvement - Added smooth animation on serie segregation
1 parent dc90795 commit f167fc7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/vue-ui-vertical-bar.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ defineExpose({
605605
:rx="verticalBarConfig.style.chart.layout.bars.borderRadius"
606606
:stroke="verticalBarConfig.style.chart.layout.bars.useStroke ? serie.color : 'none'"
607607
:stroke-width="verticalBarConfig.style.chart.layout.bars.useStroke ? verticalBarConfig.style.chart.layout.bars.strokeWidth : 0"
608+
:class="{ 'animated': verticalBarConfig.useCssAnimation }"
608609
/>
609610

610611
<!-- SEPARATORS -->
@@ -666,6 +667,7 @@ defineExpose({
666667
:font-weight="verticalBarConfig.style.chart.layout.bars.dataLabels.bold ? 'bold' : 'normal'"
667668
text-anchor="start"
668669
>
670+
669671
{{ verticalBarConfig.style.chart.layout.bars.dataLabels.value.prefix }} {{ verticalBarConfig.style.chart.layout.bars.dataLabels.value.show ? getParentData(serie, i).value : '' }} {{ verticalBarConfig.style.chart.layout.bars.dataLabels.percentage.show ? `(${getParentData(serie, i).percentageToTotal})` : '' }} {{ verticalBarConfig.style.chart.layout.bars.dataLabels.value.suffix }}
670672
</text>
671673

@@ -839,6 +841,7 @@ path, line, rect, circle, polygon {
839841
animation: verticalBarAnimation 0.5s ease-in-out;
840842
transform-origin: center;
841843
}
844+
842845
@keyframes verticalBarAnimation {
843846
0% {
844847
transform: scale(0.9,0.9);
@@ -930,4 +933,8 @@ caption {
930933
text-transform: capitalize;
931934
}
932935
}
936+
937+
.animated {
938+
transition: all 0.3s ease-in-out !important;
939+
}
933940
</style>

0 commit comments

Comments
 (0)