fix: recharts tooltip formatter type
This commit is contained in:
parent
155dc87df3
commit
ec7fa415c5
@ -238,7 +238,7 @@ 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"]}
|
||||
formatter={(v: 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 +259,7 @@ 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" ? "主动买" : "主动卖"]}
|
||||
formatter={(v: number, name: string) => [`${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 />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user