We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a868a2f commit e949edaCopy full SHA for e949eda
src/Chart.Doughnut.js
@@ -92,6 +92,10 @@
92
},
93
addData : function(segment, atIndex, silent){
94
var index = atIndex !== undefined ? atIndex : this.segments.length;
95
+ if ( typeof(segment.color) === "undefined" ) {
96
+ segment.color = Chart.defaults.global.segmentColorDefault[index];
97
+ segment.highlight = Chart.defaults.global.segmentHighlightColorDefaults[index];
98
+ }
99
this.segments.splice(index, 0, new this.SegmentArc({
100
value : segment.value,
101
outerRadius : (this.options.animateScale) ? 0 : this.outerRadius,
0 commit comments