From 099d7d3f1fe1b9f10693a839edd889a39b5ad87c Mon Sep 17 00:00:00 2001 From: Gleb Korotkiy Date: Sun, 21 Jun 2026 13:25:44 +0300 Subject: [PATCH] fix: adjust analytics chart layout --- src/style.css | 80 +++++++++++++++++++++---------------- src/views/DashboardView.vue | 70 ++++++++++++++++++++++---------- 2 files changed, 94 insertions(+), 56 deletions(-) diff --git a/src/style.css b/src/style.css index 515c753..c44ec3d 100644 --- a/src/style.css +++ b/src/style.css @@ -562,6 +562,10 @@ select { align-content: start; } +.analytics-card--trend .analytics-card__content { + grid-template-rows: auto minmax(0, 1fr); +} + .analytics-card--industries .analytics-card__content { align-content: start; } @@ -613,35 +617,6 @@ select { overflow-wrap: anywhere; } -.analytics-card__icon-button { - display: inline-flex; - width: 36px; - height: 36px; - flex: 0 0 auto; - align-items: center; - justify-content: center; - padding: 0; - border: 0; - border-radius: 10px; - background: transparent; - color: rgb(2 36 86 / 0.22); - cursor: pointer; - transition: - background-color 160ms ease, - color 160ms ease; -} - -.analytics-card__icon-button:hover, -.analytics-card__icon-button:focus-visible { - background: var(--Infographic-BG-Cards, #f3f3f3); - color: var(--Infographic-Main-Dark-Blue, #022456); -} - -.analytics-card__icon-button svg { - width: 20px; - height: 20px; -} - .composition-layout { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); @@ -1442,25 +1417,59 @@ select { } .trend-chart-box { - height: 250px; min-width: 0; + min-height: 0; + height: 100%; overflow: hidden; } +.trend-chart-box > * { + height: 100%; +} + .trend-chart-box .unovis-xy-container { --vis-axis-tick-label-font-size: 14px; + height: 100% !important; } .cluster-trend-chart-scroll { + position: relative; min-width: 0; - height: 280px; + min-height: 0; + height: 100%; padding-bottom: 18px; } +.cluster-trend-chart-scroll::before { + position: absolute; + z-index: 0; + top: 42px; + right: 6px; + bottom: 44px; + left: 6px; + pointer-events: none; + content: ''; + background: repeating-linear-gradient( + to bottom, + rgb(2 36 86 / 0.11) 0, + rgb(2 36 86 / 0.11) 1px, + transparent 1px, + transparent 25% + ); +} + .cluster-trend-chart-scroll [data-slot='scroll-area-viewport'] { + position: relative; + z-index: 1; + height: 100%; padding-bottom: 12px; } +.cluster-trend-chart-scroll [data-slot='scroll-area-viewport'] > * { + min-height: 100%; + height: 100%; +} + .cluster-trend-chart-scroll [data-slot='scroll-area-scrollbar'] { right: 6px; bottom: 4px; @@ -1475,17 +1484,19 @@ select { .cluster-trend-chart { display: grid; - height: 250px; + min-height: 0; + height: 100%; grid-auto-flow: column; grid-auto-columns: minmax(104px, 1fr); gap: 18px; align-items: end; - padding: 6px 6px 0; + padding: 42px 6px 0; } .cluster-trend-chart__item { position: relative; display: grid; + height: 100%; min-width: 0; grid-template-rows: minmax(120px, 1fr) auto; align-items: end; @@ -1521,7 +1532,8 @@ select { .cluster-trend-chart__bar-wrap { position: relative; display: flex; - height: 150px; + min-height: 150px; + height: 100%; align-items: flex-end; } diff --git a/src/views/DashboardView.vue b/src/views/DashboardView.vue index ea65813..7d6756e 100644 --- a/src/views/DashboardView.vue +++ b/src/views/DashboardView.vue @@ -1,6 +1,6 @@