[英]selection in d3 svg
I'm new with d3 and svg and I try to select some class to remove them. 我是d3和svg的新手,我尝试选择一些类别以将其删除。
my code is ; 我的代码是;
svgBC.append("g")
.attr("class", "x axis")
.attr("transform", "translate(30," + height + ")")
.call(xAxis);
svgBC.append("g")
.attr("class", "y axis")
.call(yAxis)
.attr("transform", "translate(30,0)")
.append("text")
.attr("transform", "rotate(-90)")
.attr("y", 6)
.attr("dy", ".71em")
.style("text-anchor", "end")
.text("Population");
and I want to remove the "y axis" and to keep the x one. 我想删除“ y轴”并保持x为1。 Until there I used the method remove: selectAll("g").remove
but now I want to keep a part of my chart... 在此之前,我使用了remove方法: selectAll("g").remove
但是现在我想保留一部分图表...
Then, how to have a better selection to remove just a part of my draw? 然后,如何更好地选择删除我的部分抽奖?
Thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.