Skip to content

Commit 09e2e87

Browse files
committed
fix: use same tooltip layout as other charts
1 parent 2e6d545 commit 09e2e87

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

app/components/Compare/FacetBarChart.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,18 @@ const config = computed<VueUiHorizontalBarConfig>(() => {
220220
const name = datapoint?.name?.replace(/\n/g, '<br>')
221221
return `
222222
<div class="font-mono p-3 border border-border rounded-md bg-[var(--bg)]/10 backdrop-blur-md">
223-
<div class="flex items-center gap-2">
223+
<div class="grid grid-cols-[12px_minmax(0,1fr)_max-content] items-center gap-x-3">
224224
<div class="w-3 h-3">
225225
<svg viewBox="0 0 2 2" class="w-full h-full">
226226
<rect x="0" y="0" width="2" height="2" rx="0.3" fill="${datapoint?.color}" />
227227
</svg>
228228
</div>
229-
<span>${name}: ${(datapoint as VueUiHorizontalBarDatapoint).formattedValue ?? 0}</span>
229+
<span class="text-3xs uppercase tracking-wide text-[var(--fg)]/70 truncate">
230+
${name}
231+
</span>
232+
<span class="text-base text-[var(--fg)] font-mono tabular-nums text-end">
233+
${(datapoint as VueUiHorizontalBarDatapoint).formattedValue ?? 0}
234+
</span>
230235
</div>
231236
</div>
232237
`

0 commit comments

Comments
 (0)