score:1
Accepted answer
You just forgot to split the stroke attribute setters.
Just replace
path.attr({ 'stroke-dasharray': totalLength + ' ' + totalLength, 'stroke-dashoffset': totalLength });
with
path
.attr('stroke-dasharray', totalLength + ' ' + totalLength)
.attr('stroke-dashoffset', totalLength);
Edit: Running fiddle.
Source: stackoverflow.com
Related Query
- SVG path transition in D3 (v5) not working properly
- d3.js - mouseover event not working properly on svg group
- SVG text path not working correctly in IE
- Transition on path in d3.js is not working
- Mouse up event not working properly in SVG
- d3.mouse not working properly on transformed SVG
- Not getting how to properly close a path in SVG / d3.js
- D3.js path transition not working
- SVG links not working after transition executed in d3.js
- Title Attribute not working for an SVG Rect on Safari
- SVG not rendering properly as a backbone view
- internet explorer 10 not showing svg path (d3.js graph)
- D3 - Positioning tooltip on SVG element not working
- d3 transition for transform translate not working for DIV
- Exit not working properly
- D3 transition not working
- D3: Zooming/Panning Line Graph in SVG is not working in Canvas
- D3: "SVG4601: SVG Path data has incorrect format and could not be completely parsed."
- SVG textPath not visible after transition on Chrome
- d3 v4 line chart transition not working
- D3.v4 Projection Transition not Working
- d3 multiline update path and transition path does not work with nested data
- SVG text element text-anchor="middle" not working in Firefox
- Positioning svg x/y coordinates with css not working with iOS devices?
- Slice and bounce effect not working properly in pie chart
- d3 - mouseover and mouseout event not working properly
- svg <a> element not working
- D3's scale not working properly
- SVG Marker Not Working
- CSS transform-origin not working for svg in safari
More Query from same tag
- D3 js tooltip violin plot
- How to highlight path from root to selected node in d3 js?
- How do I mismatch D3's closing tag?
- redraw d3 map according to drop down menu selection
- Zooming in a d3js force simulation on a canvas
- Getting error in loading json from static file?
- External JS file not working within my HTML file
- d3.js treemap new data doesn't render
- rotate and zoom svg with d3 javascript
- Projecting topoJSON using D3 shows tiny
- NVD3 lineChart - Fill area above the line, instead of below
- d3 x scale and labels at the bottom
- Not able Zoom on D3 Group Bar Chart
- nvd3 lineWithFocusChart Invalid value error when resizing
- Crossfilter can't filter one dimension by another
- How to force recalculation of element attributes when data changes in d3.js?
- How long will D3.js v3 be supported?
- How to make bar chart with additional vertical lines below the x axis
- How to dynamically adjust the size of a D3 rect based on the foreignObject's height
- Color specific point in beeswarm d3js (v.4 alpha)
- Why won't the axes on my D3 SVG figure update?
- On click event seemingly not over the whole element
- dc js - unable to redraw charts
- Shaded interactive D3 treemap - support for people who are colorblind?
- Read a huge csv file and populate a Map in Javascript using d3
- dc.js add dynamic columns
- Why don't the circles in this d3 example move?
- How to move SVG's position in D3?
- Selecting d3 node from within child context (e.g. a timer)
- How to init d3 svg element from embeded extern svg-file and manipulate it