Skip to content

Commit fde84e0

Browse files
Alec ProbertAlec Probert
authored andcommitted
Fixed minor issues with legends
1 parent 2a37c12 commit fde84e0

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-data-ui",
33
"private": false,
4-
"version": "2.0.25",
4+
"version": "2.0.26",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/atoms/Legend.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function handleClick(legend, i) {
6464
align-items:center;
6565
gap: 6px;
6666
cursor: pointer;
67-
height: 24px;
67+
height: fit-content;
68+
text-align: left;
6869
}
6970
</style>

src/components/vue-ui-nested-donuts.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,12 @@ defineExpose({
603603
<template #item="{ legend, index }">
604604
<div :data-cy="`legend-item-${index}`" @click="segregate(legend, index)" :style="`opacity:${segregated.includes(legend.id) ? 0.5 : 1}`">
605605
{{ legend.name }} : {{ dataLabel({p: donutConfig.style.chart.layout.labels.dataLabels.prefix, v: legend.value, s: donutConfig.style.chart.layout.labels.dataLabels.suffix, r: donutConfig.style.chart.legend.roundingValue}) }}
606-
<span v-if="!segregated.includes(legend.id)">
606+
<template v-if="!segregated.includes(legend.id)">
607607
({{ isNaN(legend.value / legend.total) ? '-' : dataLabel({ v: legend.value / legend.total * 100, s: '%', r: donutConfig.style.chart.legend.roundingPercentage }) }})
608-
</span>
609-
<span v-else>
608+
</template>
609+
<template v-else>
610610
( - % )
611-
</span>
611+
</template>
612612
</div>
613613
</template>
614614
</Legend>

0 commit comments

Comments
 (0)