~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/yuilib/3.9.1/build/series-area/series-area-debug.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
2
 
YUI.add('series-area', function (Y, NAME) {
3
 
 
4
 
/**
5
 
 * Provides functionality for creating a area series.
6
 
 *
7
 
 * @module charts
8
 
 * @submodule series-area
9
 
 */
10
 
/**
11
 
 * The AreaSeries class renders quantitative data on a graph by creating a fill between 0
12
 
 * and the relevant data points.
13
 
 *
14
 
 * @class AreaSeries
15
 
 * @extends CartesianSeries
16
 
 * @uses Fills
17
 
 * @constructor
18
 
 * @param {Object} config (optional) Configuration parameters.
19
 
 * @submodule series-area
20
 
 */
21
 
Y.AreaSeries = Y.Base.create("areaSeries", Y.CartesianSeries, [Y.Fills], {
22
 
    /**
23
 
     * @protected
24
 
     *
25
 
     * Renders the series.
26
 
     *
27
 
     * @method drawSeries
28
 
     */
29
 
    drawSeries: function()
30
 
    {
31
 
        this.drawFill.apply(this, this._getClosingPoints());
32
 
    },
33
 
 
34
 
    /**
35
 
     * @protected
36
 
     *
37
 
     * Method used by `styles` setter. Overrides base implementation.
38
 
     *
39
 
     * @method _setStyles
40
 
     * @param {Object} newStyles Hash of properties to update.
41
 
     * @return Object
42
 
     */
43
 
    _setStyles: function(val)
44
 
    {
45
 
        if(!val.area)
46
 
        {
47
 
            val = {area:val};
48
 
        }
49
 
        return Y.AreaSeries.superclass._setStyles.apply(this, [val]);
50
 
    },
51
 
 
52
 
    /**
53
 
     * @protected
54
 
     *
55
 
     * Gets the default value for the `styles` attribute. Overrides
56
 
     * base implementation.
57
 
     *
58
 
     * @method _getDefaultStyles
59
 
     * @return Object
60
 
     */
61
 
    _getDefaultStyles: function()
62
 
    {
63
 
        var styles = this._mergeStyles({area:this._getAreaDefaults()}, Y.AreaSeries.superclass._getDefaultStyles());
64
 
        return styles;
65
 
    }
66
 
},
67
 
{
68
 
    ATTRS: {
69
 
        /**
70
 
         * Read-only attribute indicating the type of series.
71
 
         *
72
 
         * @attribute type
73
 
         * @type String
74
 
         * @default area
75
 
         */
76
 
        type: {
77
 
            value:"area"
78
 
        }
79
 
 
80
 
        /**
81
 
         * Style properties used for drawing area fills. This attribute is inherited from `Renderer`. Below are the default values:
82
 
         *
83
 
         *  <dl>
84
 
         *      <dt>color</dt><dd>The color of the fill. The default value is determined by the order of the series on the graph. The color will be
85
 
         *      retrieved from the following array:
86
 
         *      `["#66007f", "#a86f41", "#295454", "#996ab2", "#e8cdb7", "#90bdbd","#000000","#c3b8ca", "#968373", "#678585"]`
87
 
         *      </dd>
88
 
         *      <dt>alpha</dt><dd>Number between 0 and 1 that indicates the opacity of the fill. The default value is 1</dd>
89
 
         *  </dl>
90
 
         *
91
 
         * @attribute styles
92
 
         * @type Object
93
 
         */
94
 
    }
95
 
});
96
 
 
97
 
 
98
 
 
99
 
 
100
 
 
101
 
 
102
 
 
103
 
 
104
 
}, '3.9.1', {"requires": ["series-cartesian", "series-fill-util"]});