Skip to content

Commit 61551b1

Browse files
committed
VueUiVerticalBar add missing prefix & suffix on parent labels
1 parent 003d4f5 commit 61551b1

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
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.36",
4+
"version": "2.0.37",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/App.vue

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -756,28 +756,24 @@ const onionDataset = ref([
756756
{
757757
name: "Serie 1",
758758
percentage: 90,
759-
value: 1200,
760759
prefix: "",
761760
suffix: "",
762761
},
763762
{
764763
name: "Serie 2",
765764
percentage: 50,
766-
value: 1000,
767765
prefix: "",
768766
suffix: "",
769767
},
770768
{
771769
name: "Serie 3",
772770
percentage: 75,
773-
value: 500,
774771
prefix: "",
775772
suffix: "",
776773
},
777774
{
778775
name: "Serie 4",
779776
percentage: 10,
780-
value: 200,
781777
prefix: "",
782778
suffix: "",
783779
},
@@ -2516,6 +2512,15 @@ const quadrantConfig = ref({
25162512
const verticalBarConfig = ref({
25172513
style: {
25182514
chart: {
2515+
layout: {
2516+
bars: {
2517+
dataLabels: {
2518+
value: {
2519+
prefix: '$'
2520+
}
2521+
}
2522+
}
2523+
},
25192524
tooltip: {
25202525
customFormat: ({ seriesIndex, datapoint, series, config }) => {
25212526
console.log({seriesIndex, datapoint, series, config});
@@ -2836,7 +2841,7 @@ const sparkGaugeConfig = ref({})
28362841
</template>
28372842
</Box>
28382843

2839-
<Box open @copy="copyConfig(PROD_CONFIG.vue_ui_sparkgauge)">
2844+
<Box @copy="copyConfig(PROD_CONFIG.vue_ui_sparkgauge)">
28402845
<template #title>
28412846
<BaseIcon name="chartGauge"/>
28422847
VueUiSparkgauge
@@ -3438,7 +3443,7 @@ const sparkGaugeConfig = ref({})
34383443
</template>
34393444
</Box>
34403445

3441-
<Box @copy="copyConfig(PROD_CONFIG.vue_ui_vertical_bar)">
3446+
<Box open @copy="copyConfig(PROD_CONFIG.vue_ui_vertical_bar)">
34423447
<template #title>
34433448
<BaseIcon name="chartVerticalBar" />
34443449
VueUiVerticalBar
@@ -4006,7 +4011,7 @@ const sparkGaugeConfig = ref({})
40064011
</template>
40074012
</Box>
40084013

4009-
<Box open @copy="copyConfig(PROD_CONFIG.vue_ui_heatmap)">
4014+
<Box @copy="copyConfig(PROD_CONFIG.vue_ui_heatmap)">
40104015
<template #title>
40114016
<BaseIcon name="chartHeatmap"/>
40124017
VueUiHeatmap

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ defineExpose({
614614
:font-weight="verticalBarConfig.style.chart.layout.bars.dataLabels.bold ? 'bold' : 'normal'"
615615
text-anchor="start"
616616
>
617-
{{ verticalBarConfig.style.chart.layout.bars.dataLabels.value.show ? getParentData(serie, i).value : '' }} {{ verticalBarConfig.style.chart.layout.bars.dataLabels.percentage.show ? `(${getParentData(serie, i).percentageToTotal})` : '' }}
617+
{{ 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 }}
618618
</text>
619619

620620
<!-- TOOLTIP TRAPS -->

0 commit comments

Comments
 (0)