February 2019
Beginner to intermediate
284 pages
6h 20m
English
You can select which events your chart will respond to by locally configuring the options.events property, or globally using Chart.defaults.global.events. The default configuration includes an array with six event names:
events: ["mousemove", "mouseout", "click", "touchstart", "touchmove", "touchend"]
These are the events the browser will listen to when the cursor is within the canvas context. They control the behavior of clickable items such as legend labels and tooltips. If you are writing your own handlers, you may wish to turn off some events by redefining the property to include an array containing fewer events. For example, if you want to disable hovering and touch events in a chart, allowing only the click event, you can add ...
Read now
Unlock full access