labels with proper formatting

This commit is contained in:
2026-04-07 11:14:04 +05:30
parent 6c305e0cdd
commit ce0c34d014

View File

@@ -254,18 +254,21 @@ export default function HistoryChart({
{formatLabel(point.id, activeDataKey)}
</Typography>
{comparison && point.compareLabel && activeDataKey !== "daily" && (
<Typography
variant="caption"
sx={{
fontSize: "0.7rem",
opacity: 0.7,
color: "grey.400",
}}
>
{formatLabel(point.compareLabel, activeDataKey)}
</Typography>
)}
<Typography
variant="caption"
sx={{
fontSize: "0.65rem",
color: "grey.400",
visibility:
comparison && point.compareLabel && activeDataKey !== "daily"
? "visible"
: "hidden"
}}
>
{point.compareLabel
? formatLabel(point.compareLabel, activeDataKey)
: "placeholder"}
</Typography>
</Box>
</Box>
);