score:1
Accepted answer
In the following part of the code:
root = d3.hierarchy(root)
.sum(function(d) { return d.size; })
.sort(function(a, b) { return b.value - a.value; });
When calling .sum
, the attribute size
doesn't exists, so D3 is unable to calculate the circle radius, replace it by value
and it will work.
Source: stackoverflow.com
Related Query
- Example of a working codebase with zoomable d3 circle packing
- Zoomable Circle Packing with Automatic Text Sizing in D3.js
- Zoomable Circle Packing with Chord D3
- Angular 4 + D3v4 : dragging circle not working correctly in conjunction with zooming
- Circle packing with static size
- Working with Pictogram Example
- Circle packing matrix with consistent scale
- d3 Circle Packing - Printing labels with multiple lines
- d3 - problem aligning text with circle center - dominant-baseline not working on Firefox
- D3 zoomable circle packing using flare.csv (not flare.json)
- Add transition to Zoomable Circle Packing
- Zoomable Circle packing - parent undefined
- I am trying to reproduce an example with NVD3, but not working
- Working Zoom/Pan example with D3.js?
- d3.js Zoomable Circle Packing - How to prevent additional click events until zoom is complete
- D3 Zoomable Circle Packing in IE11 is expanding beyond the SVG boundary
- D3 Zoomable Circle Packing throws NaN erros
- d3js example not working with php's json_encode
- on ("click") not working with d3 circle
- How can I bring a circle to the front with d3?
- drawing circle with radius specified in meters on a map
- Draw a D3 circle with gradient colours
- Circle clip and projection with D3 orthographic
- D3 Bar Graph example not working locally
- How to change a circle into a square with d3.js
- Half filled circle with d3.js
- D3: Simple Interaction - Circle with a click
- Simplest D3.js example not working
- Problems while reproducing Sankey chart example with d3_sankey
- Possible to use a circle pack layout in d3.js with fixed circle sizes?
More Query from same tag
- Text alignment changes on exporting d3js chart svg as png using html2canvas
- Can I process a string which is like a json format using d3.json?
- How to change text elements in d3?
- Checking node and it's all childrens on the basis of id
- Invert yAxis using NVD3.js
- D3.js charts placed in a bootstrap carousel
- Bar charts and labels not sorting correctly
- Using svg:image elements to import a image from the web or internal docs
- D3.js v6.2 - get data index in listener function - selection.on('click', listener)
- Access the text within SVG object using d3js
- D3 scatterplot hot to manage domain and range properly?
- Drawing LineStrings d3
- Layering D3 Graphs: Swimlanes + Data Connections
- How to make Drag and Drop of nodes work inside a Radial Reingold–Tilford Tree in D3?
- D3.js.nest rollup with cumulative sum using reduce
- Find next highest and next lowest number in a sequence
- How to set the image size in Vis.js network graph
- Coloring hexbin series with d3js
- d3 vs. svg When Dealing with Element
- How can I zoom multiple lines with multiple series in D3.js Chart?
- CSV/TSV comment lines d3
- Custom attributes and colors in D3 circle pack
- Error: <path> attribute d: Expected number, "MNaN,NaNLNaN,NaNZ"
- d3 timeout like angular $.timeout
- convert shp to topoJSON failing
- D3js reset the origin of a drag behaviour
- Using d3 selection.join to create a new line each time
- forced directed graphs using d3.js
- Text invisible yet appearing in inspector
- Add a smiley face to a SVG circle