From de59eb121383f25c928427ac6509592d4147cd8f Mon Sep 17 00:00:00 2001 From: linzhe Date: Thu, 2 Apr 2026 22:05:05 +0800 Subject: [PATCH 1/2] fix(chart-legend): avoid undefined type by using value from Object.entries --- apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue b/apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue index 32773128c..2b2a7a42d 100644 --- a/apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue +++ b/apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue @@ -19,7 +19,7 @@ const { id, config } = useChart() const payload = computed(() => Object.entries(config.value).map(([key, value]) => { return { key: props.nameKey || key, - itemConfig: config.value[key], + itemConfig: value, } })) From 53c0cd95ab148bac57ccff2708a4998439e84c31 Mon Sep 17 00:00:00 2001 From: linzhe Date: Thu, 2 Apr 2026 22:18:57 +0800 Subject: [PATCH 2/2] chore: update --- apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue b/apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue index 2b2a7a42d..1fb59f938 100644 --- a/apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue +++ b/apps/v4/registry/new-york-v4/ui/chart/ChartLegendContent.vue @@ -45,7 +45,7 @@ onMounted(() => { '[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3', )" > - +
{ }" /> - {{ itemConfig?.label }} + {{ itemConfig.label }}