Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion src/components/Reports/TotalReport/TotalReport.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
/* stylelint-disable */
/* .totalContainer {
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: #f1ebf7;
border-radius: 16px;
padding: 20px 40px;
margin-bottom: 30px;
} */

.totalContainer {
display: flex;
flex-direction: column;
Expand All @@ -7,6 +17,8 @@
border-radius: 16px;
padding: 20px 40px;
margin-bottom: 30px;
word-break: break-word; /* 防止极窄情况下文字硬撑破容器 */
overflow: hidden; /* 隐藏任何意外溢出的边界 */
}

.tables {
Expand All @@ -15,14 +27,23 @@
-webkit-overflow-scrolling: touch;
}

/* .totalTitle {
font-size: 32px;
font-weight: 600;
text-align: center;
color: steelblue;
} */

.totalTitle {
font-size: 32px;
font-weight: 600;
text-align: center;
color: steelblue;
word-break: normal; /* 确保正常标题不会乱换行 */
overflow-wrap: break-word;
}

.totalNumber {
/* .totalNumber {
font-size: 32px;
font-weight: 700;
margin-right: 5px;
Expand All @@ -32,11 +53,27 @@
display: flex;
flex-direction: row;
align-items: center;
} */

.totalItem {
display: flex;
flex-direction: column; /* 核心:改为纵向堆叠,数字在上,文本在下,彻底根治重叠 */
align-items: flex-start; /* 左对齐 */
margin-bottom: 10px; /* 上下模块间距 */
}

.totalNumber {
font-size: 32px;
font-weight: 700;
margin-right: 0; /* 移除原本的横向右边距 */
margin-bottom: 2px; /* 数字和下方文字留出微小间距 */
line-height: 1.1; /* 限制行高,防止撑开 */
}

.totalPeriod {
font-size: 24px;
font-weight: 400;
text-align: center;/* 建议在极窄时居中或保持自然对齐 */
}

.totalDetail {
Expand Down
18 changes: 18 additions & 0 deletions src/components/Reports/TotalReport/TotalReportBarGraph.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
.svgContainer {
margin: 10px 0;
padding: 0;
/* Ensure the container spans full width and allows overflowing elements (like rotated labels) to remain visible */
width: 100%;
overflow: visible;
}

.svgChart {
width: 100%;
height: 100%;
/* Allow chart to fill container and prevent clipping of axis labels */
overflow: visible;
}

.bar {
Expand All @@ -22,3 +27,16 @@
color: #d1d5db;
}

/* Reduce base font size for chart text to prevent crowding */
.svgContainer text {
font-size: 10px;
}

/* Rotate X-axis year labels and adjust font size to prevent horizontal overlapping on narrow screens */
.svgContainer g.x-axis text,
.svgContainer .tick text {
transform: rotate(-35deg);
text-anchor: end;
font-size: 9px;
}

Loading