    package rw
    {
        import flare.vis.Visualization;
        import flare.vis.axis.Axes;
        import flare.vis.data.Data;
        import flare.vis.data.DataSprite;
        import flare.vis.events.DataEvent;

        public class TreeVisuakization extends Visualization
        {
            public function TreeVisuakization(data:Data=null, axes:Axes=null)
            {
                super(data, axes);
            }

            override public function set data(d:Data):void
            {
                if (_data != null) {
                    _data.root.visitTreeBreadthFirst(_marks.removeChild);
                    _data.removeEventListener(DataEvent.ADD, dataAdded);
                    _data.removeEventListener(DataEvent.REMOVE, dataRemoved);
                }
                _data = d;
                if (_data != null) {
                    _data.root.visitTreeBreadthFirst(function(n:DataSprite):void { _marks.addChildAt(n, 0) });
                    _data.addEventListener(DataEvent.ADD, dataAdded);
                    _data.addEventListener(DataEvent.REMOVE, dataRemoved);
                }
            }
        }
    }