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