score:1
Accepted answer
I think the issue is related to this line:
discs.call(dragHandler);
You will need instead to select the discs again to apply the drag:
svg.select('.Discs').call(dragHandler);
See it working here: https://jsfiddle.net/mku50xyh/1/
Source: stackoverflow.com
Related Query
- When using a d3 Reusable Chart pattern how do you implement on drag when Dispatching Events (d3v5 +)?
- How to simulate mouse move in D3 so when you drag nodes, other nodes move automatically?
- How do I implement d3's enter update exit pattern for an area chart with focus and context?
- How to use json object in d3.js reusable chart pattern
- How to show D3 chart using Bootstrap modal popup when click on button and download it as image format
- D3.js line chart using the wrong keys when using general update pattern
- How do you create a stacked bar chart in d3 when each individual segment is an object?
- How to keep mouse over object when using drag and snap to with d3.js
- When using d3, how to trigger drag with only mouse events?
- Can you insert a line break in text when using d3.js?
- How do you remove a handler using a d3.js selector
- How can I position rotated x-axis labels on column chart using nvd3?
- D3.js How to apply multiple classes when using a function
- "Stuttering" drag when using d3.behavior.drag() and transform
- How do I resolve "[ERR_REQUIRE_ESM]: Must use import to load ES Module" when using D3.js 7.0.0 with Next.js 11.0.1?
- d3.js how to get minimum value of scale's domain when using nice()
- How to drag an svg group using d3.js drag behavior?
- How to do wordwrap for chart labels using d3.js
- how to create labels for data in donut chart using d3.js
- How can I keep tick marks from repeating when I have a small number of dates on an nvd3 chart
- How do you access an array of Objects using D3?
- how to create multiline chart using dc.js
- How to show and hides nodes when you move the mouse over a node in D3 Javascript
- How to show a tooltip with value when mouseover a svg line graph using d3.js?
- How to make curved lines to straight lines for Hierarchy Chart using d3.js
- how to add legend to a pie chart using D3js? And how to centralise the pie chart?
- How to stop paths from blurring/disappearing in D3 when using a viewbox?
- How to place text on the circle when using D3.js force layout?
- How to plot animated line chart using d3 while the data table is required to be updated every 1 second?
- How to implement svg pattern via d3js?
More Query from same tag
- best way to transfer data from flask to d3
- Creating a real time changing rectangle in d3.js with a bitcoin WebSocket
- Proper manipulation of JSON data to create D3 area chart?
- D3.js dynamic data/bandwidth labels for y axis
- Force-Directed Graph, nodes are not moving and stuck in the center of the map
- How to set d3.layout.force.charge once d3.layout.force has already been initialized?
- Adding tooltip to donut slices
- How to change the tree layout to v5?
- d3.js - Tree Layout - How can I flip it?
- Referencing the D3.js library from my webpage
- d3 - creating lookup with nest/group
- correctly accessing assigned json coordinates for d3 map labels
- Why aren't my percentages equally spaced?
- Having trouble adding text lables to pie chart using d3.js
- NaN on Force-Directed Layout Append in D3.js
- d3 svg shadow difference
- Adding tooltips to circles from an array with D3 JavaScript
- d3 animated map: after zooming in, how to correctly project points when animation begins?
- D3: unable to access data within anonymous function
- assign new id attribute to each element created
- Is there a way to make d3 scale.range dynamic so that it works with window resizing?
- Why won't my D3 nodes display their text?
- d3 clip-path not working for filled line graph
- Is it possible to have zooming option in NVD3 charts as like in Highcharts?
- How to customize the color scale in a D3 line chart?
- d3.js: dataset array w/ multiple y-axis values
- How to modify Y axis ticks from 45.000.000 to 45M on D3.js version 7?
- Filtering by Negation Crossfilter
- Render topoJSON data using D3.js
- Updating the D3 selection of objects