new DVLegend(args)
A DVisual graph element indicate a Legend,an important structure of most chart
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Array.<Object> | a array contain arguments below
Properties
|
- Source:
Example
new DVLegend({'xDescript':"time",'yDescript':"value",'xSpan':20,'ySpan'});
Methods
draw(dv)
draw the Coordinate on dv's canvas
Parameters:
Name | Type | Description |
---|---|---|
dv |
DVisual | the Dvisual instance you want to draw |
- Source:
getHeightWidth(dv) → {Array}
get the legend's height and width according to the dvisual instance
Parameters:
Name | Type | Description |
---|---|---|
dv |
DVisual | the Dvisual instance you want to draw |
- Source:
Returns:
result - [height,width]
- Type
- Array
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: