10 __coverage__['build/series-candlestick/series-candlestick.js'] = {"path":"build/series-candlestick/series-candlestick.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":49}}},"2":{"name":"CandlestickSeries","line":19,"loc":{"start":{"line":19,"column":0},"end":{"line":20,"column":0}}},"3":{"name":"(anonymous_3)","line":48,"loc":{"start":{"line":48,"column":16},"end":{"line":48,"column":30}}},"4":{"name":"(anonymous_4)","line":159,"loc":{"start":{"line":159,"column":18},"end":{"line":160,"column":4}}},"5":{"name":"(anonymous_5)","line":212,"loc":{"start":{"line":212,"column":20},"end":{"line":213,"column":4}}},"6":{"name":"(anonymous_6)","line":225,"loc":{"start":{"line":225,"column":16},"end":{"line":226,"column":4}}},"7":{"name":"(anonymous_7)","line":252,"loc":{"start":{"line":252,"column":23},"end":{"line":253,"column":4}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":291,"column":45}},"2":{"start":{"line":19,"column":0},"end":{"line":22,"column":1}},"3":{"start":{"line":21,"column":4},"end":{"line":21,"column":68}},"4":{"start":{"line":24,"column":0},"end":{"line":24,"column":45}},"5":{"start":{"line":26,"column":0},"end":{"line":141,"column":2}},"6":{"start":{"line":50,"column":12},"end":{"line":52,"column":13}},"7":{"start":{"line":51,"column":16},"end":{"line":51,"column":43}},"8":{"start":{"line":53,"column":12},"end":{"line":55,"column":16}},"9":{"start":{"line":56,"column":12},"end":{"line":58,"column":16}},"10":{"start":{"line":59,"column":12},"end":{"line":61,"column":16}},"11":{"start":{"line":62,"column":12},"end":{"line":62,"column":23}},"12":{"start":{"line":143,"column":0},"end":{"line":287,"column":3}},"13":{"start":{"line":161,"column":8},"end":{"line":174,"column":15}},"14":{"start":{"line":175,"column":8},"end":{"line":175,"column":38}},"15":{"start":{"line":176,"column":8},"end":{"line":176,"column":42}},"16":{"start":{"line":177,"column":8},"end":{"line":177,"column":30}},"17":{"start":{"line":178,"column":8},"end":{"line":178,"column":25}},"18":{"start":{"line":179,"column":8},"end":{"line":179,"column":27}},"19":{"start":{"line":180,"column":8},"end":{"line":180,"column":21}},"20":{"start":{"line":181,"column":8},"end":{"line":198,"column":9}},"21":{"start":{"line":183,"column":12},"end":{"line":183,"column":42}},"22":{"start":{"line":184,"column":12},"end":{"line":184,"column":34}},"23":{"start":{"line":185,"column":12},"end":{"line":185,"column":35}},"24":{"start":{"line":186,"column":12},"end":{"line":186,"column":38}},"25":{"start":{"line":187,"column":12},"end":{"line":187,"column":38}},"26":{"start":{"line":188,"column":12},"end":{"line":188,"column":36}},"27":{"start":{"line":189,"column":12},"end":{"line":189,"column":40}},"28":{"start":{"line":190,"column":12},"end":{"line":190,"column":40}},"29":{"start":{"line":191,"column":12},"end":{"line":191,"column":46}},"30":{"start":{"line":192,"column":12},"end":{"line":192,"column":49}},"31":{"start":{"line":193,"column":12},"end":{"line":193,"column":34}},"32":{"start":{"line":194,"column":12},"end":{"line":194,"column":48}},"33":{"start":{"line":195,"column":12},"end":{"line":195,"column":54}},"34":{"start":{"line":196,"column":12},"end":{"line":196,"column":39}},"35":{"start":{"line":197,"column":12},"end":{"line":197,"column":38}},"36":{"start":{"line":199,"column":8},"end":{"line":199,"column":23}},"37":{"start":{"line":200,"column":8},"end":{"line":200,"column":25}},"38":{"start":{"line":201,"column":8},"end":{"line":201,"column":19}},"39":{"start":{"line":202,"column":8},"end":{"line":202,"column":22}},"40":{"start":{"line":214,"column":8},"end":{"line":214,"column":53}},"41":{"start":{"line":215,"column":8},"end":{"line":215,"column":55}},"42":{"start":{"line":216,"column":8},"end":{"line":216,"column":49}},"43":{"start":{"line":227,"column":8},"end":{"line":229,"column":36}},"44":{"start":{"line":230,"column":8},"end":{"line":233,"column":9}},"45":{"start":{"line":232,"column":12},"end":{"line":232,"column":31}},"46":{"start":{"line":234,"column":8},"end":{"line":237,"column":9}},"47":{"start":{"line":236,"column":12},"end":{"line":236,"column":33}},"48":{"start":{"line":238,"column":8},"end":{"line":241,"column":9}},"49":{"start":{"line":240,"column":12},"end":{"line":240,"column":27}},"50":{"start":{"line":254,"column":8},"end":{"line":284,"column":10}},"51":{"start":{"line":285,"column":8},"end":{"line":285,"column":91}},"52":{"start":{"line":288,"column":0},"end":{"line":288,"column":40}}},"branchMap":{"1":{"line":50,"type":"if","locations":[{"start":{"line":50,"column":12},"end":{"line":50,"column":12}},{"start":{"line":50,"column":12},"end":{"line":50,"column":12}}]},"2":{"line":191,"type":"cond-expr","locations":[{"start":{"line":191,"column":23},"end":{"line":191,"column":33}},{"start":{"line":191,"column":36},"end":{"line":191,"column":45}}]},"3":{"line":192,"type":"cond-expr","locations":[{"start":{"line":192,"column":26},"end":{"line":192,"column":35}},{"start":{"line":192,"column":38},"end":{"line":192,"column":48}}]},"4":{"line":194,"type":"cond-expr","locations":[{"start":{"line":194,"column":26},"end":{"line":194,"column":34}},{"start":{"line":194,"column":37},"end":{"line":194,"column":47}}]},"5":{"line":230,"type":"if","locations":[{"start":{"line":230,"column":8},"end":{"line":230,"column":8}},{"start":{"line":230,"column":8},"end":{"line":230,"column":8}}]},"6":{"line":234,"type":"if","locations":[{"start":{"line":234,"column":8},"end":{"line":234,"column":8}},{"start":{"line":234,"column":8},"end":{"line":234,"column":8}}]},"7":{"line":238,"type":"if","locations":[{"start":{"line":238,"column":8},"end":{"line":238,"column":8}},{"start":{"line":238,"column":8},"end":{"line":238,"column":8}}]}},"code":["(function () { YUI.add('series-candlestick', function (Y, NAME) {","","/**"," * Provides functionality for creating a candlestick series."," *"," * @module charts"," * @submodule series-candlestick"," */","/**"," * The CandlestickSeries class renders columns (candles) and lines (wicks) representing the open, high, low and close"," * values for a chart."," *"," * @class CandlestickSeries"," * @extends RangeSeries"," * @constructor"," * @param {Object} config (optional) Configuration parameters."," * @submodule series-candlestick"," */","function CandlestickSeries()","{"," CandlestickSeries.superclass.constructor.apply(this, arguments);","}","","CandlestickSeries.NAME = \"candlestickSeries\";","","CandlestickSeries.ATTRS = {"," /**"," * Read-only attribute indicating the type of series."," *"," * @attribute type"," * @type String"," * @readOnly"," * @default candlestick"," */"," type: {"," value: \"candlestick\""," },",""," /**"," * The graphic in which drawings will be rendered."," *"," * @attribute graphic"," * @type Graphic"," */"," graphic: {"," lazyAdd: false,",""," setter: function(val) {"," //woraround for Attribute order of operations bug"," if(!this.get(\"rendered\")) {"," this.set(\"rendered\", true);"," }"," this.set(\"upcandle\", val.addShape({"," type: \"path\""," }));"," this.set(\"downcandle\", val.addShape({"," type: \"path\""," }));"," this.set(\"wick\", val.addShape({"," type: \"path\""," }));"," return val;"," }"," },",""," /**"," * Reference to the candlestick used when the close value is higher than the open value."," *"," * @attribute upcandle"," * @type Path"," */"," upcandle: {},",""," /**"," * Reference to the candlestick used when the open value is higher than the close value."," *"," * @attribute downcandle"," * @type Path"," */"," downcandle: {},",""," /**"," * Reference to the line drawn between the high and low values."," *"," * @attribute wick"," * @type Path"," */"," wick: {}",""," /**"," * Style properties used for drawing candles and wicks. This attribute is inherited from `RangeSeries`. Below are the default values:"," * <dl>"," * <dt>upcandle</dt><dd>Properties for a candle representing a period that closes higher than it opens."," * <dl>"," * <dt>fill</dt><dd>A hash containing the following values:"," * <dl>"," * <dt>color</dt><dd>Color of the fill. The default value is \"#00aa00\".</dd>"," * </dd>"," * <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker fill. The default value is 1.</dd>"," * </dl>"," * </dd>"," * <dt>border</dt><dd>A hash containing the following values:"," * <dl>"," * <dt>color</dt><dd>Color of the border. The default value is \"#000000\".</dd>"," * <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker border. The default value is 1.</dd>"," * <dt>weight</dt><dd>Number indicating the width of the border. The default value is 0.</dd>"," * </dl>"," * </dd>"," * </dl>"," * </dd>"," * <dt>downcandle</dt><dd>Properties for a candle representing a period that opens higher than it closes."," * <dl>"," * <dt>fill</dt><dd>A hash containing the following values:"," * <dl>"," * <dt>color</dt><dd>Color of the fill. The default value is \"#aa0000\".</dd>"," * </dd>"," * <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker fill. The default value is 1.</dd>"," * </dl>"," * </dd>"," * <dt>border</dt><dd>A hash containing the following values:"," * <dl>"," * <dt>color</dt><dd>Color of the border. The default value is \"#000000\".</dd>"," * <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker border. The default value is 1.</dd>"," * <dt>weight</dt><dd>Number indicating the width of the border. The default value is 0.</dd>"," * </dl>"," * </dd>"," * </dl>"," * </dd>"," * <dt>wick</dt><dd>Properties for the wick, which is a line drawn from the high point of the period to the low point of the period."," * <dl>"," * <dt>color</dt><dd>The color of the wick. The default value is \"#000000\".</dd>"," * <dt>weight</dt><dd>The weight of the wick. The default value is 1.</dd>"," * <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the wick. The default value is 1.</dd>"," * </dl>"," * </dd>"," * </dl>"," *"," * @attribute styles"," * @type Object"," */","};","","Y.extend(CandlestickSeries, Y.RangeSeries, {"," /**"," * Draws markers for an Candlestick series."," *"," * @method"," * @param {Array} xcoords The xcoordinates to be plotted."," * @param {Array} opencoords The coordinates representing the open values."," * @param {Array} highcoords The coordinates representing the high values."," * @param {Array} lowcoords The coordinates representing the low values."," * @param {Array} closecoords The coordinates representing the close values."," * @param {Number} len The number of x coordinates to plot."," * @param {Number} width The width of each candlestick marker."," * @param {Number} halfwidth Half the width of each candlestick marker."," * @param {Object} styles The styles for the series."," * @private"," */"," _drawMarkers: function(xcoords, opencoords, highcoords, lowcoords, closecoords, len, width, halfwidth, styles)"," {"," var upcandle = this.get(\"upcandle\"),"," downcandle = this.get(\"downcandle\"),"," wick = this.get(\"wick\"),"," cx,"," opencoord,"," highcoord,"," lowcoord,"," closecoord,"," left,"," right,"," top,"," bottom,"," leftPadding = styles.padding.left,"," up;"," upcandle.set(styles.upcandle);"," downcandle.set(styles.downcandle);"," wick.set(styles.wick);"," upcandle.clear();"," downcandle.clear();"," wick.clear();"," for(i = 0; i < len; i = i + 1)"," {"," cx = xcoords[i] + leftPadding;"," left = cx - halfwidth;"," right = cx + halfwidth;"," opencoord = opencoords[i];"," highcoord = highcoords[i];"," lowcoord = lowcoords[i];"," closecoord = closecoords[i];"," up = opencoord > closecoord;"," top = up ? closecoord : opencoord;"," bottom = up ? opencoord : closecoord;"," height = bottom - top;"," candle = up ? upcandle : downcandle;"," candle.drawRect(left, top, width, height);"," wick.moveTo(cx, highcoord);"," wick.lineTo(cx, lowcoord);"," }"," upcandle.end();"," downcandle.end();"," wick.end();"," wick.toBack();"," },",""," /**"," * Toggles visibility"," *"," * @method _toggleVisible"," * @param {Boolean} visible indicates visibilitye"," * @private"," */"," _toggleVisible: function(visible)"," {"," this.get(\"upcandle\").set(\"visible\", visible);"," this.get(\"downcandle\").set(\"visible\", visible);"," this.get(\"wick\").set(\"visible\", visible);"," },",""," /**"," * Destructor implementation for the CartesianSeries class. Calls destroy on all Graphic instances."," *"," * @method destructor"," * @protected"," */"," destructor: function()"," {"," var upcandle = this.get(\"upcandle\"),"," downcandle = this.get(\"downcandle\"),"," wick = this.get(\"wick\");"," if(upcandle)"," {"," upcandle.destroy();"," }"," if(downcandle)"," {"," downcandle.destroy();"," }"," if(wick)"," {"," wick.destroy();"," }"," },",""," /**"," * Gets the default value for the `styles` attribute. Overrides"," * base implementation."," *"," * @method _getDefaultStyles"," * @return Object"," * @private"," */"," _getDefaultStyles: function()"," {"," var styles = {"," upcandle: {"," fill: {"," color: \"#00aa00\","," alpha: 1"," },"," stroke: {"," color: \"#000000\","," alpha: 1,"," weight: 0"," }"," },"," downcandle: {"," fill: {"," color: \"#aa0000\","," alpha: 1"," },"," stroke: {"," color: \"#000000\","," alpha: 1,"," weight: 0"," }"," },"," wick: {"," stroke: {"," color: \"#000000\","," alpha: 1,"," weight: 1"," }"," }"," };"," return this._mergeStyles(styles, CandlestickSeries.superclass._getDefaultStyles());"," }","});","Y.CandlestickSeries = CandlestickSeries;","","","}, '3.13.0', {\"requires\": [\"series-range\"]});","","}());"]};