f69d245bb21be88752420e834a6b6be37e9b525fTripp * Utility class used for drawing area fills.
a75ebc38c1de401b679953a9b87bd323f0f48d02Tripp * @module charts
f69d245bb21be88752420e834a6b6be37e9b525fTripp * @class Fills
f69d245bb21be88752420e834a6b6be37e9b525fTripp * @constructor
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp getter: function()
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp var defaults = this._defaults || this._getAreaDefaults();
cc21b565833307c2b0b06deb4e3ab22c2a94be3eTripp * Returns a path shape used for drawing fills.
cc21b565833307c2b0b06deb4e3ab22c2a94be3eTripp * @method _getPath
cc21b565833307c2b0b06deb4e3ab22c2a94be3eTripp * @return Path
a12380a54ea6e3ec3f16a090eee8ec5bf93aed83Tripp path = this.get("graph").get("graphic").addShape({type:"path"});
cc21b565833307c2b0b06deb4e3ab22c2a94be3eTripp * Toggles visibility
cc21b565833307c2b0b06deb4e3ab22c2a94be3eTripp * @method _toggleVisible
cc21b565833307c2b0b06deb4e3ab22c2a94be3eTripp * @param {Boolean} visible indicates visibilitye
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * Draws fill
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @method drawFill
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @param {Array} xcoords The x-coordinates for the series.
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @param {Array} ycoords The y-coordinates for the series.
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @protected
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp color = styles.color || this._getDefaultColor(this.get("graphOrder"), "slice");
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp for(; i < len; i = ++i)
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * Draws a fill for a spline
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @method drawAreaSpline
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @protected
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp curvecoords = this.getCurveControlPoints(xcoords, ycoords),
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp color = styles.color || this._getDefaultColor(this.get("graphOrder"), "slice");
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp for(; i < len; i = ++i)
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * Draws a a stacked area spline
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @method drawStackedAreaSpline
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @protected
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp color = styles.color || this._getDefaultColor(this.get("graphOrder"), "slice");
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp curvecoords = this.getCurveControlPoints(xcoords, ycoords);
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp for(; i < len; i = ++i)
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 for(; i < len; i = ++i)
cc21b565833307c2b0b06deb4e3ab22c2a94be3eTripp path.lineTo(this._leftOrigin, ycoords[ycoords.length-1]);
cc21b565833307c2b0b06deb4e3ab22c2a94be3eTripp path.lineTo(xcoords[xcoords.length-1], this._bottomOrigin);
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * Storage for default area styles.
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @property _defaults
4288e1894e685f74123435d45db06e5cef146e7fTripp * @type Object
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * Concatenates coordinate array with correct coordinates for closing an area fill.
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @method _getClosingPoints
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @return Array
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @protected
e393eced613f9b4a5fb6bdd461d0e0bf5064d5ecTripp * Concatenates coordinate array with the correct coordinates for closing an area stack.
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @method _getStackedClosingPoints
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @return Array
422668e1d4513bb870b8b576fd9d828c8872f074Tripp * @protected
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());
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * Returns default values for area styles.
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @method _getAreaDefaults
8209f3939e32e0e5bde64192267fdaf9db6f4fbcTripp * @return Object