|
525
|
1 |
/* |
|
|
2 |
YUI 3.10.3 (build 2fb5187) |
|
|
3 |
Copyright 2013 Yahoo! Inc. All rights reserved. |
|
|
4 |
Licensed under the BSD License. |
|
|
5 |
http://yuilibrary.com/license/ |
|
|
6 |
*/ |
|
|
7 |
|
|
|
8 |
YUI.add('series-combospline', function (Y, NAME) { |
|
|
9 |
|
|
|
10 |
/** |
|
|
11 |
* Provides functionality for creating a combospline series. |
|
|
12 |
* |
|
|
13 |
* @module charts |
|
|
14 |
* @submodule series-combospline |
|
|
15 |
*/ |
|
|
16 |
/** |
|
|
17 |
* The ComboSplineSeries class renders a combination of splines, plots and areaspline fills in a single series. Each |
|
|
18 |
* series type has a corresponding boolean attribute indicating if it is rendered. By default, splines and plots |
|
|
19 |
* are rendered and areaspline is not. |
|
|
20 |
* |
|
|
21 |
* @class ComboSplineSeries |
|
|
22 |
* @extends ComboSeries |
|
|
23 |
* @uses CurveUtil |
|
|
24 |
* @constructor |
|
|
25 |
* @param {Object} config (optional) Configuration parameters. |
|
|
26 |
* @submodule series-combospline |
|
|
27 |
*/ |
|
|
28 |
Y.ComboSplineSeries = Y.Base.create("comboSplineSeries", Y.ComboSeries, [Y.CurveUtil], { |
|
|
29 |
/** |
|
|
30 |
* @protected |
|
|
31 |
* |
|
|
32 |
* Draws the series. |
|
|
33 |
* |
|
|
34 |
* @method drawSeries |
|
|
35 |
*/ |
|
|
36 |
drawSeries: function() |
|
|
37 |
{ |
|
|
38 |
if(this.get("showAreaFill")) |
|
|
39 |
{ |
|
|
40 |
this.drawAreaSpline(); |
|
|
41 |
} |
|
|
42 |
if(this.get("showLines")) |
|
|
43 |
{ |
|
|
44 |
this.drawSpline(); |
|
|
45 |
} |
|
|
46 |
if(this.get("showMarkers")) |
|
|
47 |
{ |
|
|
48 |
this.drawPlots(); |
|
|
49 |
} |
|
|
50 |
} |
|
|
51 |
}, { |
|
|
52 |
ATTRS: { |
|
|
53 |
/** |
|
|
54 |
* Read-only attribute indicating the type of series. |
|
|
55 |
* |
|
|
56 |
* @attribute type |
|
|
57 |
* @type String |
|
|
58 |
* @default comboSpline |
|
|
59 |
*/ |
|
|
60 |
type: { |
|
|
61 |
value : "comboSpline" |
|
|
62 |
} |
|
|
63 |
} |
|
|
64 |
}); |
|
|
65 |
|
|
|
66 |
|
|
|
67 |
}, '3.10.3', {"requires": ["series-combo", "series-curve-util"]}); |