May 2019
Beginner to intermediate
650 pages
14h 50m
English
Besides event handlers, there is not much to configure for a typical drag gesture. Defaults can be used most of the time. Typically, you will configure one or more on() methods to control the start-drag-end life cycle.
The following table lists this method and two others you might wish to use:
|
Method |
Description |
|
on(types, listener) |
One or more type names can be provided (separated by spaces). They can be start, called after a mousedown (or touchstart); drag, on mousemove (or touchmove); and end, on mouseup (or touchend). Each function receives the current datum, index, and nodes (which may be null if the object is not bound to a dataset). The current object can be accessed with this, and the d3.event object ... |
Read now
Unlock full access