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 49ca011cc..7d05af267 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) 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 49ca011cc..7d05af267 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) diff --git a/apps/www/src/public/registry/styles/default/chart.json b/apps/www/src/public/registry/styles/default/chart.json index a46e4842a..35b0a5707 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 e7776885c..e858e622c 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",