Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions client/src/components/ContactCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,16 @@ export function ContactCard({
<XAxis dataKey="timestamp" hide />
<YAxis domain={['auto', 'auto']} />
<Tooltip
labelFormatter={(t: number) => new Date(t).toLocaleTimeString()}
contentStyle={{ borderRadius: '8px', border: 'none', boxShadow: '0 4px 6px -1px rgb(0 0 0 / 0.1)' }}
labelFormatter={(label) => {
const t = typeof label === "number" ? label : Number(label);
if (!Number.isFinite(t)) return String(label ?? "");
return new Date(t).toLocaleTimeString();
}}
contentStyle={{
borderRadius: "8px",
border: "none",
boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)",
}}
/>
<Line type="monotone" dataKey="avg" stroke="#3b82f6" strokeWidth={2} dot={false} name="Avg RTT" isAnimationActive={false} />
<Line type="step" dataKey="threshold" stroke="#ef4444" strokeDasharray="5 5" dot={false} name="Threshold" isAnimationActive={false} />
Expand Down