Use getColor(d, i) when generating a color for a box plot.