Handling tooltip rendering

Tooltips are very useful for showing additional information about the node/Link data. Thus, in Visualizer, tooltips content is handled in the same way that node content is handled. Tooltip management is done:

Using DefaultTooltip

It is loaded by default and taking as parameters visualizer properties related to the tooltip:

Using nodeTooltipRendererFunction (respectively linkTooltipRendererFunction)

Function used to return custom visual content (MXML component, Video, Image...) as a tooltip for each node (respectively link) given its data. It takes as input the node (respectively link) data and according to it returns a custom DisplayObject instance. At each node (respectively link) roll over, a new instance is created and displayed as tooltip.

The following function is an example for a node tooltip rendering function:

 protected function tooltipRendererFunction(data:Object):DisplayObject
  var tooltip:Label = new Label();
  tooltip.text = data['name'];
  return tooltip;