JIT Infovis sunburst node contract/expand

59 views Asked by At

I am rendering a sunburst diagram using the Infovis javascript toolkit.

I would like to have all nodes above a certain level be collapsed so that they can be expanded selectively.

I am using:

 if(node.data.class == "level1" )
              {
                sb.op.contract(node,{hideLabels: true});
              }

This does not work.

1

There are 1 answers

0
haz On BEST ANSWER

If the level to collapse is 1:

    onBeforePlotNode: function(node)
           { 
    if(node._depth > 0)
    {sb.op.contract(node);}
}