barchart center fix

This commit is contained in:
Čarodej
2022-03-15 16:51:33 +01:00
parent f6ea18fce2
commit f6f4184fb2
2 changed files with 7 additions and 7 deletions

View File

@@ -1,13 +1,13 @@
<template>
<div
class="relative block cursor-pointer lg:mr-2 lg:w-2 2xl:w-3"
class="relative flex items-center justify-center block cursor-pointer lg:mx-1 lg:w-2 2xl:w-3"
:style="{ height: bar.percentage > 0 ? bar.percentage + '%' : '8px' }"
@mouseover="isVisible = true"
@mouseleave="isVisible = false"
>
<div
v-if="isVisible"
class="absolute -top-4 z-10 ml-1.5 -translate-y-full -translate-x-1/2 transform rounded-lg bg-gray-800 py-2 px-3 shadow-lg dark:bg-white"
v-if="isVisible || bar.percentage === 85.5"
class="absolute -top-4 z-10 -translate-y-full transform rounded-lg bg-gray-800 py-2 px-3 shadow-lg dark:bg-white"
>
<b class="mb-2 block whitespace-nowrap text-xs text-white dark:text-gray-800">
{{ bar.created_at }}
@@ -18,7 +18,7 @@
{{ bar.amount }}
</b>
</div>
<div class="absolute -bottom-2.5 left-0 right-0 mx-auto inline-block w-5 overflow-hidden">
<div class="absolute -bottom-2.5 left-0 right-0 mx-auto inline-block w-[17px] overflow-hidden">
<div class="h-3 w-3 origin-top-left -rotate-45 transform bg-gray-800 dark:bg-white"></div>
</div>
</div>