Class: DVHistChart

DVHistChart

new DVHistChart(args)

A DVisual graph element indicate a Histgram Chart
Parameters:
Name Type Description
args Array.<Object> a array contain arguments below
Properties
Name Type Attributes Default Description
X Array(double) a series of value,the hist chart will be created by this data
color DVColor <optional>
new DVColor(256,0,0,0.8) the color of the bar(normal bar)
sec sec <optional>
this.getsec(this.args.X) the segment for the input data for each hist,will be calculate in default.
yStyle string <optional>
'value' show the value of each bar or the percentage,'value' or 'percentage'
lineWidth double <optional>
'1' the lineWidth of graph
xDescript string <optional>
'x' the X axes's description
yDescript string <optional>
'y' the Y axes's description
xGrid boolean <optional>
false whether draw the grid line started from X axes
yGrid boolean <optional>
true whether draw the grid line started from Y axes
Source:

Methods

draw(dv)

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

getsec(X) → {double}

calculate the segment if the user haven't set.
Parameters:
Name Type Description
X Array(double) the set of input data
Source:
Returns:
sec - the segment ofr the hist chart
Type
double

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: