Hi Nico,
Thanks a lot. I am trying that right now.
VenkatOn Wed, Oct 7, 2009 at 10:56 AM, Nico Garcia Belmonte <phi...@gmail.com> wrote:
Also, this is the json data used for the spacetree in this example:
http://thejit.org/Jit/Examples/Other/example1.html
(code here: http://thejit.org/Jit/Examples/Other/example1.code.html)
# var jsonpie3 = {
# 'id': 'root1',
# 'name': 'ST Bar Chart',
# 'data': {
# '$type': 'none',
# '$width': 80,
# '$height':20
# },
# 'children':[
# {
# 'id':'h1',
# 'name': 'h1',
# 'data': {
# '$color': '#55f',
# '$height':30
# },
# 'children': []
# },
# {
# 'id':'h2',
# 'name': 'h2',
# 'data': {
# '$color': '#66f',
# '$height':50
# },
# 'children': []
# },
# {
# 'id':'h3',
# 'name': 'h3',
# 'data': {
# '$color': '#77f',
# '$height':70
# },
# 'children': []
# },
# {
# 'id':'h4',
# 'name': 'h4',
# 'data': {
# '$height':90,
# '$color': '#88f'
# },
# 'children': []
# },
# {
# 'id':'h5',
# 'name': 'h5',
# 'data': {
# '$height':100,
# '$color': '#99f'
# },
# 'children': []
# },
# {
# 'id':'h6',
# 'name': 'h6',
# 'data': {
# '$height':110,
# '$color': '#aaf'
# },
# 'children': []
# },
# {
# 'id':'h7',
# 'name': 'h7',
# 'data': {
# '$height':150,
# '$color': '#bbf'
# },
# 'children': []
# },
# {
# 'id':'h8',
# 'name': 'h8',
# 'data': {
# '$height':110,
# '$color': '#aaf'
# },
# 'children': []
# },
# {
# 'id':'h9',
# 'name': 'h9',
# 'data': {
# '$height':100,
# '$color': '#99f'
# },
# 'children': []
# },
# {
# 'id':'h10',
# 'name': 'h10',
# 'data': {
# '$height':90,
# '$color': '#88f'
# },
# 'children': []
# },
# {
# 'id':'h11',
# 'name': 'h11',
# 'data': {
# '$height':110,
# '$color': '#aaf'
# },
# 'children': []
# },
# {
# 'id':'h12',
# 'name': 'h12',
# 'data': {
# '$height':150,
# '$color': '#bbf'
# },
# 'children': []
# },
# {
# 'id':'h13',
# 'name': 'h13',
# 'data': {
# '$height':110,
# '$color': '#aaf'
# },
# 'children': []
# },
# {
# 'id':'h14',
# 'name': 'h14',
# 'data': {
# '$height':100,
# '$color': '#99f'
# },
# 'children': []
# },
# {
# 'id':'h15',
# 'name': 'h15',
# 'data': {
# '$height':90,
# '$color': '#88f'
# },
# 'children': []
# }
# ]
# };
On Wed, Oct 7, 2009 at 7:54 PM, Nico Garcia Belmonte <phi...@gmail.com> wrote:
> Sure,
>
> You can add a $height parameter in the data object of each node in
> your JSON structure that determines the height of the node.
>
> For example:
>
> var json = {
> 'id':'someid',
> 'name':'somename',
> 'data': {
> '$height': 30
> },
> 'children': []
> };
>
> Also don't forget to add overridable=true in the node configuration
> object when instanciating a ST:
>
> var st = new ST(canvas, {
> Node: {
> 'overridable':true
> }
> /* ... */
> });
>
> On Wed, Oct 7, 2009 at 7:44 PM, venkatesh kavuluri
> <venkates...@gmail.com> wrote:
>> Hi,
>>
>> Can we have a space tree animation with variable node sizes, like node's
>> height proportional to one of its data field values ? I found this feature
>> being implemented by TreeMap. Is there a way to compute node sizes similarly
>> for space tree as well !
>>
>> Thank You!!
>> Venkat
>>
>> >>
>>
>
>
>
> --
> I would never die for my beliefs because I might be wrong.
>
> Bertrand Russell
>
--
I would never die for my beliefs because I might be wrong.
Bertrand Russell