diff --git a/DESIGN.md b/DESIGN.md index 1ee0494..6af95ff 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -132,6 +132,7 @@ The approved Persian-first baseline remains authoritative where the shipped arti | Version | Date | Decision | | ------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0.9.0 | 2026-08-20 | Added labeled X/Y axes and Persian ticks to the payment-history chart, and made the fee-share donut fluidly fill its dedicated visual column on larger viewports. | | 0.8.0 | 2026-08-20 | Increased light-theme skeleton contrast, constrained and animated chart tooltips, made default period choices explicitly applicable, hid collapsed-sidebar labels, and strengthened the separation between period type and exact-period controls. | | 0.7.0 | 2026-08-20 | Made period changes confirm-on-selection, moved narrow-screen filters into a bottom sheet, enlarged collapsed navigation targets, simplified focus rings, and promoted the fee-share chart into a dedicated visual column. | | 0.6.0 | 2026-08-20 | Added full-span Jalali period selection, unified transaction status/amount controls, persistent skeleton states, custom RTL dropdowns, semantic peer/retry tones, and fee-share visualization; tightened the narrow navbar and 600px KPI breakpoint. | @@ -289,7 +290,7 @@ Scope changes immediately replace data-dependent cards, tables, detail panels, a ### Payment-History Chart -The signature chart is a blue line with outlined points, a low-opacity blue area, and dashed neutral gridlines. It follows a written title and reporting-period chip, provides focusable points with spoken values, and animates its initial trace once over 900ms while reduced-motion collapses the effect. Point tooltips use a short scale/fade transition, flip above or below according to vertical room, and clamp their center so the surface never leaves the chart wrapper. +The signature chart is a blue line with outlined points, a low-opacity blue area, dashed neutral gridlines, labeled X/Y axes, Persian date ticks, and successful-payment count ticks. It follows a written title and reporting-period chip, provides focusable points with spoken values, and animates its initial trace once over 900ms while reduced-motion collapses the effect. Point tooltips use a short scale/fade transition, flip above or below according to vertical room, and clamp their center so the surface never leaves the chart wrapper. ### Transaction Table diff --git a/src/lib/components/FeeShareDonut.svelte b/src/lib/components/FeeShareDonut.svelte index 69bd434..023a783 100644 --- a/src/lib/components/FeeShareDonut.svelte +++ b/src/lib/components/FeeShareDonut.svelte @@ -13,7 +13,7 @@
@@ -54,3 +56,11 @@
+ + diff --git a/src/lib/components/PaymentHistoryChart.svelte b/src/lib/components/PaymentHistoryChart.svelte index d9b79a0..67a3292 100644 --- a/src/lib/components/PaymentHistoryChart.svelte +++ b/src/lib/components/PaymentHistoryChart.svelte @@ -9,16 +9,27 @@ let active = $state(null); const width = 760; - const height = 250; - const pad = { x: 34, y: 28 }; + const height = 280; + const pad = { top: 24, right: 24, bottom: 52, left: 68 }; const max = $derived(Math.max(1, ...data.map((point) => point.bankPaidSessions))); const positions = $derived( data.map((point, index) => ({ ...point, - x: pad.x + (index * (width - pad.x * 2)) / Math.max(1, data.length - 1), - y: height - pad.y - (point.bankPaidSessions / max) * (height - pad.y * 2), + x: pad.left + (index * (width - pad.left - pad.right)) / Math.max(1, data.length - 1), + y: height - pad.bottom - (point.bankPaidSessions / max) * (height - pad.top - pad.bottom), })), ); + const xTickIndexes = $derived.by(() => { + const tickCount = Math.min(6, data.length); + if (tickCount <= 1) return data.length ? [0] : []; + return [ + ...new Set( + Array.from({ length: tickCount }, (_, index) => + Math.round((index * (data.length - 1)) / (tickCount - 1)), + ), + ), + ]; + }); const path = $derived( positions.map((point, index) => `${index ? 'L' : 'M'} ${point.x} ${point.y}`).join(' '), ); @@ -38,7 +49,7 @@ } -
+
{#if data.length === 0}
داده‌ای برای این بازه ثبت نشده است. @@ -46,7 +57,7 @@ {:else} @@ -57,17 +68,64 @@ {#each [0, 1, 2, 3, 4] as row} + {@const y = pad.top + (row * (height - pad.top - pad.bottom)) / 4} + {formatValue(Math.round(max * (1 - row / 4)))} {/each} + + + {#each xTickIndexes as tickIndex} + {@const tick = positions[tickIndex]} + + {persianDate(tick.localDate)} + {/each} + تاریخ + تعداد پرداخت موفق