2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
8 YUI.add('axis-stacked-base', function (Y, NAME) {
11 * Provides core functionality for the handling of stacked numeric axis data for a chart.
14 * @submodule axis-stacked-base
18 * StackedImpl contains logic for managing stacked numeric data. StackedImpl is used by the following classes:
20 * <li>{{#crossLink "StackedAxisBase"}}{{/crossLink}}</li>
21 * <li>{{#crossLink "StackedAxis"}}{{/crossLink}}</li>
24 * @submodule axis-stacked-base
28 function StackedImpl()
32 StackedImpl.NAME = "stackedImpl";
34 StackedImpl.prototype = {
36 * Type of data used in `Data`.
45 * Calculates the maximum and minimum values for the `Data`.
47 * @method _updateMinAndMax
50 _updateMinAndMax: function()
60 keys = this.get("keys"),
61 setMin = this.get("setMin"),
62 setMax = this.get("setMax");
66 if(keys.hasOwnProperty(key))
68 len = Math.max(len, keys[key].length);
77 if(keys.hasOwnProperty(key))
96 max = Math.max(max, pos);
100 max = Math.max(max, neg);
104 min = Math.min(min, neg);
108 min = Math.min(min, pos);
111 this._actualMaximum = max;
112 this._actualMinimum = min;
115 max = this._setMaximum;
119 min = this._setMinimum;
121 this._roundMinAndMax(min, max, setMin, setMax);
125 Y.StackedImpl = StackedImpl;
128 * StackedAxisBase manages stacked numeric data for an axis.
130 * @class StackedAxisBase
134 * @param {Object} config (optional) Configuration parameters.
135 * @submodule axis-stacked-base
137 Y.StackedAxisBase = Y.Base.create("stackedAxisBase", Y.NumericAxisBase, [Y.StackedImpl]);
140 }, '3.13.0', {"requires": ["axis-numeric-base"]});