rufuspollock-okfn / bubbletree

Radial Bubble Tree Visualization
http://okfnlabs.org/bubbletree
152 stars 69 forks source link

3rd Level children notworking #26

Closed greales closed 8 years ago

greales commented 11 years ago

Hi Bubbletree developers,

i'm working on a 3rd level bubble but i could not seem to make it work below is the 3rd level script that i did. is there something wrong that i did? please help.

Thanks in advance...

$(function() { var data = { label: 'Total', amount: 120, children: [ { label: '1rst Level', amount: 30, color: '#D95F02', children: [ { label: 'Dingen', amount: 15, color: '#D95F02' }, { label: 'Stuff', amount: 15, color: '#D95F02' } ] }, { label: '2nd Level', amount: 40, color: '#1B9E77', children: [ { label: 'Sub2', amount: 20, color: '#cccccc' }, { label: 'Sub2', amount: 20, color: '#cccccc' } ] },
{ label: '3rd Level', amount: 30, color: '#7570B3', children: [ { label: 'Bananen', amount: 15, color: '#7570B3', children: [ { label: 'glenn', amount: 10, color: '#7570B3' }, { label: 'glenn', amount: 5, color: '#7570B3' }
] }, { label: 'Pyjamas', amount: 15, color: '#7570B3', children: [ { label: 'mark', amount: 5, color: '#000000' }, { label: 'reales', amount: 10, color: '#cccccc' } ] } ] } ] };

        new BubbleTree({
            data: data,
            bubbleType: 'donut',
            container: '.bubbletree'
        });

    });
greales commented 11 years ago

anyone please...

gka commented 11 years ago

Hi @greales

the BubbleTree works fine with more than 3 levels. I put together a variation of the random names demo where I increased the number of levels up to five:

http://jsfiddle.net/vis4/7SMga/

However, you have to make sure that the total number of nodes stays within a reasonable amount. If you have ten children per level, four levels would end up with +10k nodes, which is way to much! The BubbleTree can display about thousand nodes.

greales commented 11 years ago

Hi gka,

What if the nodes is value declared like what i did on above. i already equally distributed the amount on each bubble of label "3rd Level" but still i could not see the 3rd level when clicked. If you can provide a sample script of 3rd level that have declared value is much appreciated.

Thanks in Advance.

ttrapp commented 8 years ago

The Bubbletree has to have a special property. You can draw it if the amount of a note is the sum of the amounts of its adjacent nodes.

pwalsh commented 8 years ago

CLOSING. OLD.