I am using Flare as my graphing library of choice for my current Flex project. Everything works great - my graph is being displayed correctly, but moving it poses a problem. The graph can be moved anywhere around the application, even outside of the graph's panel/container. It can even be placed on top of buttons and other GUI elements.
I need the graph to stay within its parent container, only able to move within its parent. I've spent numerous hours trying different approaches recommended by other Flare/Flex developers and nothing seems to work.
Some approaches I've tried: setting rectangular bounds on the graph's parent container, placing the parent container or the graph itself within a sprite object and setting specific bounds, and setting the clipToContent property appropriately.
I've found a few Flare demos online and each of the graph demos that are represented by nodes and vertices seem to have this same issue. This makes me thing that it's a Flare bug, but I don't want to jump to that conclusion yet.
Any help is greatly appreciated! Thanks.
I faced the same situation, and I solved it by creating a mask for my Visualization(solved or circumvented? lol):
<mx:Panel width="65%" height="100%" layout="absolute" id="graphPanel">
<flexvis:FlareVis id="graph" label="Graph" width="100%" height="100%" />
<mx:Canvas width="100%" height="100%" id="graphMask" />
</mx:Panel>
var vis:Visualization = graph.visualization;
vis.mask = graphMask;