haz
haz

Reputation: 780

JIT Infovis sunburst node contract/expand

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.

Upvotes: 0

Views: 60

Answers (1)

haz
haz

Reputation: 780

If the level to collapse is 1:

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

Upvotes: 0

Related Questions