Animation example on Android

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
crni
Newbie
Newbie
Posts: 10
Joined: Fri Nov 09, 2012 12:00 am

Animation example on Android

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
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Animation example on Android

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

crni
Newbie
Newbie
Posts: 10
Joined: Fri Nov 09, 2012 12:00 am

Re: Animation example on Android

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
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Animation example on Android

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply