我找到了解决上述问题的方法。现在我可以在涉及 ListSeries 的条形图条中设置我选择的颜色。
PlotOptionsColumn就是答案。
//Hard Coded Values
String months[] = { "DataSet 1", "DataSet 2", "DataSet 3", "DataSet 4", "DataSet 5"};
int dataArray[][] = {
{ 8, 13, 7, 4 },
{ 23, 1, 30, 7 },
{ 37, 3, 22, 2 },
{ 13, 23, 4, 3 },
{ 3, 10, 9, 5 },
};
int counter = 0;
// Data series for each numeric column in the table
for (int month = 0; month < 4; month++) {
ListSeries series = new ListSeries();
PlotOptionsColumn options = new PlotOptionsColumn();
options.setColor(colors[counter++]);
series.setPlotOptions(options);
series.setName(months[month]);
// The rows of the table
for (int data = 0; data < dataArray.length; data++) {
series.addData(dataArray[data][month]);
}
conf.addSeries(series);
}