I think I have a question that's pretty simple but I can't figure it out. My array is as follows:
var wordcount = [1, 2, 3, [{name: 'A', values: [0,1,3,9, 8, 7]},
{name: 'B', values: [0, 10, 7, 1, 1, 11]},
{name: 'C', values: [3, 1, 4, 4, 4, 17]},
{name: 'D', values: [4, 77, 2, 13, 11, 13]}
]]]
and I'm using the following code to get A, B, C, and D
d3.select("#tooltippos")
.data(d[3])
.enter()
.append("div")
.text(function(d) { return d.name; });
but I keep missing the first letter. Only B, C, and D show up in the divs.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…