# Basic configuration
config <- edge_filter_lens()
# Custom configuration
config <- edge_filter_lens(
key = "my-edge-lens",
trigger = "drag",
r = 100,
nodeType = "either",
style = list(
fill = "rgba(200, 200, 200, 0.3)",
stroke = "#999",
lineWidth = 2
),
filter = JS("(id, type) => {
// Only display edges connected to specific nodes
if (type === 'edge') {
const edge = graph.getEdgeData(id);
return edge.source === 'node1' || edge.target === 'node1';
}
return true;
}")
)
Run the code above in your browser using DataLab