Class: DVPolygon

DVPolygon

new DVPolygon(args)

A DVisual graph element indicate a polygon
Parameters:
Name Type Description
args Array.<Object> a array contain arguments below
Properties
Name Type Attributes Default Description
X Array(double) the set of a series nodes' x value
Y Array(double) the set of a series nodes' y value
color DVColor <optional>
new DVColor() the color of the dot,black in default
style string <optional>
'fill' the style of this dot,should be one of 'fill','stroke'
shadow boolean <optional>
true whether draw text's shadow.
lineWidth double <optional>
'1' the lineWidth of text
Source:
Example
new DVPolygon({'X':[10,10,20,20],'Y':[10,20,20,10],'style':'stroke'});

Methods

draw(dv)

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