Skip to content

Commit 3fe9473

Browse files
authored
fix: set glassomorphism directly on the chart's tooltip customFormat (npmx-dev#179)
1 parent f80b729 commit 3fe9473

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/components/PackageDownloadAnalytics.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ const config = computed(() => ({
422422
},
423423
tooltip: {
424424
borderColor: '#2A2A2A',
425+
backdropFilter: false,
426+
backgroundColor: 'transparent',
425427
customFormat: ({
426428
absoluteIndex,
427429
datapoint,
@@ -431,7 +433,7 @@ const config = computed(() => ({
431433
}) => {
432434
if (!datapoint) return ''
433435
const displayValue = formatter({ value: datapoint[0]?.value ?? 0 })
434-
return `<div class="flex flex-col font-mono text-xs p-3">
436+
return `<div class="flex flex-col font-mono text-xs p-3 bg-[#0A0A0A]/10 backdrop-blur-md">
435437
<span class="text-fg-subtle">${chartData.value?.dates[absoluteIndex]}</span>
436438
<span class="text-xl">${displayValue}</span>
437439
</div>

0 commit comments

Comments
 (0)