mirror of
https://github.com/makeplane/plane.git
synced 2025-12-24 23:59:40 +01:00
[WEB-3035] chore: add labels to treemap chart (#6313)
This commit is contained in:
1
packages/types/src/charts.d.ts
vendored
1
packages/types/src/charts.d.ts
vendored
@@ -35,6 +35,7 @@ export type TStackedBarChartProps<K extends string, T extends string> = {
|
||||
export type TreeMapItem = {
|
||||
name: string;
|
||||
value: number;
|
||||
label?: string;
|
||||
textClassName?: string;
|
||||
icon?: React.ReactElement;
|
||||
} & (
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user