- {/* Labels now come from axisLabels (the real column
- names for whatever dataset is loaded) instead of
+
+ {/* Labels come from axisLabels (the real column names
+ for whatever dataset is loaded) instead of
hardcoded E/C/W letters — keeps this panel
consistent with what Axes.tsx shows on the grid
- itself, for any dataset, not just the original one. */}
+ itself, for any dataset, not just the original one.
+ Each metric is its own label-left/value-right row,
+ matching the UID and Classification rows above,
+ rather than a 3-column grid where the axis name
+ only appeared in a header line and hover tooltip —
+ that made it easy to misread which value belonged
+ to which axis at a glance.
+ Mapped over ["x","y","z"] rather than three
+ hand-written blocks: the three rows were
+ structurally identical (same classNames, same
+ .toFixed(3) call), differing only in which axis
+ key they read — copy-pasting that three times
+ meant any future styling change had to be applied
+ in three places and risked drifting out of sync.
+ Border check uses arr.length - 1 (not the literal
+ 2) so the "no border on the last row" rule stays
+ correct even if this array's size ever changes,
+ rather than depending on someone remembering to
+ update a hardcoded index alongside it. */}
- Metrics ({axisLabels.x}, {axisLabels.y}, {axisLabels.z})
+ Metrics
-
+ {(["x", "y", "z"] as const).map((axis, i, arr) => (
- {hoveredPoint.x.toFixed(3)}
+
+ {axisLabels[axis]}
+
+
+ {hoveredPoint[axis].toFixed(3)}
+
-
- {hoveredPoint.y.toFixed(3)}
-
-
- {hoveredPoint.z.toFixed(3)}
-
-
+ ))}