Class: DVGraph

DVGraph

new DVGraph(args)

A DVisual graph element indicate a General Graph
Parameters:
Name Type Description
args Array.<Object> a array contain arguments below
Properties
Name Type Attributes Default Description
nodes Array(string) a series of string,indicate for each node's text actualy
edges Array(Array()) a series of tuple,which contain two index number for the edge.example[[0,1],[1,2]]
color Array(DVColor) <optional>
random the color of the node
style string <optional>
'undirected' the graph style.'undirected' or 'directed'
Source:

Methods

draw(dv)

draw the Pie chart on dv's canvas
Parameters:
Name Type Description
dv DVisual the Dvisual instance you want to draw
Source:

prepare(dv)

prepare the needed elements on the first time to draw it
Parameters:
Name Type Description
dv DVisual the Dvisual instance you want to draw
Source:

rerange(dv, V, E)

using the layout algorithm to appoint the location for each node
Parameters:
Name Type Description
dv DVisual the Dvisual instance you want to draw
V Array(Object) the vertice array
E Array(Object) the edges array
Source: