feat: enhance Tauri charts with smooth curves and forecasting

- Implemented a smooth curve rendering for the TauriLineChart using a cubic Bezier path.
- Added a forecasting feature to project trends based on recent data points.
- Updated TauriDashboardView to pass the current month for accurate forecasting.
- Refactored TauriLineChart to handle actual and forecasted data points distinctly.
- Introduced gradient strokes and glow effects to align with ApexCharts styling.
- Enhanced user interaction with hover markers and tooltips for forecasted data.
- Added a new test suite for ClinicDetailPage to ensure proper rendering and functionality.
This commit is contained in:
hamed
2026-07-19 11:25:45 +03:30
parent 15366788d5
commit e7de7aa88b
6 changed files with 492 additions and 234 deletions
+3
View File
@@ -33,6 +33,7 @@ function useJalaliChartPeriod() {
return {
currentJalaliYear: now.jy,
currentJalaliMonth: now.jm,
patientsYear: now.jy,
patientsMonth,
setPatientsMonth,
@@ -671,6 +672,7 @@ function ClinicDashboard() {
revenueYear={chartPeriod.revenueYear}
onRevenueYearChange={chartPeriod.setRevenueYear}
currentJalaliYear={chartPeriod.currentJalaliYear}
currentJalaliMonth={chartPeriod.currentJalaliMonth}
/>
</div>
@@ -833,6 +835,7 @@ function DoctorDashboard() {
revenueYear={chartPeriod.revenueYear}
onRevenueYearChange={chartPeriod.setRevenueYear}
currentJalaliYear={chartPeriod.currentJalaliYear}
currentJalaliMonth={chartPeriod.currentJalaliMonth}
/>
<div className="grid-2" style={{ marginTop: 'var(--gap)' }}>