svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
indicator === "dot" && "items-center"
@@ -230,12 +247,14 @@ function ChartTooltipContent({
{nestLabel ? tooltipLabel : null}
- {itemConfig?.label || item.name}
+ {itemConfig?.label ?? item.name}
- {item.value && (
+ {item.value != null && (
- {item.value.toLocaleString()}
+ {typeof item.value === "number"
+ ? item.value.toLocaleString()
+ : String(item.value)}
)}
@@ -257,11 +276,10 @@ function ChartLegendContent({
payload,
verticalAlign = "bottom",
nameKey,
-}: React.ComponentProps<"div"> &
- Pick