Fills.js revision e393eced613f9b4a5fb6bdd461d0e0bf5064d5ec
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTrippfunction Fills(cfg)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp{
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp var attrs = {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp area: {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp getter: function()
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp return this._defaults || this._getAreaDefaults();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp },
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp setter: function(val)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp var defaults = this._defaults || this._getAreaDefaults();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp this._defaults = Y.merge(defaults, val);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp };
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp this.addAttrs(attrs, cfg);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp this.get("styles");
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp}
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTrippFills.prototype = {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp /**
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp * @private
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp */
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp drawFill: function(xcoords, ycoords)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(xcoords.length < 1)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp return;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp var len = xcoords.length,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstX = xcoords[0],
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstY = ycoords[0],
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp lastValidX = firstX,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp lastValidY = firstY,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp nextX,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp nextY,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp i = 1,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp styles = this.get("styles").area,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic = this.get("graphic"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp color = styles.color || this._getDefaultColor(this.get("graphOrder"), "slice");
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.clear();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.beginFill(color, styles.alpha);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.moveTo(firstX, firstY);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp for(; i < len; i = ++i)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp nextX = xcoords[i];
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp nextY = ycoords[i];
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(isNaN(nextY))
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp lastValidX = nextX;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp lastValidY = nextY;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp continue;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(nextX, nextY);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp lastValidX = nextX;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp lastValidY = nextY;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.end();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp },
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp /**
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp * @private
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp */
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp drawAreaSpline: function()
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(this.get("xcoords").length < 1)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp return;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp var xcoords = this.get("xcoords"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp ycoords = this.get("ycoords"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp curvecoords = this.getCurveControlPoints(xcoords, ycoords),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp len = curvecoords.length,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx1,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx2,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy1,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy2,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp x,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp y,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp i = 0,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstX = xcoords[0],
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstY = ycoords[0],
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp styles = this.get("styles").area,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic = this.get("graphic"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp color = styles.color || this._getDefaultColor(this.get("graphOrder"), "slice");
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.beginFill(color, styles.alpha);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.moveTo(firstX, firstY);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp for(; i < len; i = ++i)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp x = curvecoords[i].endx;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp y = curvecoords[i].endy;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx1 = curvecoords[i].ctrlx1;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx2 = curvecoords[i].ctrlx2;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy1 = curvecoords[i].ctrly1;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy2 = curvecoords[i].ctrly2;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.curveTo(cx1, cy1, cx2, cy2, x, y);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(this.get("direction") === "vertical")
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(this._leftOrigin, y);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(this._leftOrigin, firstY);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp else
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(x, this._bottomOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(firstX, this._bottomOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(firstX, firstY);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.end();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp },
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp /**
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp * @private
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp */
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp drawStackedAreaSpline: function()
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(this.get("xcoords").length < 1)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp return;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp var xcoords = this.get("xcoords"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp ycoords = this.get("ycoords"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp curvecoords,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp order = this.get("order"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp type = this.get("type"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graph = this.get("graph"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp seriesCollection = graph.seriesTypes[type],
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp prevXCoords,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp prevYCoords,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp len,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx1,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx2,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy1,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy2,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp x,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp y,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp i = 0,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstX,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstY,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp styles = this.get("styles").area,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic = this.get("graphic"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp color = styles.color || this._getDefaultColor(this.get("graphOrder"), "slice");
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstX = xcoords[0];
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstY = ycoords[0];
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp curvecoords = this.getCurveControlPoints(xcoords, ycoords);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp len = curvecoords.length;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.beginFill(color, styles.alpha);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.moveTo(firstX, firstY);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp for(; i < len; i = ++i)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp x = curvecoords[i].endx;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp y = curvecoords[i].endy;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx1 = curvecoords[i].ctrlx1;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx2 = curvecoords[i].ctrlx2;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy1 = curvecoords[i].ctrly1;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy2 = curvecoords[i].ctrly2;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.curveTo(cx1, cy1, cx2, cy2, x, y);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(order > 0)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp prevXCoords = seriesCollection[order - 1].get("xcoords").concat().reverse();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp prevYCoords = seriesCollection[order - 1].get("ycoords").concat().reverse();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp curvecoords = this.getCurveControlPoints(prevXCoords, prevYCoords);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp i = 0;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp len = curvecoords.length;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(prevXCoords[0], prevYCoords[0]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp for(; i < len; i = ++i)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp x = curvecoords[i].endx;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp y = curvecoords[i].endy;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx1 = curvecoords[i].ctrlx1;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cx2 = curvecoords[i].ctrlx2;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy1 = curvecoords[i].ctrly1;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp cy2 = curvecoords[i].ctrly2;
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.curveTo(cx1, cy1, cx2, cy2, x, y);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp else
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(this.get("direction") === "vertical")
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(this._leftOrigin, ycoords[ycoords.length-1]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(this._leftOrigin, firstY);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp else
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(xcoords[xcoords.length-1], this._bottomOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(firstX, this._bottomOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.lineTo(firstX, firstY);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graphic.end();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp },
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp /**
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp * @private
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp */
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp _defaults: null,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp _getClosingPoints: function()
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp var xcoords = this.get("xcoords").concat(),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp ycoords = this.get("ycoords").concat();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(this.get("direction") === "vertical")
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp xcoords.push(this._leftOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp xcoords.push(this._leftOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp ycoords.push(ycoords[ycoords.length - 1]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp ycoords.push(ycoords[0]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp else
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp xcoords.push(xcoords[xcoords.length - 1]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp xcoords.push(xcoords[0]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp ycoords.push(this._bottomOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp ycoords.push(this._bottomOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp xcoords.push(xcoords[0]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp ycoords.push(ycoords[0]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp return [xcoords, ycoords];
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp },
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp /**
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp * @private
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp * Concatenates coordinate array with the correct coordinates for closing an area stack.
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp */
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp _getStackedClosingPoints: function()
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp var order = this.get("order"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp type = this.get("type"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp graph = this.get("graph"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp direction = this.get("direction"),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp seriesCollection = graph.seriesTypes[type],
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp prevXCoords,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp prevYCoords,
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allXCoords = this.get("xcoords").concat(),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allYCoords = this.get("ycoords").concat(),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstX = allXCoords[0],
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp firstY = allYCoords[0];
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(order > 0)
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp prevXCoords = seriesCollection[order - 1].get("xcoords").concat();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp prevYCoords = seriesCollection[order - 1].get("ycoords").concat();
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allXCoords = allXCoords.concat(prevXCoords.concat().reverse());
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allYCoords = allYCoords.concat(prevYCoords.concat().reverse());
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allXCoords.push(allXCoords[0]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allYCoords.push(allYCoords[0]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp else
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp if(direction === "vertical")
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allXCoords.push(this._leftOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allXCoords.push(this._leftOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allYCoords.push(allYCoords[allYCoords.length-1]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allYCoords.push(firstY);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp else
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allXCoords.push(allXCoords[allXCoords.length-1]);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allXCoords.push(firstX);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allYCoords.push(this._bottomOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp allYCoords.push(this._bottomOrigin);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp return [allXCoords, allYCoords];
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp },
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp _getAreaDefaults: function()
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp return {
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp };
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp }
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp};
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTrippY.augment(Fills, Y.Attribute);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTrippY.Fills = Fills;