> Great example John!
>
> I llke your idea of adding a hook that is called after each legend row
> is drawn. Something like $.jqplot.postLegendAddRowHooks (called at
> the end of the legend's addrow() method).
>
> It might be more useful if I just trigger events when there is a click
> on a legend row. Like fire a 'jqplotLegenRowClick' event and pass the
> row index, element and label to any event handler registered to the
> trigger.
Only for this specific use case. In general, having the addRowHook will
allow for people to do all kind of weird stuff like adding other dom
elements etc.
> Or maybe I should do both. Writing event handling code can turn off
> many js programmers.
I think that would be nice. As written earlier, I would like to see
general event handling when chart stuff is clicked since this seems like
a common scenario. Otoh, having hooks called at render time gives a lot
of flexibility for customization.
/Jeppe