Is it possible to create a d3.js radial chart with different colors for each axis label? I’ve tried doing it with the code below, but with no success:
.style(function() {
for (var i = 0; i < unhealthyArray.length; i++) {
if ($.inArray(unhealthyArray[i], capitalMeta) != -1) {
return "fill","red";
}
else {
console.log("black ",capitalMeta);
return "fill","black";
}
}
});
Remember that
.styleis called for each element, i.e. there is no need for you to put a loop in there. I think what you want is similar to