Files
HighCostDrugsDemo/src
Andrew Charlwood 90de24c72d fix: adaptive legends + _base_layout for 4 chart functions (Task A.3)
- Add _smart_legend(n_items) and _smart_legend_margin(n_items) helpers
  - >15 items: vertical right legend with extra right margin
  - <=15 items: horizontal legend with dynamic bottom margin
- Apply _base_layout() + _smart_legend() to:
  - create_market_share_figure() — DRUG_PALETTE, adaptive legend
  - create_trust_market_share_figure() — DRUG_PALETTE, adaptive legend
  - create_dosing_figure() — DRUG_PALETTE, legend adapts to trace count
  - create_trust_duration_figure() — TRUST_PALETTE, fixed l=200 margin
- Replace all local nhs_colours lists with module-level palettes
- Net reduction of 48 lines via DRY layout code
2026-02-07 02:43:35 +00:00
..