2022-01-31 06:07:33 -06:00
|
|
|
<template>
|
2022-06-27 20:41:38 -05:00
|
|
|
<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>
|
2022-01-31 06:07:33 -06:00
|
|
|
</div>
|
|
|
|
</MkTooltip>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2022-06-27 20:41:38 -05:00
|
|
|
import { } from 'vue';
|
2022-09-06 04:21:49 -05:00
|
|
|
import MkTooltip from './MkTooltip.vue';
|
2022-01-31 06:07:33 -06:00
|
|
|
|
2022-12-22 01:59:11 -06:00
|
|
|
defineProps<{
|
2022-01-31 06:07:33 -06:00
|
|
|
showing: boolean;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2022-06-27 23:06:31 -05:00
|
|
|
title?: string;
|
|
|
|
series?: {
|
2022-01-31 06:07:33 -06:00
|
|
|
backgroundColor: string;
|
|
|
|
borderColor: string;
|
|
|
|
text: string;
|
|
|
|
}[];
|
|
|
|
}>();
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
|
(ev: 'closed'): void;
|
|
|
|
}>();
|
|
|
|
</script>
|
|
|
|
|
2022-12-27 03:29:39 -06:00
|
|
|
<style lang="scss" scoped>
|
2022-01-31 06:07:33 -06:00
|
|
|
.qpcyisrl {
|
|
|
|
> .title {
|
|
|
|
margin-bottom: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .series {
|
|
|
|
> .color {
|
|
|
|
display: inline-block;
|
|
|
|
width: 8px;
|
|
|
|
height: 8px;
|
|
|
|
border-width: 1px;
|
|
|
|
border-style: solid;
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|