TreeMap

22 views
Skip to first unread message

Fabien Hermenier

unread,
Jul 8, 2011, 6:59:25 PM7/8/11
to cho...@googlegroups.com
Hi

I am starting using GWT. I want to make a treemap visualization of a structure, and it seems that only protovis-GWT provides the good widget. Google Charts provides the ideal visualization for my problem but it can not work offline and I am not sure that a GWT wrapper is available.

I'm just discovering the widget, and I have some questions right now.
- Does it support zoom ? In practice, I just want to change the root of the treemap. Most of the time incrementally by going to one of the direct children, but also directly clicking on a leaf. I don't care about fancy animation.
- I like to have variable border size, denoting the different levels of the treemap. Is this possible ? 
- I want to control the depth of the tree. As an example, if the tree as more than 3 levels, then the third level is just one rectangle that gather its children.

In practice, a lot of my requirements are aligned with the Javascript google-chart treemap: http://code.google.com/apis/chart/interactive/docs/gallery/treemap.html

If such features are not available, I will try to do this by myself. But I'm still a beginner in using GWT and I don't really practice Javascript and protovis so, this will takes times.

Lars Grammel

unread,
Jul 10, 2011, 3:11:27 PM7/10/11
to Choosel
> I'm just discovering the widget, and I have some questions right now.
> - Does it support zoom ? In practice, I just want to change the root of the
> treemap. Most of the time incrementally by going to one of the direct
> children, but also directly clicking on a leaf. I don't care about fancy
> animation.

Regular zooming is supported in Protovis, however, your use case
sounds more like semantic zoom. I think you would need to implement
this, for example by listening for mouse clicks and then changing the
contents.

> - I like to have variable border size, denoting the different levels of the
> treemap. Is this possible ?

The protovis treemap padding might be the right thing, but this is not
implemented in Protovis-GWT yet. If you can confirm that you can do
this with Protovis, I'll add the functionality to Protovis-GWT.

> - I want to control the depth of the tree. As an example, if the tree as
> more than 3 levels, then the third level is just one rectangle that gather
> its children.

If you control the contents of the treemap by implementing your own
semantic zoom (see above), this is easily doable.

Hope that helps,

Lars

Fabien Hermenier

unread,
Jul 10, 2011, 3:16:22 PM7/10/11
to cho...@googlegroups.com
You are right for the purpose of the zoom. I wil try to implement it using a regular clicking event and a reconstruction.
Reply all
Reply to author
Forward
0 new messages