fix: heatmap overflow

This commit is contained in:
pa
2026-03-22 20:59:33 +09:00
parent 297e81f32c
commit 31e2d7da89
2 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="flex flex-col" style="min-height: 200px"> <div class="flex min-w-0 flex-col overflow-x-hidden" style="min-height: 200px">
<div style="display: flex; align-items: center; justify-content: space-between"> <div style="display: flex; align-items: center; justify-content: space-between">
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<Button <Button
@@ -62,6 +62,7 @@
<div <div
v-show="filteredEventCount > 0" v-show="filteredEventCount > 0"
ref="activityChartRef" ref="activityChartRef"
class="min-w-0 overflow-hidden"
style="width: 100%; height: 240px" style="width: 100%; height: 240px"
@contextmenu.prevent="onChartRightClick" /> @contextmenu.prevent="onChartRightClick" />
@@ -125,6 +126,7 @@
<div <div
v-show="hasOverlapData" v-show="hasOverlapData"
ref="overlapChartRef" ref="overlapChartRef"
class="min-w-0 overflow-hidden"
style="width: 100%; height: 240px" style="width: 100%; height: 240px"
@contextmenu.prevent="onOverlapChartRightClick" /> @contextmenu.prevent="onOverlapChartRightClick" />

View File

@@ -11,6 +11,7 @@ export function buildHeatmapOption({
}) { }) {
return { return {
tooltip: { tooltip: {
confine: true,
position: 'top', position: 'top',
formatter: (params) => { formatter: (params) => {
const [hour, dayIndex] = params.data; const [hour, dayIndex] = params.data;
@@ -68,8 +69,9 @@ export function buildHeatmapOption({
data, data,
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 6, borderColor: isDarkMode ? 'hsl(220, 15%, 18%)' : 'hsl(210, 18%, 78%)',
shadowColor: 'rgba(0, 0, 0, 0.3)' borderWidth: 1.5,
opacity: 0.92
} }
}, },
itemStyle: { itemStyle: {