From e6ab3d6755a25fd88d0352b65efd90409881cf47 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 9 Sep 2022 07:29:43 -0400 Subject: [PATCH] Update SCATTER_PLOT.md --- SCATTER_PLOT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCATTER_PLOT.md b/SCATTER_PLOT.md index da716ad..5f26fea 100644 --- a/SCATTER_PLOT.md +++ b/SCATTER_PLOT.md @@ -797,7 +797,7 @@ d3.selectAll('circle').on('click', (event, datum) => { Let's examine the above code. The first line selects all `` elements and creates a click handler on each of them. `event.stopPropagation();` prevents the our click from bubbling up the DOM to the SVG. If we don't add it, the click handler on the SVG will fire in addition, when we click on a circle. This would create an additional run every time we try to remove a run. Next we call: ```javascript -runs = runs.filter(function(run, index){ +runs = runs.filter((run, index)=>{ return run.id != datum.id; }); ```