On Zoom, providing more detailed data and stuff

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
medloh
Posts: 16
Joined: Tue May 07, 2013 11:26 pm
antibot: No, of course not.

On Zoom, providing more detailed data and stuff

Post by medloh » Tue May 07, 2013 11:40 pm

Hello,

Totally new to JFreeChart, it looks very nice and powerful.

How do you best listen for Zoom events? My best guess is to register a ChartChangeListener on the chart, and then assume a zoom occurred when I see a PlotChangeEvent. Is this the correct way to detect a zoom?

I've been searching the interwebs today, looking for a JFreeChart example that does something like this:

1) Detects when the user has zoomed.
2) Does some kind of lazy loading into a Time Series graph to provide more detailed data in the zoomed area.
3) Potentially adds further information, like highlighting areas and putting overlay icons on interesting points in the graph after a zoom.

So far haven't found an example that does that. How good of a job could JFreeChart do at this? Would the $$guide provide some help or an example of doing this?

remiohead
Posts: 201
Joined: Fri Oct 02, 2009 3:53 pm
antibot: No, of course not.

Re: On Zoom, providing more detailed data and stuff

Post by remiohead » Wed May 08, 2013 8:39 pm

There is no specific zoom notification that I can see.You could listen for axis changes, but I'd do it by extending ChartPanel and adding specific zoom events to those methods.

Everything else you mention is absolutely possible and in most cases very easy to do.

medloh
Posts: 16
Joined: Tue May 07, 2013 11:26 pm
antibot: No, of course not.

Re: On Zoom, providing more detailed data and stuff

Post by medloh » Fri May 10, 2013 7:08 pm

I'd do it by extending ChartPanel and adding specific zoom events to those methods.
Thank you for the suggestion--I'll be sure to try that when when get there.

I was looking through all the examples and it definitely looks like it can cover everything we want to do.

Locked