feat: add loading spinner, empty state, and error handling to chart area (Task 5.2)

This commit is contained in:
Andrew Charlwood
2026-02-06 14:16:26 +00:00
parent 4540e110e1
commit 5593d08062
3 changed files with 98 additions and 29 deletions
+4 -4
View File
@@ -235,10 +235,10 @@ Drawer selection → update_drug_selection → app-state store → load_pathway_
- **Checkpoint**: Selecting trusts filters the chart correctly
### 5.2 Loading/error/empty states + dynamic hierarchy label
- [ ] Add `dcc.Loading` wrapper around chart area
- [ ] Show "No data" message when chart-data is empty
- [ ] Show error toast/alert when database query fails
- [ ] Dynamic chart subtitle: "Trust → Directorate → Drug → Pathway" or "Trust → Indication → Drug → Pathway" based on chart type
- [x] Add `dcc.Loading` wrapper around chart area
- [x] Show "No data" message when chart-data is empty
- [x] Show error feedback when database query fails
- [x] Dynamic chart subtitle: "Trust → Directorate → Drug → Pathway" or "Trust → Indication → Drug → Pathway" based on chart type (done in Task 3.4)
- **Checkpoint**: Loading spinner appears during data fetch, empty state shows message
### 5.3 Data freshness indicator