TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
-
crni
- Newbie
- Posts: 10
- Joined: Fri Nov 09, 2012 12:00 am
Post
by crni » Tue Nov 13, 2012 12:27 pm
Hello,
I am trying to get animation working on my Android charts. I just need a simple grow animation on bar charts, but I cant find any example or tutorial on that.
This is what I came up with, but it doesnt do anything:
Code: Select all
SeriesAnimation seriesAnimation = new SeriesAnimation();
seriesAnimation.setActive(true);
seriesAnimation.setStartAtMin(false);
seriesAnimation.setSteps(500);
seriesAnimation.setStartValue(0);
seriesAnimation.setSeries(chart.getSeries(0));
chart.getTools().add(seriesAnimation);
try {
seriesAnimation.execute();
} catch (Exception e) {
e.printStackTrace();
}
-
Yeray
- Site Admin
- Posts: 9613
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Wed Nov 14, 2012 8:34 am
Hi,
Right, this tool works in Swing but in SWT nor in Android.
I've added it to the wish list to be implemented in future releases (TJ71016413).
Thanks for reporting it.
-
crni
- Newbie
- Posts: 10
- Joined: Fri Nov 09, 2012 12:00 am
Post
by crni » Thu Nov 15, 2012 2:45 pm
I see.
How about panning - can I get some demo code on that? I tried this, but doesnt help:
Scroll scroll = new Scroll(chart.getChart());
scroll.setAllow(ScrollMode.BOTH);
chart.setPanning(scroll);
-
Yeray
- Site Admin
- Posts: 9613
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Nov 15, 2012 3:25 pm
Hi
crni wrote:How about panning - can I get some demo code on that? I tried this, but doesnt help:
Yes, you can use the PanData tool as the features demo does:
Code: Select all
PanData panDataTool1 = new PanData(tChart1.getChart());
Note you have to copy the PanData.java file from the demo to your project's folder to use it.