piechart/Pie.js
function (map) {
            this._parts = [];
            var startAngle = 0;
            var stopAngle = 0;

            this.addTo(map);

            for (var i = 0; i < this.count(); i++) {
                var normalized = this._normalize(this._data[i].num);

                stopAngle = normalized * 360 + startAngle;

                // set start/stop Angle and color for semicircle
                var options = L.extend({
                    startAngle: startAngle,
                    stopAngle: stopAngle,

                    radius: this.options.radius,
                    fillColor: this._color(i),
                    color: this._color(i)
                }, this.options.sliceOptions);

                this._data[i].slice = L.semiCircle(
                    this._latlng,
                    L.Util.extend({}, options, this.options.pathOptions)
                ).addTo(this);

                if (this.options.labels) {
                    this._createLabel(normalized, this._data[i].label, this._data[i].slice);
                }
                startAngle = stopAngle;
            }
            return this;
        }
function (map) {
            this._parts = [];
            var startAngle = 0;
            var stopAngle = 0;

            this.addTo(map);

            for (var i = 0; i < this.count(); i++) {
                var normalized = this._normalize(this._data[i].num);

                stopAngle = normalized * 360 + startAngle;

                // set start/stop Angle and color for semicircle
                var options = L.extend({
                    startAngle: startAngle,
                    stopAngle: stopAngle,

                    radius: this.options.radius,
                    fillColor: this._color(i),
                    color: this._color(i)
                }, this.options.sliceOptions);

                this._data[i].slice = L.semiCircle(
                    this._latlng,
                    L.Util.extend({}, options, this.options.pathOptions)
                ).addTo(this);

                if (this.options.labels) {
                    this._createLabel(normalized, this._data[i].label, this._data[i].slice);
                }
                startAngle = stopAngle;
            }
            return this;
        }
function ( map ) { this . _parts = [ ] ; var startAngle = 0 ; var stopAngle = 0 ; this . addTo ( map ) ; for ( var i = 0 ; i < this . count ( ) ; i ++ ) { var normalized = this . _normalize ( this . _data [ i ] . num ) ; stopAngle = normalized * 360 + startAngle ; // set start/stop Angle and color for semicircle var options = L . extend ( { startAngle : startAngle , stopAngle : stopAngle , radius : this . options . radius , fillColor : this . _color ( i ) , color : this . _color ( i ) } , this . options . sliceOptions ) ; this . _data [ i ] . slice = L . semiCircle ( this . _latlng , L . Util . extend ( { } , options , this . options . pathOptions ) ) . addTo ( this ) ; if ( this . options . labels ) { this . _createLabel ( normalized , this . _data [ i ] . label , this . _data [ i ] . slice ) ; } startAngle = stopAngle ; } return this ; }
layer implementation.
layer implementation .