javascript - Best approach to conditionally update nodes in d3.js force graphs -
i working on interactive timeline using d3.js composed of force layout , slider. data encoded json mysql. slider moves, want nodes appear/disappear depending on json values. repeatedly calling database every tick of slider pretty costly , big no-no. i've seen examples of json queries haven't seen 1 implemented in d3.json.
what's optimal approach conditionally remove/add nodes on graph? advice appreciated.
i think best approach filtered out nodes(i.e. nodes don't want shown based on slider values) , make display:none.