holtzy / D3-graph-gallery

A collection of simple graphics made with D3.js
https://www.d3-graph-gallery.com
MIT License
789 stars 237 forks source link

Dots in margin area after zoom in "Update X axis limits on scatterplot" #77

Open jobouJP opened 2 years ago

jobouJP commented 2 years ago

Hi, I noticed that in your exemple "Update X axis limits on scatterplot", if you put a scale of 7 for exemple, some dots that are above 7 are displayed passed the end of the axis in the margin area.
image. Is there a way to avoid this ? Thank you

jobouJP commented 2 years ago

I actually find a solution. Adding a clip path attr when adding the dots do the trick.