d3.js 清除svg

rave.select(el).html(''); // 不推荐
rave.selectAll("svg > *").remove(); // 移除svg内部节点
rave.selectAll("svg").remove(); // 移除svg节点

原文地址:https://www.cnblogs.com/timelyxyz/p/4753804.html