Class: DVBarChart

DVBarChart

new DVBarChart(args)

A DVisual graph element indicate a Bar Chart,integrate the normal,stacked bar chart.
Parameters:
Name Type Description
args Array.<Object> a array contain arguments below
Properties
Name Type Attributes Default Description
X Array(string) a list of string for each x-label
Y Array(double) the set of a series value
style string <optional>
'bar' the style of bar chart,'stacked' or 'bar'
stackedY Array(Array(double)) use for stacked bar chart,for each element in this array have #stacked_component numbers.
stackedClass Array(string) a series of string indicate each stacked_component class.
stackedColors Array(DVColor) a series of DVColor indicate each stacked_component class.
all int how many bar you want for each X-label
index int current data is the i-th bar for the each X-label
color DVColor <optional>
new DVColor(256,0,0,0.8) the color of the bar(normal bar)
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
xDescript string <optional>
'x' the X axes's description
yDescript string <optional>
'y' the Y axes's description
legendOuterBox boolean <optional>
true whether draw the outer box of legend
Source:

Methods

draw(dv)

draw the DVBarChart 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: