From d7c6e2e61c7d7bfe985fa4bc3731c8a826ae7957 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Tue, 28 Jun 2022 10:41:38 +0900
Subject: fix(client): fix chart tooltip rendering

---
 packages/client/src/components/chart-tooltip.vue | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

(limited to 'packages/client/src/components/chart-tooltip.vue')

diff --git a/packages/client/src/components/chart-tooltip.vue b/packages/client/src/components/chart-tooltip.vue
index 20e094a5a7..5c5e42db87 100644
--- a/packages/client/src/components/chart-tooltip.vue
+++ b/packages/client/src/components/chart-tooltip.vue
@@ -1,17 +1,19 @@
 <template>
-<MkTooltip ref="tooltip" :showing="showing" :x="x" :y="y" :max-width="340" :direction="'left'" :inner-margin="16" @closed="emit('closed')">
-	<div v-if="title" class="qpcyisrl">
-		<div class="title">{{ title }}</div>
-		<div v-for="x in series" class="series">
-			<span class="color" :style="{ background: x.backgroundColor, borderColor: x.borderColor }"></span>
-			<span>{{ x.text }}</span>
-		</div>
+<MkTooltip ref="tooltip" :showing="showing" :x="x" :y="y" :max-width="340" :direction="'top'" :inner-margin="16" @closed="emit('closed')">
+	<div v-if="title || series" class="qpcyisrl">
+		<div v-if="title" class="title">{{ title }}</div>
+		<template v-if="series">
+			<div v-for="x in series" class="series">
+				<span class="color" :style="{ background: x.backgroundColor, borderColor: x.borderColor }"></span>
+				<span>{{ x.text }}</span>
+			</div>
+		</template>
 	</div>
 </MkTooltip>
 </template>
 
 <script lang="ts" setup>
-import {  } from 'vue';
+import { } from 'vue';
 import MkTooltip from './ui/tooltip.vue';
 
 const props = defineProps<{
-- 
cgit v1.2.3-freya

