Sunburst.js

Summary
Sunburst.js
SunburstA radial space filling tree visualization.
Functions
refreshComputes positions and plots the tree.
rotateRotates the graph so that the selected node is horizontal on the right.
rotateAngleRotates the graph of an angle theta.
plotPlots the Sunburst.
Sunburst.OpCustom extension of Graph.Op.
Sunburst.PlotCustom extension of Graph.Plot.
Sunburst.LabelCustom extension of Graph.Label.
Sunburst.Plot.NodeTypesThis class contains a list of Graph.Node built-in types.
Sunburst.Plot.EdgeTypesThis class contains a list of Graph.Adjacence built-in types.

Sunburst

A radial space filling tree visualization.

Inspired by

Sunburst http://www.cc.gatech.edu/gvu/ii/sunburst/.

Note

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.

Implements

All Loader methods

Constructor Options

Inherits options from

Additionally, there are other parameters and some default values changed

interpolation(string) Default’s linear.  Describes the way nodes are interpolated.  Possible values are ‘linear’ and ‘polar’.
levelDistance(number) Default’s 100.  The distance between levels of the tree.
Node.typeDescribed in Options.Node.  Default’s to multipie.
Node.heightDescribed in Options.Node.  Default’s 0.
Edge.typeDescribed in Options.Edge.  Default’s none.
Label.textAlignDescribed in Options.Label.  Default’s start.
Label.textBaselineDescribed in Options.Label.  Default’s middle.

Instance Properties

canvasAccess a Canvas instance.
graphAccess a Graph instance.
opAccess a Sunburst.Op instance.
fxAccess a Sunburst.Plot instance.
labelsAccess a Sunburst.Label interface implementation.
Summary
Functions
refreshComputes positions and plots the tree.
rotateRotates the graph so that the selected node is horizontal on the right.
rotateAngleRotates the graph of an angle theta.
plotPlots the Sunburst.

Functions

refresh

refresh: function()

Computes positions and plots the tree.

rotate

rotate: function(node,
method,
opt)

Rotates the graph so that the selected node is horizontal on the right.

Parameters

node(object) A Graph.Node.
method(string) Whether to perform an animation or just replot the graph.  Possible values are “replot” or “animate”.
opt(object) Configuration options merged with this visualization configuration options.

See also

Sunburst.rotateAngle

rotateAngle

rotateAngle: function(theta,
method,
opt)

Rotates the graph of an angle theta.

Parameters

node(object) A Graph.Node.
method(string) Whether to perform an animation or just replot the graph.  Possible values are “replot” or “animate”.
opt(object) Configuration options merged with this visualization configuration options.

See also

Sunburst.rotate

plot

plot: function()

Plots the Sunburst.  This is a shortcut to fx.plot.

Sunburst.Op

Custom extension of Graph.Op.

Extends

All Graph.Op methods

See also

Graph.Op

Sunburst.Plot

Custom extension of Graph.Plot.

Extends

All Graph.Plot methods

See also

Graph.Plot

Sunburst.Label

Custom extension of Graph.Label.  Contains custom Graph.Label.SVG, Graph.Label.HTML and Graph.Label.Native extensions.

Extends

All Graph.Label methods and subclasses.

See also

Graph.Label, Graph.Label.Native, Graph.Label.HTML, Graph.Label.SVG.

Sunburst.Plot.NodeTypes

This class contains a list of Graph.Node built-in types.  Node types implemented are ‘none’, ‘pie’, ‘multipie’, ‘gradient-pie’ and ‘gradient-multipie’.

You can add your custom node types, customizing your visualization to the extreme.

Example

Sunburst.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
    }
  }
});

Sunburst.Plot.EdgeTypes

This class contains a list of Graph.Adjacence built-in types.  Edge types implemented are ‘none’, ‘line’ and ‘arrow’.

You can add your custom edge types, customizing your visualization to the extreme.

Example

Sunburst.Plot.EdgeTypes.implement({
  'mySpecialType': {
    'render': function(adj, canvas) {
      //print your custom edge to canvas
    },
    //optional
    'contains': function(adj, pos) {
      //return true if pos is inside the arc or false otherwise
    }
  }
});
refresh: function()
Computes positions and plots the tree.
rotate: function(node,
method,
opt)
Rotates the graph so that the selected node is horizontal on the right.
rotateAngle: function(theta,
method,
opt)
Rotates the graph of an angle theta.
plot: function()
Plots the Sunburst.
Perform Graph operations like adding/removing Graph.Nodes or Graph.Adjacences, morphing a Graph into another Graph, contracting or expanding subtrees, etc.
Graph rendering and animation methods.
An interface for plotting/hiding/showing labels.
A Graph node.
A Graph adjacence (or edge) connecting two Graph.Nodes.
Provides methods for loading and serving JSON data.
These are Canvas general options, like where to append it in the DOM, its dimensions, background, and other more advanced options.
Provides controller methods.
Provides Node rendering options for Tree and Graph based visualizations.
Provides Edge rendering options for Tree and Graph based visualizations.
Provides styling for Labels such as font size, family, etc.
Configuration for adding mouse/touch event handlers to Nodes.
Tips options
Apply different styles when a node is hovered or selected.
Panning and zooming options for Graph/Tree based visualizations.
A canvas widget used by all visualizations.
A Graph Class that provides useful manipulation functions.
Custom extension of Graph.Op.
Custom extension of Graph.Plot.
Custom extension of Graph.Label.
Implements SVG labels.
Implements HTML labels.
Implements labels natively, using the Canvas text API.
Close