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('series-range', function (Y, NAME) {
11 * Provides functionality for creating a range series.
14 * @submodule series-range
18 * An abstract class for creating range series instances.
19 * RangeSeries is used by the following classes:
21 * <li>{{#crossLink "CandlestickSeries"}}{{/crossLink}}</li>
22 * <li>{{#crossLink "OHLCSeries"}}{{/crossLink}}</li>
26 * @extends CartesianSeries
28 * @param {Object} config (optional) Configuration parameters.
29 * @submodule series-range
31 function RangeSeries()
33 RangeSeries.superclass.constructor.apply(this, arguments);
36 RangeSeries.NAME = "rangeSeries";
40 * Read-only attribute indicating the type of series.
51 * Values to be used for open, high, low and close keys.
68 Y.extend(RangeSeries, Y.CartesianSeries, {
75 drawSeries: function()
77 var xcoords = this.get("xcoords"),
78 ycoords = this.get("ycoords"),
79 styles = this.get("styles"),
80 padding = styles.padding,
82 dataWidth = this.get("width") - (padding.left + padding.right),
83 keys = this.get("ohlckeys"),
84 opencoords = ycoords[keys.open],
85 highcoords = ycoords[keys.high],
86 lowcoords = ycoords[keys.low],
87 closecoords = ycoords[keys.close],
88 width = dataWidth/len,
90 this._drawMarkers(xcoords, opencoords, highcoords, lowcoords, closecoords, len, width, halfwidth, styles);
94 Y.RangeSeries = RangeSeries;
99 }, '3.13.0', {"requires": ["series-cartesian"]});