Working on the D3 GDP project. Having an issue displaying the month/year when the user hovers over an individual bar.
I can access the element of the array but not the date object inside it. For example when hovering over the first bar in the bargraph the tooltip displays 0 (the number of the array it represents, not the date that element of the array contains).
The second parameter to callbacks that you pass in d3 functions are always indexes. So the mouseover callback should really be function(d, i) {}, not function(d, dates).
But since you already have a dates array somewhere, you can access them like so: