Improve chart UX: taller charts, controls below header

- Increase chart height from 280px to 380px (more square-like)
- Move controls below chart title (column layout)
- Spread two control groups left/right with space-between
- Make controls more compact (smaller padding, font-size)
This commit is contained in:
fahed
2026-02-03 15:53:14 +03:00
parent 60eda25fe3
commit 1d7389cd43

View File

@@ -461,7 +461,7 @@ html[dir="rtl"] {
} }
.chart-container { .chart-container {
height: 280px; height: 380px;
position: relative; position: relative;
} }
@@ -798,28 +798,28 @@ table tbody tr:hover {
.chart-metric-selector { .chart-metric-selector {
display: flex; display: flex;
gap: 4px; gap: 2px;
background: var(--bg); background: var(--bg);
padding: 4px; padding: 2px;
border-radius: 8px; border-radius: 6px;
} }
/* Toggle switch style (Daily/Weekly) */ /* Toggle switch style (Daily/Weekly) - compact */
.toggle-switch { .toggle-switch {
display: flex; display: flex;
background: var(--border); background: var(--border);
padding: 3px; padding: 2px;
border-radius: 10px; border-radius: 6px;
gap: 2px; gap: 1px;
} }
.toggle-switch button { .toggle-switch button {
border: none; border: none;
background: transparent; background: transparent;
color: var(--text-muted); color: var(--text-muted);
padding: 6px 14px; padding: 4px 10px;
border-radius: 8px; border-radius: 5px;
font-size: 0.8125rem; font-size: 0.6875rem;
font-weight: 600; font-weight: 600;
cursor: pointer; cursor: pointer;
transition: all 0.2s ease; transition: all 0.2s ease;
@@ -833,7 +833,7 @@ table tbody tr:hover {
.toggle-switch button.active { .toggle-switch button.active {
background: var(--surface); background: var(--surface);
color: var(--text-primary); color: var(--text-primary);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
} }
/* Data Labels Toggle */ /* Data Labels Toggle */
@@ -867,9 +867,9 @@ table tbody tr:hover {
border: none; border: none;
background: transparent; background: transparent;
color: var(--text-muted); color: var(--text-muted);
padding: 7px 14px; padding: 4px 10px;
border-radius: 6px; border-radius: 5px;
font-size: 0.8125rem; font-size: 0.6875rem;
font-weight: 500; font-weight: 500;
cursor: pointer; cursor: pointer;
transition: all 0.2s; transition: all 0.2s;
@@ -1875,10 +1875,9 @@ table tbody tr:hover {
.chart-header-with-export { .chart-header-with-export {
display: flex; display: flex;
align-items: flex-start; flex-direction: column;
justify-content: space-between; gap: 10px;
gap: 16px; margin-bottom: 12px;
margin-bottom: 16px;
padding-right: 44px; /* Space for absolute download button */ padding-right: 44px; /* Space for absolute download button */
} }
@@ -1889,16 +1888,16 @@ html[dir="rtl"] .chart-header-with-export {
.chart-header-with-export h2 { .chart-header-with-export h2 {
margin: 0; margin: 0;
font-size: 1rem; font-size: 0.9375rem;
font-weight: 600; font-weight: 600;
color: var(--text-primary); color: var(--text-primary);
line-height: 1.4; line-height: 1.3;
flex-shrink: 0;
} }
.chart-header-actions { .chart-header-actions {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
gap: 8px; gap: 8px;
flex-wrap: wrap; flex-wrap: wrap;
} }