TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
-
Chen
- Newbie
![Newbie Newbie](./images/ranks/1star.gif)
- Posts: 43
- Joined: Tue Mar 11, 2008 12:00 am
-
Contact:
Post
by Chen » Wed Mar 25, 2009 11:22 pm
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,
-
Narcís
- Site Admin
![Site Admin Site Admin](./images/ranks/6stars.gif)
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Thu Mar 26, 2009 11:13 am
Hi Chen,
In that case you can use Exchange method:
Code: Select all
teeChart.getSeries().exchange(0, 1);
-
Chen
- Newbie
![Newbie Newbie](./images/ranks/1star.gif)
- Posts: 43
- Joined: Tue Mar 11, 2008 12:00 am
-
Contact:
Post
by Chen » Thu Mar 26, 2009 3:10 pm
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?
-
Narcís
- Site Admin
![Site Admin Site Admin](./images/ranks/6stars.gif)
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Fri Mar 27, 2009 3:08 pm
Hi Chen,
I'm afraid this is a bug (TJ71014033) which I have added to the bug list to be fixed for future releases.