气温走势图 Y 轴和 UMA 阈值标签从右侧移至左侧
This commit is contained in:
@@ -327,14 +327,14 @@ export function LiveTemperatureThresholdChart({
|
|||||||
<ReLineChart data={data} margin={{ top: 16, right: 28, left: 8, bottom: 8 }}>
|
<ReLineChart data={data} margin={{ top: 16, right: 28, left: 8, bottom: 8 }}>
|
||||||
<CartesianGrid stroke="#dbe6ef" strokeDasharray="2 2" />
|
<CartesianGrid stroke="#dbe6ef" strokeDasharray="2 2" />
|
||||||
<XAxis dataKey="label" tick={{ fontSize: 10, fill: "#64748b" }} tickLine={false} axisLine={{ stroke: "#cbd5e1" }} interval={2} />
|
<XAxis dataKey="label" tick={{ fontSize: 10, fill: "#64748b" }} tickLine={false} axisLine={{ stroke: "#cbd5e1" }} interval={2} />
|
||||||
<YAxis tick={{ fontSize: 10, fill: "#64748b" }} tickFormatter={(v) => `${Number(v).toFixed(1)}°`} orientation="right" axisLine={{ stroke: "#cbd5e1" }} tickLine={false} />
|
<YAxis tick={{ fontSize: 10, fill: "#64748b" }} tickFormatter={(v) => `${Number(v).toFixed(1)}°`} axisLine={{ stroke: "#cbd5e1" }} tickLine={false} />
|
||||||
{threshold !== null && (
|
{threshold !== null && (
|
||||||
<ReferenceLine
|
<ReferenceLine
|
||||||
y={threshold}
|
y={threshold}
|
||||||
stroke="#f97316"
|
stroke="#f97316"
|
||||||
strokeDasharray="4 3"
|
strokeDasharray="4 3"
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
label={{ value: `UMA ${threshold.toFixed(1)}°`, fill: "#f97316", fontSize: 10, position: "right" }}
|
label={{ value: `UMA ${threshold.toFixed(1)}°`, fill: "#f97316", fontSize: 10, position: "left" }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
|||||||
Reference in New Issue
Block a user