Skip to content

Commit

Permalink
refactor: remove groupedIds
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdanielamoitzi committed Jun 11, 2024
1 parent e89033f commit 7866131
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/vis/bar/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@ export function BarChart({

const [legendBoxRef] = useResizeObserver();

const groupedIds = useMemo(() => {
if (!groupedTable) {
return [];
}
return groupedTable
.groupby('group')
.rollup({ ids: op.array_agg('ids') })
.objects()
.map((val: { group: string; ids: string[][] }) => ({ group: val.group, ids: val.ids.flat() }));
}, [groupedTable]);

const customSelectionCallback = useCallback(
(e: React.MouseEvent<SVGGElement | HTMLDivElement, MouseEvent>, ids: string[]) => {
if (e.ctrlKey) {
Expand Down Expand Up @@ -91,7 +80,6 @@ export function BarChart({
<Box ref={legendBoxRef}>
{groupColorScale ? (
<Legend
groupedIds={groupedIds}
left={60}
categories={groupColorScale.domain()}
filteredOut={filteredOut}
Expand Down

0 comments on commit 7866131

Please sign in to comment.