Class: DVPieChart

DVPieChart

new DVPieChart(args)

A DVisual graph element indicate a Pie Chart
Parameters:
Name Type Description
args Array.<Object> a array contain arguments below
Properties
Name Type Attributes Default Description
X Array(string) a series of string,indicate for each component on the pie
Y Array(double) a series of value,the hist chart will be created by this data
legendOuterBox boolean <optional>
true whether draw the outer box of legend
colors Array(DVColor) <optional>
DVgetRandomColor(this.args.X.length) the colors for each component
ring_ratio douboe <optional>
0 the ring ratio of the pie,0 in default,means no ring
text Array(string) <optional>
!!label+':'+value!! a series of string you want to show on each sector on the pie.
style string <optional>
'showPercentage' show the value of each bar or the percentage,'empty' or 'showtext' or 'showPercentage',or 'ring' to show a ring chart
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: