R – Flex + Drawing dynamically


I want to try display a relationship diagram.

I have the xml

          <Name>1st Grade</Name>
          <Name>2nd Grade</Name>
               <Teaches>1st Grade</Teaches>
               <Teaches>1st Grade</Teaches>
               <Teaches>2nd Grade</Teaches>
  1. How can I draw it, also, since there is a dependency for the teacher, there needs to be a connectivity between the Class & Teacher also.
  2. Is it possible to display them as icons and provide a tool tip which gives description, like the teacher icon would have teacher name and the grade she/he teaches?

Any help!!

Best Solution

Mark Shepherd's SpringGraph is a nice utility for drawing graphs. You'll have to write the layer between your XML representation and the nodes in the graph, but that is easy.

You can overload the itemRenderer for the nodes and show your custom images and hover tips on the appropriate Mouse event.

Related Question