D3.js Zoomable Sunburst - Filtering data throws errors -


i building on "zoomable sunburst updating data" found here: http://bl.ocks.org/kerryrodden/477c1bfb081b783f80ad

i have created jsfiddle runs example fine:

http://jsfiddle.net/unklefolk/nyaw6nje/

as can see, jsfiddle works fine.

i add filtering in, remove items small. however, once add filtering code in:

  var nodes = partition.nodes(root)     .filter(function(d) {         return (d.dx > 0.005); // 0.001 radians = 0.05 degrees      })     ; 

...and click on 'size' radio button chart collapses down , hundreds of errors written console log:

error: invalid value attribute d="mnan,nana271.1088342345192,271.1088342345192 0 1,1 nan,nanlnan,nana221.35943621178657,221.35943621178657 0 1,0 nan,nanz"

this amended jsfiddle demonstrates behaviour:

http://jsfiddle.net/unklefolk/by6aaxf0/1/

the difference between 2 fiddles filtering code.

how can filter down results in browser , avoid error?


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -