From 472bb7678ef381ac2a5950647975030dc1397032 Mon Sep 17 00:00:00 2001 From: Decio Neto <61292095+decito@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:19:27 -0300 Subject: [PATCH 1/3] fix: fix name rendering in ChartSingleTooltip component --- .../src/lib/registry/default/ui/chart/ChartSingleTooltip.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/www/src/lib/registry/default/ui/chart/ChartSingleTooltip.vue b/apps/www/src/lib/registry/default/ui/chart/ChartSingleTooltip.vue index 49ca011c..7d05af26 100644 --- a/apps/www/src/lib/registry/default/ui/chart/ChartSingleTooltip.vue +++ b/apps/www/src/lib/registry/default/ui/chart/ChartSingleTooltip.vue @@ -43,7 +43,7 @@ function template(d: any, i: number, elements: (HTMLElement | SVGElement)[]) { } else { const style = getComputedStyle(elements[i]) - const omittedData = [{ name: data.name, value: props.valueFormatter(data[props.index]), color: style.fill }] + const omittedData = [{ name: Object.values(data)[0], value: props.valueFormatter(data[props.index]), color: style.fill }] const componentDiv = document.createElement('div') const TooltipComponent = props.customTooltip ?? ChartTooltip createApp(TooltipComponent, { title: d[props.index], data: omittedData }).mount(componentDiv) From 37bcc011c5a2c0d6bb612db5d7a86a2f52093a76 Mon Sep 17 00:00:00 2001 From: Decio Neto <61292095+decito@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:41:09 -0300 Subject: [PATCH 2/3] fix: fix name of new-york ChartSingleTooltip component --- .../src/lib/registry/new-york/ui/chart/ChartSingleTooltip.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/www/src/lib/registry/new-york/ui/chart/ChartSingleTooltip.vue b/apps/www/src/lib/registry/new-york/ui/chart/ChartSingleTooltip.vue index 49ca011c..7d05af26 100644 --- a/apps/www/src/lib/registry/new-york/ui/chart/ChartSingleTooltip.vue +++ b/apps/www/src/lib/registry/new-york/ui/chart/ChartSingleTooltip.vue @@ -43,7 +43,7 @@ function template(d: any, i: number, elements: (HTMLElement | SVGElement)[]) { } else { const style = getComputedStyle(elements[i]) - const omittedData = [{ name: data.name, value: props.valueFormatter(data[props.index]), color: style.fill }] + const omittedData = [{ name: Object.values(data)[0], value: props.valueFormatter(data[props.index]), color: style.fill }] const componentDiv = document.createElement('div') const TooltipComponent = props.customTooltip ?? ChartTooltip createApp(TooltipComponent, { title: d[props.index], data: omittedData }).mount(componentDiv) From 3d6f6951c3c4cbdb360190472ec0cd18d9409b13 Mon Sep 17 00:00:00 2001 From: Decio Neto Date: Wed, 17 Jul 2024 16:55:52 -0300 Subject: [PATCH 3/3] fix: fix content of ChartSingleTooltip in styles files --- apps/www/src/public/registry/styles/default/chart.json | 2 +- apps/www/src/public/registry/styles/new-york/chart.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/www/src/public/registry/styles/default/chart.json b/apps/www/src/public/registry/styles/default/chart.json index a46e4842..35b0a570 100644 --- a/apps/www/src/public/registry/styles/default/chart.json +++ b/apps/www/src/public/registry/styles/default/chart.json @@ -19,7 +19,7 @@ }, { "name": "ChartSingleTooltip.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "ChartTooltip.vue", diff --git a/apps/www/src/public/registry/styles/new-york/chart.json b/apps/www/src/public/registry/styles/new-york/chart.json index e7776885..e858e622 100644 --- a/apps/www/src/public/registry/styles/new-york/chart.json +++ b/apps/www/src/public/registry/styles/new-york/chart.json @@ -19,7 +19,7 @@ }, { "name": "ChartSingleTooltip.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "ChartTooltip.vue",