The problem is the
svg.selectAll("path") to update the area. This also selects the paths created by the axis components, which don't have any data bound to them. Therefore, the area generator returns an empty path, which causes the error message you're seeing.
To fix, simply include the class you have assigned in the selector:
svg.selectAll("path.area"). Complete demo here.
- d3.js parsing date error with csv file
- d3 can not plot date axes in safari, parsing error
- D3.js parsing error - rotation of orthogonal map projection
- Error parsing d=""
- Error parsing D3 d=""repeated two times
- How to fix d3 parsing error when using function and return value to set "d"?
- D3js transition between two path cause parsing error
- Error parsing d3 line chart 2d data
- Parsing error for nested object?
- Error parsing data when drawing d3 line chart
- Error parsing d3 line chart JSON data
- Parsing error when drawing SVG paths from GeoJSON
- Error parsing date for X axis
- D3 Parsing error for multi-line plot
- Parsing x-axis with D3 error for column chart
- Error parsing with multiline graph in D3
- can not plot lines in d3, parsing error
- Parsing Error While using D3 and Crossfilter with CSV
- D3 Parsing Error
- Error while parsing date in d3
- D3 mysterious json parsing error
- d3.js and TypeScript compilation error
- d3.js runtime error after upgrade to Angular 8
- TypeScript error when using d3.timeFormat in axis.tickFormat()
- d3.js Error : Invalid value for <g> attribute transform="translate(NaN,5)"
- Parsing dates with d3.js v.4
- d3js line chart error - drawing weird area
- D3v4 time scale axis error in ticks display
More Query from same tag
- appending multiple polygons on a single image using d3
- Plot dimple(d3.js) chart in deck.js section
- D3 update pie data with zero values
- D3: Giving a linear scale a dynamic domain
- d3.js-adding different colors to one bar in stacked bar chart
- how to convert the json to csv
- D3 pack: setting same radius for the nodes that include the different number of children
- d3 for loop retrieving data from a list of object
- D3 spacing between bars
- How to re-use a calculated value in D3
- How can I produce plots like this?
- Capturing/Saving the current state of d3.js Sunburst Chart
- WebStorm React d3 library force()
- How to create vertical continuous legend without rotating the legend
- skipping JSON data records based on inner array values- D3
- What is the best way to create blocks of items in D3.JS
- Adding text in d3.js
- D3 highlighting according to a part of the data
- Adding OnClick event to a bar chart
- d3.js brush with multiline chart
- Use d3 stratify to transform flat data to hierarchy data
- collapse specific nodes on load in d3 tree
- make axis of radar chart conditional to existence of value
- Creating a drop down with d3.js
- D3 timescale with date object returning NaN