fix: use any type for recharts tooltip formatter to bypass strict check

This commit is contained in:
root 2026-02-27 11:52:29 +00:00
parent ec7fa415c5
commit b25ac2e04d

View File

@ -238,7 +238,8 @@ function FlowAnalysis({ symbol }: { symbol: Symbol }) {
<XAxis dataKey="time" tick={{ fill: "#94a3b8", fontSize: 10 }} tickLine={false} interval="preserveStartEnd" />
<YAxis tick={{ fill: "#94a3b8", fontSize: 10 }} tickLine={false} axisLine={false} width={50} />
<Tooltip
formatter={(v: number) => [`${v.toFixed(2)}`, "Delta"]}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
formatter={(v: any) => [`${Number(v).toFixed(2)}`, "Delta"]}
contentStyle={{ background: "#fff", border: "1px solid #e2e8f0", borderRadius: 8, fontSize: 11 }}
/>
<ReferenceLine y={0} stroke="#94a3b8" strokeDasharray="4 2" />
@ -259,7 +260,8 @@ function FlowAnalysis({ symbol }: { symbol: Symbol }) {
<XAxis dataKey="time" tick={{ fill: "#94a3b8", fontSize: 10 }} tickLine={false} interval="preserveStartEnd" />
<YAxis tick={{ fill: "#94a3b8", fontSize: 10 }} tickLine={false} axisLine={false} width={50} />
<Tooltip
formatter={(v: number, name: string) => [`${v.toFixed(2)}`, name === "buy" ? "主动买" : "主动卖"]}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
formatter={(v: any, name: any) => [`${Number(v).toFixed(2)}`, name === "buy" ? "主动买" : "主动卖"]}
contentStyle={{ background: "#fff", border: "1px solid #e2e8f0", borderRadius: 8, fontSize: 11 }}
/>
<Area type="monotone" dataKey="buy" stroke="#16a34a" fill="#f0fdf4" strokeWidth={1.5} dot={false} connectNulls />