Reputation: 137
How to change Pie slice color dynamically. I want to change the color of the each slice which is there in the hidden variable assignedvalueZoom. Can some one help?
Upvotes: 1
Views: 3308
Reputation: 19103
You can define the color for each point in your data array like this:
for(j=0;j<name.length;j++) {
var temp = {
x:name[j],
y:value[j],
color:color[j]
};
dataArrayFinal[j] = temp;
}
This expicitly sets the x, y and color attributes of each data point.
Upvotes: 3