Adding tooltip in d3.js map
I'm trying to add a tooltip showing the name of districts when you hover over it in the map in d3.js. The input is a topojson file and I've been able to successfully generate the map with district boundaries and highlight the currently selected district. For the tooltip I tried doing something similar to this , but nothing happens at all. The code I've used is given below. The tooltip code is towards the end. var width = 960, height = 600; var projection = d3.geo.albers() .center([87, 28]) .rotate([-85, 0]) .parallels([27, 32]); var path = d3.geo.path() .projection(projection); var svg = d3