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)} {formatLabel(point.id, activeDataKey)}
</Typography> </Typography>
{comparison && point.compareLabel && activeDataKey !== "daily" && (
<Typography <Typography
variant="caption" variant="caption"
sx={{ sx={{
fontSize: "0.7rem", fontSize: "0.65rem",
opacity: 0.7,
color: "grey.400", color: "grey.400",
visibility:
comparison && point.compareLabel && activeDataKey !== "daily"
? "visible"
: "hidden"
}} }}
> >
{formatLabel(point.compareLabel, activeDataKey)} {point.compareLabel
? formatLabel(point.compareLabel, activeDataKey)
: "placeholder"}
</Typography> </Typography>
)}
</Box> </Box>
</Box> </Box>
); );