From 9d747b302a0204bbbba3e27f0d07cd6211513de3 Mon Sep 17 00:00:00 2001 From: Jovan Cvetkovic Date: Sun, 19 Feb 2023 18:08:56 +0100 Subject: [PATCH] PR code review Signed-off-by: Jovan Cvetkovic --- public/utils/helpers.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/utils/helpers.tsx b/public/utils/helpers.tsx index 9d7c0d726..d076438af 100644 --- a/public/utils/helpers.tsx +++ b/public/utils/helpers.tsx @@ -167,13 +167,13 @@ export function renderVisualization(spec: TopLevelSpec, containerId: string) { } function renderVegaSpec(spec: {}) { - let pathGroup: any[] = []; + let chartColoredItems: any[] = []; const handler = new Handler({ formatTooltip: (value, sanitize) => { let tooltipData = { ...value }; let values = Object.entries(tooltipData); if (!values.length) return ''; - const tooltipItem = pathGroup.filter((groupItem: any) => + const tooltipItem = chartColoredItems.filter((groupItem: any) => _.isEqual(groupItem.tooltip, tooltipData) ); const color = tooltipItem.length @@ -222,7 +222,7 @@ export function renderVisualization(spec: TopLevelSpec, containerId: string) { (item: any) => item.name && item.name.match(/^(layer_).*(_marks)$/) ); for (let item of groups) { - pathGroup = pathGroup.concat(item.items); + chartColoredItems = chartColoredItems.concat(item.items); } }); }