Skip to content

Commit c5f464a

Browse files
committed
Update formatter
1 parent 167a5e4 commit c5f464a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

TestingArena/ArenaVueUiQuadrant.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,13 @@ const config = computed(() => {
228228
plotLabels: {
229229
...c.style.chart.layout.labels.plotLabels,
230230
x: {
231-
formatter: (val) => {
232-
return `fX - ${val}`
231+
formatter: ({value}) => {
232+
return `fX | ${value}`
233233
}
234234
},
235235
y: {
236-
formatter: (val) => {
237-
return `fY - ${val}`
236+
formatter: ({value}) => {
237+
return `fY | ${value}`
238238
}
239239
}
240240
}

src/components/vue-ui-quadrant.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,15 +691,17 @@ function useTooltip(category, plot, categoryIndex) {
691691
dataLabel({
692692
v: plot.xValue,
693693
r: FINAL_CONFIG.value.style.chart.tooltip.roundingValue
694-
})
694+
}),
695+
{ datapoint: plot, category, categoryIndex }
695696
)}</b></div>`;
696697
html += `<div>${FINAL_CONFIG.value.style.chart.layout.grid.yAxis.name ? FINAL_CONFIG.value.style.chart.layout.grid.yAxis.name : 'y'}: <b>${applyDataLabel(
697698
FINAL_CONFIG.value.style.chart.layout.labels.plotLabels.y.formatter,
698699
plot.yValue,
699700
dataLabel({
700701
v: plot.yValue,
701702
r: FINAL_CONFIG.value.style.chart.tooltip.roundingValue
702-
})
703+
}),
704+
{ datapoint: plot, category, categoryIndex }
703705
)}</b></div>`;
704706
705707
tooltipContent.value = `<div style="text-align:left;font-size:${FINAL_CONFIG.value.style.chart.tooltip.fontSize}px">${html}</div>`;

0 commit comments

Comments
 (0)