get undoZoom-event

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Juergen
Newbie
Newbie
Posts: 6
Joined: Fri Feb 06, 2009 12:00 am

get undoZoom-event

Post by Juergen » Fri Sep 03, 2010 7:14 am

Hi,
is it possible to cath an undoZoom-event, maybe as adding a listener? Or must i switch off TChart-zoom and create my own zomm by Mouseevents of the Window?
Baground of my Question is if user use undoZoom via mouse the view shoud show 110% instead of 100%.

juergen

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: get undoZoom-event

Post by Yeray » Mon Sep 06, 2010 10:29 am

Hi juergen,

Yes, the following code seems to work fine for me here:

Code: Select all

        tChart1.addChartMotionListener(new ChartMotionListener() {
            
            @Override
            public void scrolled(ChartEvent e) {
                tChart1.getHeader().setText("Scrooled");
            }

            @Override
            public void zoomed(ChartEvent e) {
                tChart1.getHeader().setText("Zoomed");
            }

            @Override
            public void unzoomed(ChartEvent e) {
                tChart1.getHeader().setText("UnZoomed");
            }
        });
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

Juergen
Newbie
Newbie
Posts: 6
Joined: Fri Feb 06, 2009 12:00 am

Re: get undoZoom-event

Post by Juergen » Mon Sep 06, 2010 11:00 am

That's it.

Thanks

Myti
Newbie
Newbie
Posts: 10
Joined: Mon Jul 08, 2013 12:00 am

Re: get undoZoom-event

Post by Myti » Wed Sep 25, 2013 10:17 am

Hello Yeray,

We are trying to get unzoom event as your example by adding a ChartMotionListener.
But the listener was never triggered.

Do you have an any idea?

We are using TeeChart SWT version 0722fg.

Thanks!
Ishan.

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: get undoZoom-event

Post by Yeray » Wed Sep 25, 2013 3:39 pm

Hi,

You are right. It was broken. I've just corrected for the next maintenance release.
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