Skip to content

Commit 36a4611

Browse files
committed
wip dataLabels
1 parent abbb8fb commit 36a4611

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

TestingArena/ArenaVueUiXy.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const dataset = ref([
1212
type: "bar",
1313
smooth: false,
1414
useArea: true,
15-
dataLabels: false,
15+
dataLabels: true,
1616
scaleSteps: 2,
1717
},
1818
{
@@ -103,7 +103,7 @@ const model = ref([
103103
{ key: 'chart.grid.labels.yAxis.labelWidth', def: 40, min: 0, max: 100, type: 'number' },
104104
{ key: 'chart.grid.labels.xAxis.showBaseline', def: true, type: 'checkbox'},
105105
106-
{ key: 'chart.labels.fontSize', def: 10, type: 'number', min: 6, max: 30, label: 'fontSize', category: 'labels' },
106+
{ key: 'chart.labels.fontSize', def: 20, type: 'number', min: 6, max: 30, label: 'fontSize', category: 'labels' },
107107
{ key: 'chart.labels.prefix', def: '', type: 'text', label: 'prefix', category: 'labels' },
108108
{ key: 'chart.labels.suffix', def: '', type: 'text', label: 'suffix', category: 'labels' },
109109

src/components/vue-ui-xy.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@
409409
<text
410410
:data-cy="`xy-bar-label-x-${i}-${j}`"
411411
v-if="plot && (!Object.hasOwn(serie, 'dataLabels') || serie.dataLabels === true) && chartConfig.bar.labels.show"
412-
:x="chartConfig.chart.grid.labels.yAxis.useIndividualScale && chartConfig.chart.grid.labels.yAxis.stacked ? plot.x + slot.line / 2 : plot.x + calcRectWidth() * 1.1"
412+
:x="chartConfig.chart.grid.labels.yAxis.useIndividualScale && chartConfig.chart.grid.labels.yAxis.stacked ? plot.x + slot.line / 2 : calcRectX(plot) + barPeriodGap"
413413
:y="plot.y + (plot.value > 0 ? chartConfig.bar.labels.offsetY : - chartConfig.bar.labels.offsetY * 3)"
414414
text-anchor="middle"
415415
:font-size="chartConfig.chart.labels.fontSize"

0 commit comments

Comments
 (0)