How to use enter (data join) for d3 line graphs
问题 I'm trying to understand how we can go about using data joins with line graphs. Most examples I see use datum(), rather than data() with our data join, and a direct mapping of the line function when appending the path element. I think we prefer using datum() in this case because the entire line function is sort of a single path. To understand data joins more though, I would like to see how I could make this work for a single line graph, but the snippet I try below does seem to work. My code: