Recharts 3.7.0 現已發佈。Cell已被棄用,將在下一個主要版本中移除。建議將所有Cellusage 遷移到相應圖表元素的shapeprop。
具體更新內容包括:
Feat
New Hooks
useIsTooltipActive:返回提示框是否處於活動狀態 #6880useActiveTooltipCoordinate:返回當前 tooltip coordinate #6880
Other
Tooltip:允許offsetprop 接受 Coordinate 對象 #6868
X/YAxis中添加新的 axis type: "auto" #6823- 將 categorical axes 設置為“categor”,將數值軸的類型設置為“number”。
X/YAxis:替換tick: any為顯式類型 #6911Bar/TypeScript:添加BarShapeProps類型以修復Bar.shape類型 #6900TypeScript:為shape和content函數等添加缺失的 useful type exports #6852
Fix
BarChart:修復單個序列中包含 3 個或更多正值時stackOffset=sign的圖表問題 #6807BarStack:修復使用 Vite 構建時出現的循環依賴問題 #6777BarStackBarStackclipPath:在stackOffset=sign圖表中用修復 BarStack clipPath 問題 #6806BarStack:對 active bars 應用 bar stack radius #6906
Chore
-
已啓用
stricttsconfig #6842
Docs
已經開始大部分文檔自動生成,代碼、網站和 storybook 的文檔準確性有了顯著提高。
- 深色模式 #6828
- 為了方便問題調試,Recharts 開發工具已添加到所有網站示例中。
更新説明:https://github.com/recharts/recharts/releases/tag/v3.7.0