I would like to pose an implementation problem that I have and request possible solutions?
Firstly, if I add 3 bar series defined as mbStacked and then add five items each like this:
Code: Select all
// Add a Green Series
GreenSeries = new THorizBarSeries(MyChart);
GreenSeries->MultiBar = mbStacked;
GreenSeries->ColorEachPoint = true;
MyChat->AddSeries(GreenSeries);
// Add a Yellow Series
YellowSeries = new THorizBarSeries(MyChart);
YellowSeries->MultiBar = mbStacked;
YellowSeries->ColorEachPoint = true;
MyChat->AddSeries(YellowSeries);
// Add a Red Series
RedSeries = new THorizBarSeries(MyChart);
RedSeries->MultiBar = mbStacked;
RedSeries->ColorEachPoint = true;
MyChat->AddSeries(RedSeries);
// 1 - Now we add our first item to each series
GreenSeries->Add(5,"Group1", clGreen);
YellowSeries->Add(10,"Group1", clYellow);
RedSeries->Add(15,"Group1", clRed);
// 2 - Now we add our second item to each series
GreenSeries->Add(10,"Group2", clGreen);
YellowSeries->Add(15,"Group2", clYellow);
RedSeries->Add(20,"Group2", clRed);
// 3 - Now we add our third item to each series
GreenSeries->Add(15,"Group3", clGreen);
YellowSeries->Add(20,"Group3", clYellow);
RedSeries->Add(25,"Group3", clRed);
// 4 - Now we add our third item to each series
ptrToGSeries->Add(20,"Group4", clGreen);
ptrToYSeries->Add(25,"Group4", clYellow);
ptrToRSeries->Add(30,"Group4", clRed);
// 5 - Now we add our third item to each series
ptrToGSeries->Add(25,"Group5", clGreen);
ptrToYSeries->Add(30,"Group5", clYellow);
ptrToRSeries->Add(35,"Group5", clRed);
The problem:
I need to have "Group1" and "Group2" together/grouped, with a new label, say "Set1". I then need "Group3","Group4" and "Group5" together/grouped, with a new label, say "Set2".
Any ideas?
Regards John.