From 54b7a4a6fdd47577cbc51a0662f9e5ec7bf8c581 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Thu, 24 May 2018 23:56:54 -0400 Subject: [PATCH] Hide elements beyond axis --- BUILD.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BUILD.md b/BUILD.md index 39d5a95..cd37919 100644 --- a/BUILD.md +++ b/BUILD.md @@ -992,6 +992,10 @@ Now clicking on the middle circle should work correctly ## Hide elements beyond axis +Check out our graph when you pan: + +![](https://i.imgur.com/s2oXYxS.png) + To remove elements once they get beyond an axis, we can just add an outer SVG: ```html @@ -1039,8 +1043,11 @@ d3.select('#container').call(zoom); And lastly, adjust css: ```css +/* replace the rule for svg */ #container { overflow: visible; margin-bottom: 50px; } ``` + +![](https://i.imgur.com/t6BKuiz.png)