Reputation: 449
I'm new with d3 and svg and I try to select some class to remove them.
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. Until there I used the method remove: selectAll("g").remove
but now I want to keep a part of my chart...
Then, how to have a better selection to remove just a part of my draw?
Thanks
Upvotes: 0
Views: 49