I'm trying to trigger an event once the legend items gets hovered. However, after many attempts I'm still unable to make it work.
This was one of the examples that made the most sense but no luck with it: http://jsfiddle.net/rAsRP/129/
My controller has (CoffeeScript):
events:
load: ->
for i in @legend.allItems
i.onMouseOver ->
console.log 'over'
i.onMouseOut ->
console.log 'out'
Although the JSFiddle example works, my @legend returns an empty array, probably because the legends hasn't been populated yet, which confuses me.
Another attempt where I could get the legends was on 'redraw' event, but attaching the events to the items doesn't seem to trigger the logs.
Any ideas what I could be doing wrong?