public/libraries.js
function (segment) {

            var segmentPath = Series.prototype.getSegmentPath.call(this, segment), // call base method
              areaSegmentPath = [].concat(segmentPath), // work on a copy for the area path
              i,
              options = this.options,
              segLength = segmentPath.length,
              translatedThreshold = this.yAxis.getThreshold(options.threshold), // #2181
              yBottom;

            if (segLength === 3) { // for animation from 1 to two points
                areaSegmentPath.push(L, segmentPath[1], segmentPath[2]);
            }
            if (options.stacking && !this.closedStacks) {

                // Follow stack back. Todo: implement areaspline. A general solution could be to
                // reverse the entire graphPath of the previous series, though may be hard with
                // splines and with series with different extremes
                for (i = segment.length - 1; i >= 0; i--) {

                    yBottom = pick(segment[i].yBottom, translatedThreshold);

                    // step line?
                    if (i < segment.length - 1 && options.step) {
                        areaSegmentPath.push(segment[i + 1].plotX, yBottom);
                    }

                    areaSegmentPath.push(segment[i].plotX, yBottom);
                }

            } else { // follow zero line back
                this.closeSegment(areaSegmentPath, segment, translatedThreshold);
            }
            this.areaPath = this.areaPath.concat(areaSegmentPath);
            return segmentPath;
        }
function (segment) {

            var segmentPath = Series.prototype.getSegmentPath.call(this, segment), // call base method
              areaSegmentPath = [].concat(segmentPath), // work on a copy for the area path
              i,
              options = this.options,
              segLength = segmentPath.length,
              translatedThreshold = this.yAxis.getThreshold(options.threshold), // #2181
              yBottom;

            if (segLength === 3) { // for animation from 1 to two points
                areaSegmentPath.push(L, segmentPath[1], segmentPath[2]);
            }
            if (options.stacking && !this.closedStacks) {

                // Follow stack back. Todo: implement areaspline. A general solution could be to
                // reverse the entire graphPath of the previous series, though may be hard with
                // splines and with series with different extremes
                for (i = segment.length - 1; i >= 0; i--) {

                    yBottom = pick(segment[i].yBottom, translatedThreshold);

                    // step line?
                    if (i < segment.length - 1 && options.step) {
                        areaSegmentPath.push(segment[i + 1].plotX, yBottom);
                    }

                    areaSegmentPath.push(segment[i].plotX, yBottom);
                }

            } else { // follow zero line back
                this.closeSegment(areaSegmentPath, segment, translatedThreshold);
            }
            this.areaPath = this.areaPath.concat(areaSegmentPath);
            return segmentPath;
        }
function ( segment ) { var segmentPath = Series . prototype . getSegmentPath . call ( this , segment ) , // call base method areaSegmentPath = [ ] . concat ( segmentPath ) , // work on a copy for the area path i , options = this . options , segLength = segmentPath . length , translatedThreshold = this . yAxis . getThreshold ( options . threshold ) , // #2181 yBottom ; if ( segLength === 3 ) { // for animation from 1 to two points areaSegmentPath . push ( L , segmentPath [ 1 ] , segmentPath [ 2 ] ) ; } if ( options . stacking && ! this . closedStacks ) { // Follow stack back. Todo: implement areaspline. A general solution could be to // reverse the entire graphPath of the previous series, though may be hard with // splines and with series with different extremes for ( i = segment . length - 1 ; i >= 0 ; i -- ) { yBottom = pick ( segment [ i ] . yBottom , translatedThreshold ) ; // step line? if ( i < segment . length - 1 && options . step ) { areaSegmentPath . push ( segment [ i + 1 ] . plotX , yBottom ) ; } areaSegmentPath . push ( segment [ i ] . plotX , yBottom ) ; } } else { // follow zero line back this . closeSegment ( areaSegmentPath , segment , translatedThreshold ) ; } this . areaPath = this . areaPath . concat ( areaSegmentPath ) ; return segmentPath ; }
Extend the base Series getSegmentPath method by adding the path for the area.
This path is pushed to the series.areaPath property.
Extend the base Series getSegmentPath method by adding the path for the area . This path is pushed to the series . areaPath property .