Accepted answer

You can append circles for each point of a given city:

  .data(function(d){return d.values})
  .attr("r", 2)
  .attr("cx", function(dd){return x(})
  .attr("cy", function(dd){return y(dd.temperature)})
  .attr("fill", "none")
  .attr("stroke", "black")


By the way, this method does not work with the basis interpolation as points seem to be far from the line. You might have to do more work if you need the interpolation but I doubt that as highlighting each points of the curve certainly means that you want to have their exact position.

EDIT: In order to have a the circle to be the same color as the line, you need to access the data of the parentNode:

.attr("stroke", function(d){return color(})

New result:

Related Query