|
1 YUI.add('series-combospline-stacked', function (Y, NAME) { |
|
2 |
|
3 /** |
|
4 * Provides functionality for creating a stacked combospline series. |
|
5 * |
|
6 * @module charts |
|
7 * @submodule series-combospline-stacked |
|
8 */ |
|
9 /** |
|
10 * The StackedComboSplineSeries class renders a combination of splines, plots and areaspline fills in a single series. Series |
|
11 * are stacked along the value axis to indicate each series contribution to a cumulative total. Each |
|
12 * series type has a corresponding boolean attribute indicating if it is rendered. By default, all three types are |
|
13 * rendered. |
|
14 * |
|
15 * @class StackedComboSplineSeries |
|
16 * @extends StackedComboSeries |
|
17 * @uses CurveUtil |
|
18 * @constructor |
|
19 * @param {Object} config (optional) Configuration parameters. |
|
20 * @submodule series-combospline-stacked |
|
21 */ |
|
22 Y.StackedComboSplineSeries = Y.Base.create("stackedComboSplineSeries", Y.StackedComboSeries, [Y.CurveUtil], { |
|
23 /** |
|
24 * @protected |
|
25 * |
|
26 * Draws the series. |
|
27 * |
|
28 * @method drawSeries |
|
29 */ |
|
30 drawSeries: function() |
|
31 { |
|
32 if(this.get("showAreaFill")) |
|
33 { |
|
34 this.drawStackedAreaSpline(); |
|
35 } |
|
36 if(this.get("showLines")) |
|
37 { |
|
38 this.drawSpline(); |
|
39 } |
|
40 if(this.get("showMarkers")) |
|
41 { |
|
42 this.drawPlots(); |
|
43 } |
|
44 } |
|
45 }, { |
|
46 ATTRS: { |
|
47 /** |
|
48 * Read-only attribute indicating the type of series. |
|
49 * |
|
50 * @attribute type |
|
51 * @type String |
|
52 * @default stackedComboSpline |
|
53 */ |
|
54 type : { |
|
55 value : "stackedComboSpline" |
|
56 }, |
|
57 |
|
58 /** |
|
59 * Indicates whether a fill is displayed. |
|
60 * |
|
61 * @attribute showAreaFill |
|
62 * @type Boolean |
|
63 * @default true |
|
64 */ |
|
65 showAreaFill: { |
|
66 value: true |
|
67 } |
|
68 } |
|
69 }); |
|
70 |
|
71 |
|
72 }, '@VERSION@', {"requires": ["series-combo-stacked", "series-curve-util"]}); |