Hi Tony,
May be you can try to use multiple bar layers, with each bar layer handling one color. For
example:
// 3 data sets for the 3 bars in a group
double dataSet0[9];
double dataSet1[9];
double dataSet2[9];
for (int i = 0; i < 9; ++i)
{
// Prepare the data for the 3 bars at position i
for (int j = 0; j < 9; ++i)
dataSet0[j] = dataSet1[j] = dataSet2[j] = Chart::NoValue;
dataSet0[i] = ... data_value_for_bar0_at_position_i ...;
dataSet1[i] = ... data_value_for_bar1_at_position_i ...;
dataSet2[i] = ... data_value_for_bar1_at_position_i ...;
// Add the 3 bars as a bar layer with color[i]
BarLayer *layer = c->addBarLayer(Chart::Side);
layer->addDataSet(DoubleArray(dataSet0, 9), color[i]);
layer->addDataSet(DoubleArray(dataSet1, 9), color[i]);
layer->addDataSet(DoubleArray(dataSet2, 9), color[i]);
}
Hope this can help.
Regards
PeteR Kwan |