Menu

FisheyeDistortion using tab-delimited data?

Flare Help
2010-09-17
2013-05-29
  • SeventyOne71

    SeventyOne71 - 2010-09-17

    My goal is to create a tree visualization similar to the distortions demos but utilizing an external data source.

    I was able to work through the Flare Tutorial without problem.
    This tutorial uses tab-delimited data to create a Cartesian style scatter graph.

    I am also able to create fisheye distortions following the demo examples.

    However the fisheye demo examples do not utilize external (tab-delimited) data to assign structure to the tree and the various nodes (parent-children node relationships, node labels, etc.)  I am unclear on how this is done.

    So while I can make visual adjustments - FisheyeDistortion (distortion factors and magnitude) and (length of branches, number of children of each branch node), I do not know how to structure my code and data to assign hierarchical relationships and labels to the NodeSprites.

    Is there another tutorial or simple example of this that someone could provide to clarify in greater detail how this is done?

    I am new to flex and flare and do appreciate your help. - Thank you.

     
  • goose

    goose - 2010-09-18

    Good morning 71,

    if you are creating the source file for your visualization yourself I would recommend to use the graphml file format which is designed to represent trees/graphs . A simple example for that reading a graph from a graphml file:

    http://goosebumps4all.net/34all/bb/showthread.php?tid=127&highlight=reading

    If for whatever reason this is not a good choice for you and you want/have to use a tab delimited source file you have to build the tree yourself after having it red from the source. If you have a tree I would for example just use one "tab-field" to specify the parent of the node represented in that line. The following example shows how to build a graph dynamically

    http://goosebumps4all.net/34all/bb/showthread.php?tid=118

    for a Tree object you have to use different methods like addChild etc, see

    http://flare.prefuse.org/api/flare/vis/data/Tree.html

    Hope that helps

    martin

     
  • SeventyOne71

    SeventyOne71 - 2010-09-30

    Thanks Martin!   graphml was the ticket.

    Cheers!

     

Log in to post a comment.