Hi Ji-hyeon Choi,
For the bars, you can use a BarLayer (XYChart.addBarLayer).
For the spline curve, you can use the SplineLayer (XYChart.addSplineLayer).
You can fill the region between the spline curve and the x-axis with an InterLineLayer. The following an example of filling between two lines/splines:
https://www.advsofteng.com/doc/cdcpp.htm#linefill.htm
For your case, you can fill between the spline curve and the y=0 mark line. It is like:
SplineLayer layer* = c->addSplineLayer(....);
Mark *zeroLine = c->yAxis()->addMark(0, Chart::Transparent);
c->addInterLineLayer(layer->getLine(), zeroLine->getLine(), 0x7fcccc00);
Best Regards
Peter Kwan
|