Is there a way to highlight one or more data points with a different colour. Imagine a bar graph that is all black with 5 bars where 2 of the bars are a different colour?
I've tried passing an array to the data: { color: array } but it seems as though it can only take one colour.
Alternatively, if there's not way to colour specific data points, then perhaps there's a way to use two data groups but make them not dodge each other (then use 0 points for all except those that you want to colour).
In that case, you can use data.color function to change the color of specific data points.
data: {
color: function(color, d) {
// will make 3rd and 4th data as red color
if (d.index && d.index == 2 || d.index == 3) {
color = "red";
}
return color;
}
}

Check out the online working demo:
Excellent. Feel free to close.
Most helpful comment
In that case, you can use
data.colorfunction to change the color of specific data points.Check out the online working demo: