Adding additional support for events
See original GitHub issueGday
I’ve been having a play with fitting out chart.js with some additional events, for example when a tooltip opens. I’ve got this working using a simple customevent however I wouldn’t say Im a big fan of this approach at the moment.
Currently someone would have to do something like below which is a bit clunky
document.getElementById("canvas").addEventListener('tooltipOpened', {
console.log(e, e.detail);
}, false);
I generally work with mapping libraries like leaflet.js which I think has a really neat way of handling events. They instead do something like
map.on('click', function(e) {
alert(e.latlng);
});
Would you be supportive if I attempted to come up with something of an approach to eventing? Do you have any ideas on how you’d like to see this implemented?
Cheers Rowan
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Add events - Trumba Help
This topic covers the basic methods for adding events to your Trumba® ... Adding a single event; Adding events from one calendar to...
Read more >AddEvent.com - Add to Calendar and event tools for websites ...
Add to Calendar and event tools for websites and newsletters. Event with RSVP. Use in email campaigns, MailChimp, Marketo. Used by Google, Microsoft, ......
Read more >Use the Events web part - Microsoft Support
Add an event · Click Add event. · Give your event a name at the top of the page. · Choose date and...
Read more >Add attachments to your events - Google Calendar Help
If you create a new event, click More options. At the bottom, in the description box, click Add attachment Attach . Choose a...
Read more >Adding Additional Events | Everflow Help Center
To add an Additional Event, first navigate from the dashboard to Offers - Manage. From there you can select an offer by clicking...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Gday @simonbrunel & @etimberg
So I’ve taken a first stab at a very simplistic event plugin.
There is also a demo available using the new tooltip events I have a pull request for, just open the console and you’ll see events being fired.
It’s very simple but I think it’s makes for a some quite usable events rather than jamming everything in in the initialisation of the chart.
Anyway needs lots of tidying up but I thought I’d check in first to make sure it’s heading in the right direction.
Cheers
Closing since there was a plugin created to do this