Page 1 of 1

setDepth(), setZOrder() method

Posted: Wed Mar 25, 2009 11:22 pm
by 7667591
Basically, I want to set ZOrder/depth of series in a non-3D chart to deal with overlapping cases. I tried a very simple code which is similar to the example of DepthDemo.java in TeeChart.Features.jar as following.

Code: Select all

com.steema.teechart.styles.Line series1 = new Line(teeChart.getChart());
	     series1.fillSampleValues(10);
com.steema.teechart.styles.Bar series2 = new Bar(teeChart.getChart());
	     series2.fillSampleValues(6);
com.steema.teechart.styles.Line series3 = new Line(teeChart.getChart());
	     series3.fillSampleValues(10);
series1.setDepth(0);
series2.setDepth(2);
series3.setDepth(1);
However, no matter what order I tried in setDepth("order") method, it plots as the original order of being added to the chart (series1, series2, series3 in this case), never changed by setDepth() method. And same case for setZOrder(). Did I miss something here?

Thanks,

Posted: Thu Mar 26, 2009 11:13 am
by narcis
Hi Chen,

In that case you can use Exchange method:

Code: Select all

        teeChart.getSeries().exchange(0, 1);

Posted: Thu Mar 26, 2009 3:10 pm
by 7667591
Hi Narcis, thanks for your reply. I know exchange will do for two series. But my purpose is to set the order for multi-series(say 10), not just swap two series. I thought setDepth() or setZOrder() API should do this. Do you know why they dont work?

Posted: Fri Mar 27, 2009 3:08 pm
by narcis
Hi Chen,

I'm afraid this is a bug (TJ71014033) which I have added to the bug list to be fixed for future releases.