Treemap.js | |
TM.Base | Abstract class providing base functionality for TM.Squarified, TM.Strip and TM.SliceAndDice visualizations. |
Functions | |
refresh | Computes positions and plots the tree. |
plot | Plots the TreeMap. |
leaf | Returns whether the node is a leaf. |
enter | Sets the node as root. |
out | Sets the parent node of the current selected node as root. |
TM.Op | Custom extension of Graph.Op. |
TM.Plot | Custom extension of Graph.Plot. |
TM. | Custom extension of Graph.Label. |
TM. | This class contains a list of Graph.Node built-in types. |
TM. | A slice and dice TreeMap visualization. |
TM. | A squarified TreeMap visualization. |
TM. | A strip TreeMap visualization. |
Abstract class providing base functionality for TM.Squarified, TM.Strip and TM.SliceAndDice visualizations.
All Loader methods
Inherits options from
Additionally, there are other parameters and some default values changed
orientation | (string) Default’s h. Whether to set horizontal or vertical layouts. Possible values are ‘h’ and ‘v’. |
titleHeight | (number) Default’s 13. The height of the title rectangle for inner (non-leaf) nodes. |
offset | (number) Default’s 2. Boxes offset. |
constrained | (boolean) Default’s false. Whether to show the entire tree when loaded or just the number of levels specified by levelsToShow. |
levelsToShow | (number) Default’s 3. The number of levels to show for a subtree. This number is relative to the selected node. |
animate | (boolean) Default’s false. Whether to animate transitions. |
Node.type | Described in Options.Node. Default’s rectangle. |
duration | Described in Options.Fx. Default’s 700. |
fps | Described in Options.Fx. Default’s 45. |
canvas | Access a Canvas instance. |
graph | Access a Graph instance. |
op | Access a TM.Op instance. |
fx | Access a TM.Plot instance. |
labels | Access a TM.Label interface implementation. |
Squarified Treemaps (Mark Bruls, Kees Huizing, and Jarke J. van Wijk) http://www.win.tue.nl/~vanwijk/stm.pdf
Tree visualization with tree-maps: 2-d space-filling approach (Ben Shneiderman) http://hcil.cs.umd.edu/trs/91-03/91-03.html
This visualization was built and engineered from scratch, taking only the paper as inspiration, and only shares some features with the visualization described in the paper.
Custom extension of Graph.Label. Contains custom Graph.Label.SVG, Graph.Label.HTML and Graph.Label.Native extensions.
All Graph.Label methods and subclasses.
Graph.Label, Graph.Label.Native, Graph.Label.HTML, Graph.Label.SVG.
This class contains a list of Graph.Node built-in types. Node types implemented are ‘none’, ‘rectangle’.
You can add your custom node types, customizing your visualization to the extreme.
TM.Plot.NodeTypes.implement({ 'mySpecialType': { 'render': function(node, canvas) { //print your custom node to canvas }, //optional 'contains': function(node, pos) { //return true if pos is inside the node or false otherwise } } });
Computes positions and plots the tree.
refresh: function()
Plots the TreeMap.
plot: function()
Returns whether the node is a leaf.
leaf: function( n )
Sets the node as root.
enter: function( n )
Sets the parent node of the current selected node as root.
out: function()