use `d3.dispatch` for chart events

fixes #531
add test for second listener on event