|
How can I draw a symmetric stacked-area chart? |
Posted by Jettaime on Feb-07-2012 14:35 |
|
Hi.
I'm using the ChartDirector version 5.0.2 in Visual C++ 2010 on Windows 7 and XP.
When I tried to draw a symmetric stacked-area chart, the lower(-) position's layer did not stacked but just overlapped.
Each position, lower(-) and upper(+), means inbound and outbound respectively and shares the same datasetname. But when I add upper and lower but same dataset, the legend box displays two entries for every one dataset, for upper and lower. How can I display just one item in this legend box?
Thank you. |
Re: How can I draw a symmetric stacked-area chart? |
Posted by Peter Kwan on Feb-08-2012 03:57 |
|
Hi Jettaime,
By "symmetric stacked-area chart", do you mean an area chart with some positive data sets that stacked on the positive side, and some negative data sets that stacked on the negative side? To create such a chart, the best way is to use two stacked area layers, one for the positive data sets, and one for the negative data sets.
You may use Layer.setLegendOrder to disable the legends for the negative layer to avoid duplication:
layer->setLegendOrder(Chart::NoLegend);
Hope this can help.
Regards
Peter Kwan |
Re: How can I draw a symmetric stacked-area chart? |
Posted by Jettaime on Feb-08-2012 13:03 |
|
Thank you for your help.
I have successfully drawn the symmetric stacked area chart using your comment.
But, can I ask you one more thing?
I'd like to remove the (-) sign from the y-axis's label of negative side, but I could not found out the solution from the manual or support page.
How could I?
Thank you. |
Re: How can I draw a symmetric stacked-area chart? |
Posted by Peter Kwan on Feb-08-2012 18:27 |
|
Hi Jettaime,
You can use Axis.setLabelFormat to configure a label format such that the negative sign character is empty.
For example:
//No thousand separator. Using "." as decimal separator. No sign character.
c->yAxis()->setLabelFormat("{value|~.~}");
Hope this can help.
Regards
Peter Kwan |
|