Javascript ggle:功能(todo){ todo.done=!todo.done } } }) 待办事项: 谢谢安德鲁!你的帖子总是很有趣。有办法和你联系吗?我的d3.js项目遇到了一些问题。现在“隐藏/显示”按钮起作用,但lower()/raise()具有意外行
ggle:功能(todo){ todo.done=!todo.done } } })Javascript ggle:功能(todo){ todo.done=!todo.done } } }) 待办事项: 谢谢安德鲁!你的帖子总是很有趣。有办法和你联系吗?我的d3.js项目遇到了一些问题。现在“隐藏/显示”按钮起作用,但lower()/raise()具有意外行,javascript,d3.js,Javascript,D3.js,ggle:功能(todo){ todo.done=!todo.done } } }) 待办事项: 谢谢安德鲁!你的帖子总是很有趣。有办法和你联系吗?我的d3.js项目遇到了一些问题。现在“隐藏/显示”按钮起作用,但lower()/raise()具有意外行为。我想向你展示整个背景,让你有自己的看法。可能吗?我的联系人在这里顺便说一句谢谢你的帮助! var items = svg .selectAll("text") .data(this.todos) .ent
待办事项:
谢谢安德鲁!你的帖子总是很有趣。有办法和你联系吗?我的d3.js项目遇到了一些问题。现在“隐藏/显示”按钮起作用,但lower()/raise()具有意外行为。我想向你展示整个背景,让你有自己的看法。可能吗?我的联系人在这里顺便说一句谢谢你的帮助!
var items = svg .selectAll("text")
.data(this.todos)
.enter()
.append("text")
.style("fill", "#123")
.attr("x", 50)
.attr("y", function (d, i) {
return 80 + (i) * 20;
})
.text(function (d, i) {
return (1 + i) + ") " + d.text;
});
svg.append("circle")
.attr("cx", 20+500-10)
.attr("cy", 20+10)
.attr("r", 20)
.attr("id", "closer")
.style("stroke", "#fdf8fe")
.style("fill", "red")
.style("stroke-width", 1)
.on("click", function (d, a, i) {
i[0].parentNode.innerHTML = ""
var active = (active) ? false : true,
newOpacity = active ? 0 : 1;
console.log(newOpacity)
d3.select("#list").style("opacity", newOpacity);
});
var items = svg.selectAll("rect")
.append("g")
.attr("id", "texts")
.data(this.todos)
.enter()
.append("text")
svg.append("g") // create a `g`
.attr("id","texts")
.selectAll("text") // select all the `text` elements in the new `g`
.data(this.todos)
.enter()
.append("text") // append child `text` elements to the new `g`
...