ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How do I make this chart?
Posted by Ji-hyeon Choi on Feb-01-2024 12:24
Attachments:

I want to draw the chart image in the picture using your library. Which part can I draw?

Is it right to add a Spline Line layer to the area chart?
캡처.PNG

  Re: How do I make this chart?
Posted by Peter Kwan on Feb-01-2024 22:44
Attachments:
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
spline_fill.png