Hi Mooseon,
For filling the region under the bell curve, you may use an InterLineLayer together with a x-zone color. For example:
// The color is light blue (0x99ccff) between x=100 and x=110, and transparent outside the range
int color = c->xZoneColor(100, Chart::Transparent, c->xZoneColor(110, 0x99ccff, Chart::Transparent));
// Use the color to fill the region between the spline layer (for the bell curve) and the x-axis (y=0 line)
c->addInterLineLayer(mySplineLayer->getLine(), c->yAxis()->addMark(0, Chart::Transparent)->getLine(), color);
For the x-axis labels, there are many ways to put labels on x-axis. The addMark method below is the most flexible method:
// Add a mark at 115 with the label "Good". Set the mark line to transparent and the text to black (0x000000)
c->xAxis()->addMark(115, -1, "Good", "arialbd.ttf", 10)->setMarkColor(Chart::Transparent, 0x000000, Chart::Transparent);
Regards
Peter Kwan |