src/cm/media/js/lib/yui/yui_3.10.3/build/series-combo-stacked/series-combo-stacked-debug.js
changeset 525 89ef5ed3c48b
equal deleted inserted replaced
524:322d0feea350 525:89ef5ed3c48b
       
     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-combo-stacked', function (Y, NAME) {
       
     9 
       
    10 /**
       
    11  * Provides functionality for creating a stacked combo series.
       
    12  *
       
    13  * @module charts
       
    14  * @submodule series-combo-stacked
       
    15  */
       
    16 /**
       
    17  * The StackedComboSeries class renders a combination of lines, plots and area fills in a single series. Series
       
    18  * are stacked along the value axis to indicate each series contribution to a cumulative total. Each
       
    19  * series type has a corresponding boolean attribute indicating if it is rendered. By default, all three types are
       
    20  * rendered.
       
    21  *
       
    22  * @class StackedComboSeries
       
    23  * @extends ComboSeries
       
    24  * @uses StackingUtil
       
    25  * @constructor
       
    26  * @param {Object} config (optional) Configuration parameters.
       
    27  * @submodule series-combo-stacked
       
    28  */
       
    29 Y.StackedComboSeries = Y.Base.create("stackedComboSeries", Y.ComboSeries, [Y.StackingUtil], {
       
    30     /**
       
    31      * @protected
       
    32      *
       
    33      * Calculates the coordinates for the series. Overrides base implementation.
       
    34      *
       
    35      * @method setAreaData
       
    36      */
       
    37     setAreaData: function()
       
    38     {
       
    39         Y.StackedComboSeries.superclass.setAreaData.apply(this);
       
    40         this._stackCoordinates.apply(this);
       
    41     },
       
    42 
       
    43     /**
       
    44      * @protected
       
    45      *
       
    46      * Draws the series.
       
    47      *
       
    48      * @method drawSeries
       
    49      */
       
    50     drawSeries: function()
       
    51     {
       
    52         if(this.get("showAreaFill"))
       
    53         {
       
    54             this.drawFill.apply(this, this._getStackedClosingPoints());
       
    55         }
       
    56         if(this.get("showLines"))
       
    57         {
       
    58             this.drawLines();
       
    59         }
       
    60         if(this.get("showMarkers"))
       
    61         {
       
    62             this.drawPlots();
       
    63         }
       
    64     }
       
    65 
       
    66 }, {
       
    67     ATTRS : {
       
    68         /**
       
    69          * Read-only attribute indicating the type of series.
       
    70          *
       
    71          * @attribute type
       
    72          * @type String
       
    73          * @default stackedCombo
       
    74          */
       
    75         type: {
       
    76             value: "stackedCombo"
       
    77         },
       
    78 
       
    79         /**
       
    80          * Indicates whether a fill is displayed.
       
    81          *
       
    82          * @attribute showAreaFill
       
    83          * @type Boolean
       
    84          * @default true
       
    85          */
       
    86         showAreaFill: {
       
    87             value: true
       
    88         }
       
    89     }
       
    90 });
       
    91 
       
    92 
       
    93 }, '3.10.3', {"requires": ["series-stacked", "series-combo"]});