Jayeola Gbenga
11/12/2024, 12:23 PMTim Wu
11/12/2024, 7:27 PMMUHAMMAD Abbas khan
11/13/2024, 1:53 PMChris McClellan
11/14/2024, 10:30 PMJames Conway
11/28/2024, 2:17 PMAugust Felix
12/01/2024, 6:21 PMAlex Wein
12/02/2024, 6:51 PMCraig Latta
12/03/2024, 8:27 PMHoller Roberto
12/04/2024, 9:06 PMMichael Shafir
12/12/2024, 8:09 PMJean-Christophe Nicolas
12/16/2024, 6:20 PMJean-Christophe Nicolas
12/17/2024, 10:36 AM{ x, y }
values added to them.
With the data nodes looking more like: [{ x, y, group, strength }]
,
Q. how would I be able to create a filtered collection of group
and draw a circle (arc) around all of them?
I have all my nodes as follows
const nodes = data.nodes.map((d) => ({ ...d }));
I define a group
const works = d3.group(nodes, (d) => d.group === 'Works');
I draw the nodes
const node = svg
.append('g')
.attr('stroke', '#fff')
.attr('stroke-width', 1.5)
.selectAll('circle')
.data(nodes)
.join('circle')
.attr('r', 5)
.attr('fill', (d) => color(d.group));
I want to target the works collection and do something
const group = svg
.append('g')
.attr('dashed', '#f5f')
.attr('stroke-width', 3)
.selectAll('circle')
.data(w)
.join('circle')
.attr('r', 45)
.attr('fill', 'rgba(0,0,0,0.125');
I get a circle in the center of the page only.
The real Question is - How would I manipulate the works
data so I could draw a circle around all of the points?Kevin Lim
12/27/2024, 3:10 AMKevin Lim
12/27/2024, 3:11 AMMustjaab
01/01/2025, 5:48 AMVyshnave K
01/21/2025, 12:17 PMZahra Mosayebi
01/25/2025, 4:31 PMLi Alvin
01/26/2025, 5:44 PMLao
02/13/2025, 4:33 PMHeather Liu Leary
03/03/2025, 9:40 PMBryony Miles
04/02/2025, 2:43 PMKolby Heacock
04/23/2025, 1:02 AMThư Vũ Thị Bích
04/25/2025, 9:29 AMDong Rui Wang
04/27/2025, 1:11 PMW
05/18/2025, 4:24 PMKyle
05/18/2025, 9:33 PMEvan M
05/23/2025, 12:28 AMAdam Bartonicek
05/24/2025, 6:27 AMianhobbs
06/17/2025, 11:34 PMОлександр Ганський
06/29/2025, 12:24 PM