From ac5bf729c5de4756194c94b9341d94a015be0bbb Mon Sep 17 00:00:00 2001 From: Internalfx Date: Tue, 18 Aug 2015 18:39:11 -0700 Subject: [PATCH] Closes #1309 Doughnut.addData() broken for index of 0 #1309 --- src/Chart.Doughnut.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Chart.Doughnut.js b/src/Chart.Doughnut.js index 12e9f2255..e63bf9e50 100644 --- a/src/Chart.Doughnut.js +++ b/src/Chart.Doughnut.js @@ -91,7 +91,7 @@ return segmentsArray; }, addData : function(segment, atIndex, silent){ - var index = atIndex || this.segments.length; + var index = atIndex !== undefined ? atIndex : this.segments.length; this.segments.splice(index, 0, new this.SegmentArc({ value : segment.value, outerRadius : (this.options.animateScale) ? 0 : this.outerRadius, -- 2.47.2