[WEB-3035] chore: add labels to treemap chart (#6313)

This commit is contained in:
Prateek Shourya 2025-01-03 20:03:11 +05:30 committed by GitHub
parent 2622dd691c
commit c1407daa47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -31,6 +31,7 @@ export const CustomTreeMapContent = ({
height,
name,
value,
label,
fillColor,
fillClassName,
textClassName,
@ -109,10 +110,11 @@ export const CustomTreeMapContent = ({
x={pX + TEXT_PADDING_LEFT}
y={pY + pHeight - TEXT_PADDING_LEFT}
textAnchor="start"
className={cn("text-xs", textClassName || "text-custom-text-300")}
className={cn("text-xs font-light tracking-wider", textClassName || "text-custom-text-300")}
fill="currentColor"
>
{value?.toLocaleString()}
{label && ` ${label}`}
</text>
</g>
);