-
Notifications
You must be signed in to change notification settings - Fork 593
Closed
Description
It would be useful to allow the legendFormatter function to return DOM elements or an HTML string.
This would allow a user to supply elements that have more complex formatting and attached event handlers. For example, I'd like to create a legend that supports click events on legend labels to change the visibility or styling of series plot lines.
I think this would be pretty easy to add to legend.js and could supply the PR for this. Let me know what you think.
It might be easiest to allow the returned item to be a DocumentFragment or a String. The DocumentFragment would be appended instead of using innerHTML. If a String is returned, innerHTML is used.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels