Searching for examples of using D3 on a mobile device with touch events instead of mouse events has been challenging. I am unable to find clear information on what touch event corresponds to each mouse event, such as click
or dblclick
. This has hindered my progress in adapting my D3 visualizations to support touch interactions.
I require suitable touch events for:
- Zooming (or will it work for both?):
var zoomed = d3.behavior.zoom().x(x).y(y).scaleExtent([scaleExtentMin, scaleExtentMax]).on("zoom", partitionZoom);
click
dblclick
The primary task at hand is replacing click
with an appropriate touch event.
How can this be achieved with D3? Alternatively, are there other libraries that pair well with D3 and handle touch events effectively?
Any assistance on this matter would be greatly valued!