Hi Azadeh,
First, you have to create nodes to be able to draw edges.
Second, in your case, I guess the simplest thing is to use the numbers
as the models for the edges and just specify "from:" from the first
collection and "to:" from the second collection.
Perhaps something like this would work:
viewFrom: col1 to: col2
| view |
view := Mondrian.ViewRenderer new.
view node: col1 forIt: [
view nodes: col1.
view verticalLineLayout.].
view node: col2 forIt: [
view nodes: col2.
view verticalLineLayout.].
"we just created 2 nodes for the two collections and inside we added a
node for each element"
"we also laid out the nodes vertically inside each root node"
view edges: (1 to: col1 size) from: [:index | col1 at: index] to:
[:index | col2 at: index].
view open
Cheers,
Doru
On Jun 3, 2008, at 7:09 PM, azadeh wrote:
Hi,
I have a question about Mondrian .
I want to visualize an exttraction result by ViewRenderer .
As the result I have two OrderedCollections that have a semantic
relation between their entities.
Now i need to make edges from col1 index:1 to col2 index:1; col1
index:2 to col2 index:2; in this way.
I tried this way:
viewfrom : col1 to:col2
view := Smalltalk.Mondrian.ViewRenderer new.
i := 1 .[i < (col1 size)] whileTrue:[ view1 edges: col1 from:
[ col1 at: i] to:[col2 at:i]. i := i + 1.] .
view open.
or this way:
view1 edges: col1 fromAll: [:model| col1] toAll:[:model| col2].
ps1: the edges are from col1 to col2.
What should i do please?
Best,
Azadeh
--
www.tudorgirba.com
www.tudorgirba.com/blog
"Every successful trip needs a suitable vehicle."