Commit Graph

80 Commits

Author SHA1 Message Date
MarkLo 7d5155052b 2025-12-16 00:18:15 +08:00
MarkLo 07f76294d8 2025-12-14 03:48:26 +08:00
MarkLo cf4aaa09b1 feat: auto-save reports + fix PDF download from history
1. Auto-save reports when page closes:
   - Added beforeunload handler to auto-save analysis to history
   - Saves to local IndexedDB and cloud (if authenticated)
   - Prevents data loss if user accidentally closes the page

2. Fix PDF download from history page:
   - Made taskId optional in DownloadReports component
   - Added direct mode: can pass reports data directly
   - Updated backend to support both task-based and direct-data modes
   - History reports now have download PDF option available
2025-12-14 03:21:59 +08:00
MarkLo 3f13475485 feat: add Heikin Ashi candlestick and volume charts to PDF reports
- Add matplotlib for chart generation
- Implement _calculate_heikin_ashi() for HA OHLC calculation
- Implement _generate_price_chart() to create candlestick + volume charts
- Charts are generated as PNG images and embedded in PDF
- Fallback to text summary if chart generation fails
- First page now shows visual charts like the web interface
2025-12-14 03:11:47 +08:00
MarkLo 9ceff4cf9b feat: add price information cover page to analyst PDF reports
- Page 1 now shows price statistics (growth rate, duration, start/end prices)
- Page 1 also includes last 5 trading days data
- Page 2+ contains the original analyst insights
- Updates pdf_generator.py, download_service.py, and routes.py
2025-12-14 02:45:14 +08:00
MarkLo 0bddce0cdc 2025-12-13 16:48:12 +08:00
MarkLo 8b2dbe9437 2025-12-13 06:50:03 +08:00
MarkLo 7926eb74b4 2025-12-13 06:42:20 +08:00
MarkLo 2a65c7f44d 2025-12-13 06:34:48 +08:00
MarkLo 5d3751602e 2025-12-13 06:00:19 +08:00
MarkLo 95f6b25333 2025-12-13 02:26:49 +08:00
MarkLo 8204aff28b 2025-12-13 01:54:47 +08:00
MarkLo 4269fdec26 2025-12-12 19:01:49 +08:00
MarkLo da7d05ecc9 2025-12-12 05:30:04 +08:00
MarkLo 482d8fa6aa 2025-12-11 15:00:30 +08:00
MarkLo 20e0c6a2d9 2025-12-11 13:46:33 +08:00
MarkLo 71fb9844ee 2025-12-11 01:18:46 +08:00
MarkLo a51b31dc21 2025-12-11 00:37:19 +08:00
MarkLo 886694b62f 2025-12-10 23:51:07 +08:00
MarkLo 33e58ff389 2025-12-07 21:40:58 +08:00
MarkLo c2b8706bf2 2025-12-07 17:13:57 +08:00
MarkLo 0792830c3d 2025-12-07 16:51:11 +08:00
MarkLo 915ee9915c 2025-12-07 03:54:52 +08:00
MarkLo 5dee4b323c 2025-12-05 23:34:50 +08:00
MarkLo 8304898d5c 2025-12-01 03:04:54 +08:00
MarkLo 4e21142757 2025-11-27 04:10:14 +08:00
MarkLo 44705c79a7 2025-11-27 03:58:07 +08:00
MarkLo 787e2a50e6 2025-11-26 23:12:52 +08:00
MarkLo 96b90b01da 2025-11-26 19:43:52 +08:00
MarkLo c9e092202c 2025-11-26 18:44:47 +08:00
MarkLo 85b2fffef3 2025-11-26 18:15:55 +08:00
MarkLo cef75b21bd 2025-11-26 17:41:16 +08:00
MarkLo 4acfd69fb5 2025-11-26 17:14:54 +08:00
MarkLo c93d118308 2025-11-26 15:28:36 +08:00
MarkLo 3dcdbb5659 2025-11-26 13:39:14 +08:00
MarkLo 5de461e1df 2025-11-26 11:23:07 +08:00
MarkLo 8d3c8dc2a6 2025-11-25 20:48:39 +08:00
MarkLo b5821bb467 2025-11-25 19:23:50 +08:00
MarkLo fa2f2a255d 2025-11-25 19:22:42 +08:00
MarkLo a53fcf98bf 2025-11-25 19:04:23 +08:00
MarkLo 257f5da12f 2025-11-25 18:07:12 +08:00
MarkLo 8d679007bf 2025-11-25 17:03:17 +08:00
MarkLo 15babc2bea 2025-11-25 05:35:54 +08:00
MarkLo 3b89cc2f5c 2025-11-25 04:18:43 +08:00
MarkLo acaac87ef3 2025-11-25 02:50:00 +08:00
MarkLo 63ac0668ac 2025-11-25 02:13:52 +08:00
MarkLo 2137172e7b 2025-11-24 11:19:23 +08:00
MarkLo 6fcd6d896d 2025-11-24 11:08:34 +08:00
MarkLo 02b83a6ddd 2025-11-23 07:31:00 +08:00
MarkLo 91ad37412b 2025-11-23 03:14:49 +08:00