JavaScript D3 Sunburst arc sizes

I am trying to create a D3 sunburst chart based on this example:

https://bl.ocks.org/maybelinot/5552606564ef37b5de7e47ed2b7dc099

I'd like the arcs created to close the full circle but they don't.

For testing purpose and simplicity, the sum of every element's size in the the same depth equals 360.

Follows my jsFiddle:

https://jsfiddle.net/igasparetto/uz8rz13d/

Something is telling me the problem is on these lines:

var partition = d3.partition();

var arc = d3.arc()
.startAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x0))); })
.endAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x1))); })
.innerRadius(function(d) { return Math.max(0, y(d.y0)); })
.outerRadius(function(d) { return Math.max(0, y(d.y1)); });

Thanks

Answer:1

I am new to css especially combinators but I am trying to change css of a p element when hovering over a h1 element both of which are in a div of class "a" but I can't figure out how to do it.Here is ...

I am new to css especially combinators but I am trying to change css of a p element when hovering over a h1 element both of which are in a div of class "a" but I can't figure out how to do it.Here is ...

  1. change class when clicked
  2. change class when scroll
  3. change class when hover
  4. css change class when hover
  5. jquery change class when click

new Date(Infinity) is too far, and so is new Date(Number.MAX_SAFE_INTEGER - 1). I need this so I can run astronomical simulations on a Node cluster. JK, I'm just messing around, and SO imposed a ...

new Date(Infinity) is too far, and so is new Date(Number.MAX_SAFE_INTEGER - 1). I need this so I can run astronomical simulations on a Node cluster. JK, I'm just messing around, and SO imposed a ...

I'm writing a lua script that I want to use with scrapy + splash for a website. I want to write a script that enters a text and then clicks on a button. I have the following code: function main(...

I'm writing a lua script that I want to use with scrapy + splash for a website. I want to write a script that enters a text and then clicks on a button. I have the following code: function main(...

app.js var bodyParser = require('koa-bodyparser'); app.use(bodyParser()); app.use(route.get('/objects/', objects.all)); objects.js module.exports.all = function * all(next) { this.body = yield ...

app.js var bodyParser = require('koa-bodyparser'); app.use(bodyParser()); app.use(route.get('/objects/', objects.all)); objects.js module.exports.all = function * all(next) { this.body = yield ...

  1. query string with multiple parameters
  2. query string with spaces
  3. query string with array
  4. query string with #
  5. query string with no value
  6. query string with ampersand
  7. query string with filter in elasticsearch
  8. query string with multiple parameters in c#
  9. query string with special characters
  10. query string with forward slash
  11. query string with parameters
  12. query string with hash
  13. query string with post
  14. query string with slash
  15. query string with spaces c#
  16. query string with plus sign
  17. query string with anchor tag
  18. query string with multiple parameters in javascript