ok, that's really helpful, thank you
I know this is "ghetto" but I'm still learning how to use d3 properly
(I added .remove() since I'm replacing)
as to why I'm re-plotting: I need to fit this "type of stack layout"
selector functionality into a real-time updating graph
would love it if .remove() could take a callback (or something along
those lines) so I can eliminate the silly timeout
function zero() {
d3.select("svg")
.style("opacity", 1)
.transition().duration(400).style("opacity", 0).remove();
setTimeout(function() {
plot("zero");
}, 400)
}
function expand() {
d3.select("svg")
.style("opacity", 1)
.transition().duration(400).style("opacity", 0).remove();
setTimeout(function() {
plot("expand");
}, 400)
}
function wiggle() {
d3.select("svg")
.style("opacity", 1)
.transition().duration(400).style("opacity", 0).remove();
setTimeout(function() {
plot("wiggle");
}, 400)