-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
P2Priority 2Priority 2analysis-modeAnalysis Mode featureAnalysis Mode featureenhancementNew feature or requestNew feature or requestin-progressWork currently in progressWork currently in progressjavascriptPull requests that update javascript codePull requests that update javascript codephase-2Phase 2 roadmapPhase 2 roadmap
Description
Parent Epic
依賴
- [Phase2-2.1] DateTruncator 跨 DB 日期截斷 Expression Tree #98 (2.1 DateTruncator)
- [Phase2-2.2] 日期鑽取 Frontend UI #99 (2.2 日期鑽取 Frontend)
任務
點擊圖表柱體/節點 → 自動加 filter 條件重新查詢(下鑽一層)。
實作
修改 framework_analysis.js:
1. drill 歷史堆疊
_state[gridId].drillStack = [];
// 每次 drill-down:push 當前 selection + filters
// 「返回上層」按鈕:pop 並重新查詢2. ECharts click handler
chart.on('click', (params) => {
// params.name = 維度值(如 "華東")
// 自動加入 filter: { field: dimField, operator: "Eq", value: "華東" }
// 若有日期鑽取:自動降一個 hierarchy(Year → Quarter → Month → Day)
// 重新 query()
});3. UI
- 顯示當前 drill 路徑(如
全部 > 華東 > 2026-Q1) - 「返回上層」按鈕
- 「重置」回到最頂層
驗證
- Jest 測試:drillStack push/pop
- Jest 測試:自動 filter 建構
- Jest 測試:日期自動降階
複雜度
中
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Priority 2Priority 2analysis-modeAnalysis Mode featureAnalysis Mode featureenhancementNew feature or requestNew feature or requestin-progressWork currently in progressWork currently in progressjavascriptPull requests that update javascript codePull requests that update javascript codephase-2Phase 2 roadmapPhase 2 roadmap