function(data){
			this.segments = [];
			//Declare segment class as a chart instance specific class, so it can share props for this instance
			this.SegmentArc = Chart.Arc.extend({
				showStroke : this.options.segmentShowStroke,
				strokeWidth : this.options.segmentStrokeWidth,
				strokeColor : this.options.segmentStrokeColor,
				ctx : this.chart.ctx,
				innerRadius : 0,
				x : this.chart.width/2,
				y : this.chart.height/2
			});
			this.scale = new Chart.RadialScale({
				display: this.options.showScale,
				fontStyle: this.options.scaleFontStyle,
				fontSize: this.options.scaleFontSize,
				fontFamily: this.options.scaleFontFamily,
				fontColor: this.options.scaleFontColor,
				showLabels: this.options.scaleShowLabels,
				showLabelBackdrop: this.options.scaleShowLabelBackdrop,
				backdropColor: this.options.scaleBackdropColor,
				backdropPaddingY : this.options.scaleBackdropPaddingY,
				backdropPaddingX: this.options.scaleBackdropPaddingX,
				lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,
				lineColor: this.options.scaleLineColor,
				lineArc: true,
				width: this.chart.width,
				height: this.chart.height,
				xCenter: this.chart.width/2,
				yCenter: this.chart.height/2,
				ctx : this.chart.ctx,
				templateString: this.options.scaleLabel,
				valuesCount: data.length
			});

			this.updateScaleRange(data);

			this.scale.update();

			helpers.each(data,function(segment,index){
				this.addData(segment,index,true);
			},this);

			//Set up tooltip events on the chart
			if (this.options.showTooltips){
				helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
					var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
					helpers.each(this.segments,function(segment){
						segment.restore(["fillColor"]);
					});
					helpers.each(activeSegments,function(activeSegment){
						activeSegment.fillColor = activeSegment.highlightColor;
					});
					this.showTooltip(activeSegments);
				});
			}

			this.render();
		}
function(data){
			this.segments = [];
			//Declare segment class as a chart instance specific class, so it can share props for this instance
			this.SegmentArc = Chart.Arc.extend({
				showStroke : this.options.segmentShowStroke,
				strokeWidth : this.options.segmentStrokeWidth,
				strokeColor : this.options.segmentStrokeColor,
				ctx : this.chart.ctx,
				innerRadius : 0,
				x : this.chart.width/2,
				y : this.chart.height/2
			});
			this.scale = new Chart.RadialScale({
				display: this.options.showScale,
				fontStyle: this.options.scaleFontStyle,
				fontSize: this.options.scaleFontSize,
				fontFamily: this.options.scaleFontFamily,
				fontColor: this.options.scaleFontColor,
				showLabels: this.options.scaleShowLabels,
				showLabelBackdrop: this.options.scaleShowLabelBackdrop,
				backdropColor: this.options.scaleBackdropColor,
				backdropPaddingY : this.options.scaleBackdropPaddingY,
				backdropPaddingX: this.options.scaleBackdropPaddingX,
				lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,
				lineColor: this.options.scaleLineColor,
				lineArc: true,
				width: this.chart.width,
				height: this.chart.height,
				xCenter: this.chart.width/2,
				yCenter: this.chart.height/2,
				ctx : this.chart.ctx,
				templateString: this.options.scaleLabel,
				valuesCount: data.length
			});

			this.updateScaleRange(data);

			this.scale.update();

			helpers.each(data,function(segment,index){
				this.addData(segment,index,true);
			},this);

			//Set up tooltip events on the chart
			if (this.options.showTooltips){
				helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
					var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
					helpers.each(this.segments,function(segment){
						segment.restore(["fillColor"]);
					});
					helpers.each(activeSegments,function(activeSegment){
						activeSegment.fillColor = activeSegment.highlightColor;
					});
					this.showTooltip(activeSegments);
				});
			}

			this.render();
		}
function ( data ) { this . segments = [ ] ; //Declare segment class as a chart instance specific class, so it can share props for this instance this . SegmentArc = Chart . Arc . extend ( { showStroke : this . options . segmentShowStroke , strokeWidth : this . options . segmentStrokeWidth , strokeColor : this . options . segmentStrokeColor , ctx : this . chart . ctx , innerRadius : 0 , x : this . chart . width / 2 , y : this . chart . height / 2 } ) ; this . scale = new Chart . RadialScale ( { display : this . options . showScale , fontStyle : this . options . scaleFontStyle , fontSize : this . options . scaleFontSize , fontFamily : this . options . scaleFontFamily , fontColor : this . options . scaleFontColor , showLabels : this . options . scaleShowLabels , showLabelBackdrop : this . options . scaleShowLabelBackdrop , backdropColor : this . options . scaleBackdropColor , backdropPaddingY : this . options . scaleBackdropPaddingY , backdropPaddingX : this . options . scaleBackdropPaddingX , lineWidth : ( this . options . scaleShowLine ) ? this . options . scaleLineWidth : 0 , lineColor : this . options . scaleLineColor , lineArc : true , width : this . chart . width , height : this . chart . height , xCenter : this . chart . width / 2 , yCenter : this . chart . height / 2 , ctx : this . chart . ctx , templateString : this . options . scaleLabel , valuesCount : data . length } ) ; this . updateScaleRange ( data ) ; this . scale . update ( ) ; helpers . each ( data , function ( segment , index ) { this . addData ( segment , index , true ) ; } , this ) ; //Set up tooltip events on the chart if ( this . options . showTooltips ) { helpers . bindEvents ( this , this . options . tooltipEvents , function ( evt ) { var activeSegments = ( evt . type !== 'mouseout' ) ? this . getSegmentsAtEvent ( evt ) : [ ] ; helpers . each ( this . segments , function ( segment ) { segment . restore ( [ "fillColor" ] ) ; } ) ; helpers . each ( activeSegments , function ( activeSegment ) { activeSegment . fillColor = activeSegment . highlightColor ; } ) ; this . showTooltip ( activeSegments ) ; } ) ; } this . render ( ) ; }
Initialize is fired when the chart is initialized - Data is passed in as a parameter Config is automatically merged by the core of Chart.js, and is available at this.options
Initialize is fired when the chart is initialized - Data is passed in as a parameter Config is automatically merged by the core of Chart . js and is available at this . options
Initialize the chart instance