score:1
Accepted answer
Add a filter for your brush
:
var brush = d3.brush().filter(() => event instanceof MouseEvent).on("end", brushended)
This will only activate the brush for MouseEvent
and ignore TouchEvent
Source: stackoverflow.com
Related Query
- Need d3 brush to NOT work on touch devices
- d3.pointer does not work with touch (d3.js, v7)
- Importing local json file using d3.json does not work
- Svg clip-path within rectangle does not work
- d3.transition().attr('x', y) does not work when d3.attr('x', y) does
- d3.on("mouseover") event does not work with nested SVG elements
- d3.tree => transform does not seem to work
- D3.js - how selections work - Need clarification on Mike's article
- d3 zoom with touch devices sometimes behaves weirdly (using IONIC)
- Brushing on ordinal data does not work
- Basic AngularJS NVD3 Directives will not work and no error
- D3 2 dimensional brush not slideable
- d3 zoom on scroll does not work anymore on Chrome
- d3 multiline update path and transition path does not work with nested data
- Selection does not work if "too exact"
- bisectLeft function does not work if the second parameter is numerical
- The mouseover event for D3.js does not work in Leaflet
- Transition duration does not work on page refresh
- d3.js: styling <text> does not work
- Transition and opacity does not work well together
- Interactive update does not work in heatmap
- Data Join with Custom Key does not work as expected
- d3 .tsv file does not work
- Need help plotting area between multivariate lines - not from axis to line
- Why does this code work for counting one item in a list but not the others?
- Pie chart not updating properly when using brush in series chart
- brush extents not working as expected
- d3 js transition over the array of rectangles does not work
- Why Do I need to use Custom Event for Tooltip and Brush in D3?
- d3.js node translation does not work when changed the node to image
More Query from same tag
- How to use colors in RGB as the input domain in a d3.js linear (or different) scale? Or how to code an algorithm that achieves the same?
- d3js ticks positioning
- D3 tween does not work inside angular
- problem with D3 lasso circle element with text
- d3.event.x does not get the x cursor's position
- calculate spiral subsection with d3js
- jQuery page scroll event logic -- how to throttle
- Send POST request in d3 (with d3-fetch)
- Reference errors using dc.js, d3.js and crossfilter
- How to get corresponding colors from d3 sunburst parent to final child?
- How to add filters effects to Svg in d3
- Updating a Pie Chart in d3.js
- D3.js how prevent drag-start on click event
- D3 force graph doesn't pan or zoom as expected
- d3.js svg image dragging works, but raises many type errors
- d3 Tree - How to auto adjust node spacing when zooming
- D3 - tree nodes not built from external JSON file
- angularjs nvd3 multibar chart xAxis tick not showing
- D3 : Retrieve data from SVG
- Typing D3 line.defined in TypeScript
- D3js-Get the first and the last decile
- D3: How can I cause the stroke of an SVG path generated with D3 to be clipped to the interior of the same path?
- d3.js cannot assign loaded json data to a variable
- How to make all the nodes circle the center node?
- Maintain highest and lowest values only in Y axis of d3.js Bar graph
- Why won't my d3 html div tooltips hide on mouseout?
- Bullet Chart Example
- why the last tick doesn't have values - D3.js
- Why the color of the pie doesn't change?
- D3js SVG open lines display a fill artifact, how to fix it?