> Dorus example:
>
> view := MOViewRenderer new.
> view nodes: (1 to: 1000).
> view edgesFrom: [ :each | each // 10 ].
> view layout: (MOTreeMapLayoutIncubation withWeightBlock: [ :e | e model ]).
> view open.
>
> has 10 root Nodes, and does not work anymore at the moment because of that.
>
> Any opinions on how to handle that?
>
> I will keep you updated with my progress.
>
> Thanks and cheers,
> Dennis
>
> On Tue, Mar 6, 2012 at 21:33, Alexandre Bergel <
alexandre.bergel@me.com>
> wrote:
>>
>> >> All the nodes have the same shape, which in this case, the very same
>> >> size.
>> >> In the treemap, not all the nodes have the same shape. How do you
>> >> achieve this without wrapping?
>> >
>> > The sharing of the shape is just a convenience. But, you can provide a
>> > shape instance for each node :)
>>
>> Okay, but if you write:
>> >> view nodes: (1 to: 1000).
>>
>> Then there will be one shape for all the nodes.
>> No wrapping implies copying the shape for each node, and changing the
>> height: and width:
>> This is not difficult to do however.
>>
>> Alexandre
>>
>>
>>
>> >
>> > Cheers,
>> > Doru
>> >
>> >
>> >> Cheers,
>> >> Alexandre
>> >>
>> >>>
>> >>>> You could also have two different TreeMap: one that use the edges to
>> >>>> do the nesting, and another that use the nesting.
>> >>>>
>> >>>> There is no problem to include your layout in Mondrian once it is
>> >>>> stable and properly tested.
>> >>>>
>> >>>> I will probably use your layout for Roassal, a visualization engine I
>> >>>> am working on.
>> >>>>
>> >>>> Alexandre
>> >>>>
>> >>>>
>> >>>> On 28 Feb 2012, at 12:02, Dennis Schenk wrote:
>> >>>>
>> >>>>> Hi,
>> >>>>>
>> >>>>> I'm working on a treemap layout in Mondrian. I created the basic
>> >>>>> functionality but am far from finished.
>> >>>>>
>> >>>>> For the current progress see the following screenshots:
>> >>>>>
>> >>>>>
http://cl.ly/342z261g021c3X1j3X2b - A visualization of a very simple
>> >>>>> java system (
https://github.com/mircealungu/SimpleSample)
>> >>>>>
http://cl.ly/3H3x1K1y3O3j430S0a2z - A visualization of FAMIX itself.
>> >>>>>
>> >>>>> The following is an example of how one sets up the layout:
>> >>>>>
>> >>>>> viewTreemapOn: view
>> >>>>> view nodes: self nodes.
>> >>>>>
>> >>>>> view edges: self nodes
>> >>>>> from: [ :each | each ]
>> >>>>> toAll: [ :each | each children ].
>> >>>>>
>> >>>>> view layout: (MOTreeMapLayoutIncubation withWeightBlock: [ :e |
>> >>>>> | model |
>> >>>>> model := e model.
>> >>>>> model isNil ifTrue: [
>> >>>>> 0.
>> >>>>> ]
>> >>>>> ifFalse: [
>> >>>>> e model entity numberOfLinesOfCode.
>> >>>>> ].
>> >>>>> ]).
>> >>>>>
>> >>>>> The tree structure is given by the edges definition. The layout is
>> >>>>> created with a weight block (lines of code here, but could be anything).
>> >>>>>
>> >>>>> At the end I'd like to have something like:
>> >>>>>
http://cl.ly/3v1L3O2a2n1H1C2x3J0V - TreeMap in Softwarenaut in
>> >>>>> VisualWorks.
>> >>>>>
>> >>>>> This is the first code that I'm writing with Mondrian, so I'm sure
>> >>>>> it could be improved in many areas. If anyone sees a problem with how I set
>> >>>>> up the layout. please do tell. If anyone wants to look at the code in detail
>> >>>>> please take a look at MOTreeMapLayoutIncubation in my Softwarenaut
>> >>>>> repository (I'm creating the tree map layout as part of the Softwarenaut
>> >>>>> port to Pharo):
>> >>>>>
>> >>>>> MCHttpRepository
>> >>>>> location: '
http://www.squeaksource.com/Softwarenaut'
>> >>>>> user: ''
>> >>>>> password: ''
>> >>>>>
>> >>>>> The layout is currently in this repo, if it is more mature, it would
>> >>>>> be cool to add it to Mondrian itself. I'd like to make it as generic as
>> >>>>> possible.
>> >>>>>
>> >>>>> Now for some specific questions:
>> >>>>>
>> >>>>> The red colors you see in the screenshots is actually a bug. What I
>> >>>>> would like to do is only color the leaf nodes, but somehow (my guess is, it
>> >>>>> has something to do with shape caching?), it also colors the containment
>> >>>>> blocks.
>> >>>>>
>> >>>>> The way I do it is, while ging through the nodes (MONode) to draw
>> >>>>> them
>> >>>>>
>> >>>>> If it is a leaf
>> >>>>> node shape fillColor: ((Color fromString: '#ff0000') alpha: 0.1).
>> >>>>>
>> >>>>> If it is a containment block:
>> >>>>> node shape fillColor: (Color fromString: '#eeeeee').
>> >>>>>
>> >>>>> But somehow all shapes (except the root node) are colored with the
>> >>>>> red translucent color. Does anyone have an idea why this could be the case?
>> >>>>>
>> >>>>> In general: I'm doing the styling of the nodes (also tried to add
>> >>>>> some interactivity) directly inside the layout, but I'm not sure if this is
>> >>>>> the Mondrian way to do this, since normally shape definitions and
>> >>>>> interaction is defined when creating the view. Is this okay? Or should I do
>> >>>>> this in another way?
>> >>>>>
>> >>>>> My thought was that I'd like to have a treemap layout with default,
>> >>>>> nice looking interactions, colors etc. without having to define them
>> >>>>> outside, when defining the view, so it needs as little setup as possible.
>> >>>>>
>> >>>>> Any inputs in general are greatly appreciated.
>> >>>>>
>> >>>>> Cheers,
>> >>>>> Dennis
>> >>>>>
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> Moose-dev mailing list
>> >>>>>
Moose-dev@iam.unibe.ch
>> >>>>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> >>>>
>> >>>> --
>> >>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> >>>> Alexandre Bergel
http://www.bergel.eu
>> >>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> Moose-dev mailing list
>> >>>>
Moose-dev@iam.unibe.ch
>> >>>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> >>>
>> >>> --
>> >>>
www.tudorgirba.com
>> >>>
>> >>> "Don't give to get. Just give."
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> Moose-dev mailing list
>> >>>
Moose-dev@iam.unibe.ch
>> >>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> >>
>> >> --
>> >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> >> Alexandre Bergel
http://www.bergel.eu
>> >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> Moose-dev mailing list
>> >>
Moose-dev@iam.unibe.ch
>> >>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> >
>> > --
>> >
www.tudorgirba.com
>> >
>> > "In a world where everything is moving ever faster,
>> > one might have better chances to win by moving slower."
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Moose-dev mailing list
>> >
Moose-dev@iam.unibe.ch
>> >
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel
http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>>
Moose-dev@iam.unibe.ch
>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> _______________________________________________
> Moose-dev mailing list
>
Moose-dev@iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
--
www.tudorgirba.com