Skip to content

Commit

Permalink
PR code review
Browse files Browse the repository at this point in the history
Signed-off-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
jovancvetkovic3006 committed Feb 19, 2023
1 parent 9b212fb commit 9d747b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/utils/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
});
}
Expand Down

0 comments on commit 9d747b3

Please sign in to comment.