Skip to content

Commit 6b66bd7

Browse files
Improve responsive layout system across Signal Archive
1 parent ec1718c commit 6b66bd7

2 files changed

Lines changed: 392 additions & 119 deletions

File tree

looker-dashboard/script.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,12 @@ function renderMonthlyChart() {
390390
}
391391

392392
const data = dashboardData.monthlyOrders;
393-
const width = Math.max(container.clientWidth, 360);
394-
const height = width < 520 ? 320 : 360;
395-
const margin = { top: 34, right: 24, bottom: 52, left: 56 };
393+
const width = Math.max(container.clientWidth, 280);
394+
const isCompact = width < 520;
395+
const height = isCompact ? 280 : 360;
396+
const margin = isCompact
397+
? { top: 30, right: 12, bottom: 44, left: 40 }
398+
: { top: 34, right: 24, bottom: 52, left: 56 };
396399
const chartWidth = width - margin.left - margin.right;
397400
const chartHeight = height - margin.top - margin.bottom;
398401
const maxOrders = Math.max(...data.flatMap((item) => [item.totalOrders, item.completedOrders]));
@@ -738,11 +741,11 @@ function renderExitTable() {
738741
const signal = exitSignal(item.exitPage);
739742
return `
740743
<tr>
741-
<td><strong>${item.exitPage}</strong></td>
742-
<td>${formatNumber(item.totalSessions)}회</td>
743-
<td>${formatDuration(item.avgSessionDuration)}</td>
744-
<td>${formatNumber(item.completedPurchases)}건</td>
745-
<td><span class="signal-pill ${signal.className}">${signal.label}</span></td>
744+
<td data-label="이탈 페이지"><strong>${item.exitPage}</strong></td>
745+
<td data-label="세션 수">${formatNumber(item.totalSessions)}회</td>
746+
<td data-label="평균 체류시간">${formatDuration(item.avgSessionDuration)}</td>
747+
<td data-label="구매 완료">${formatNumber(item.completedPurchases)}건</td>
748+
<td data-label="전환 신호"><span class="signal-pill ${signal.className}">${signal.label}</span></td>
746749
</tr>
747750
`;
748751
})

0 commit comments

Comments
 (0)