|
1 YUI.add('series-spline', function (Y, NAME) { |
|
2 |
|
3 /** |
|
4 * Provides functionality for creating a spline series. |
|
5 * |
|
6 * @module charts |
|
7 * @submodule series-spline |
|
8 */ |
|
9 /** |
|
10 * SplineSeries renders a graph with data points connected by a curve. |
|
11 * |
|
12 * @class SplineSeries |
|
13 * @extends LineSeries |
|
14 * @uses CurveUtil |
|
15 * @uses Lines |
|
16 * @constructor |
|
17 * @param {Object} config (optional) Configuration parameters. |
|
18 * @submodule series-spline |
|
19 */ |
|
20 Y.SplineSeries = Y.Base.create("splineSeries", Y.LineSeries, [Y.CurveUtil, Y.Lines], { |
|
21 /** |
|
22 * @protected |
|
23 * |
|
24 * Draws the series. |
|
25 * |
|
26 * @method drawSeries |
|
27 */ |
|
28 drawSeries: function() |
|
29 { |
|
30 this.drawSpline(); |
|
31 } |
|
32 }, { |
|
33 ATTRS : { |
|
34 /** |
|
35 * Read-only attribute indicating the type of series. |
|
36 * |
|
37 * @attribute type |
|
38 * @type String |
|
39 * @default spline |
|
40 */ |
|
41 type : { |
|
42 value:"spline" |
|
43 } |
|
44 |
|
45 /** |
|
46 * Style properties used for drawing lines. This attribute is inherited from `Renderer`. |
|
47 * Below are the default values: |
|
48 * <dl> |
|
49 * <dt>color</dt><dd>The color of the line. The default value is determined by the order of the series on |
|
50 * the graph. The color will be retrieved from the following array: |
|
51 * `["#426ab3", "#d09b2c", "#000000", "#b82837", "#b384b5", "#ff7200", "#779de3", "#cbc8ba", "#7ed7a6", "#007a6c"]` |
|
52 * <dt>weight</dt><dd>Number that indicates the width of the line. The default value is 6.</dd> |
|
53 * <dt>alpha</dt><dd>Number between 0 and 1 that indicates the opacity of the line. The default value is 1.</dd> |
|
54 * <dt>lineType</dt><dd>Indicates whether the line is solid or dashed. The default value is solid.</dd> |
|
55 * <dt>dashLength</dt><dd>When the `lineType` is dashed, indicates the length of the dash. The default value |
|
56 * is 10.</dd> |
|
57 * <dt>gapSpace</dt><dd>When the `lineType` is dashed, indicates the distance between dashes. The default value is |
|
58 * 10.</dd> |
|
59 * <dt>connectDiscontinuousPoints</dt><dd>Indicates whether or not to connect lines when there is a missing or null |
|
60 * value between points. The default value is true.</dd> |
|
61 * <dt>discontinuousType</dt><dd>Indicates whether the line between discontinuous points is solid or dashed. The |
|
62 * default value is solid.</dd> |
|
63 * <dt>discontinuousDashLength</dt><dd>When the `discontinuousType` is dashed, indicates the length of the dash. |
|
64 * The default value is 10.</dd> |
|
65 * <dt>discontinuousGapSpace</dt><dd>When the `discontinuousType` is dashed, indicates the distance between dashes. |
|
66 * The default value is 10.</dd> |
|
67 * </dl> |
|
68 * |
|
69 * @attribute styles |
|
70 * @type Object |
|
71 */ |
|
72 } |
|
73 }); |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 }, '@VERSION@', {"requires": ["series-line", "series-curve-util"]}); |