chart = ForceGraph(
{ nodes: senators, links: filteredLinks },
{
nodeId: (d) => d.member_full,
renderer: "canvas",
nodeGroup: (d) => d.party,
nodeRadius: d => 10,
nodeStrength: -100,
linkDistance: 40,
invalidation,
_this: this,
extent: [
[0, 0],
[width, height]
],
width,
height,
linkStrokeWidth: (l) => w(l.value),
linkStrokeOpacity: 0.05,
nodeGroups: ["R", "D", "I"],
colors: ["#d62728", "#1f77b4", "#ff7f0e"],
drawLinksWhenAlphaIs: 0.5
}
)