How to get the sub dataset from the mouse zoom operation?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
jgloving
Posts: 6
Joined: Wed Aug 13, 2008 9:36 pm

How to get the sub dataset from the mouse zoom operation?

Post by jgloving » Wed Aug 13, 2008 9:40 pm

For one given dataset, I can draw the chart.
Here, I'd like to know, when I use mouse to drag the chart (a Rectangle), the chart will be zoomed. Obviously, the new chart has a sub dataset.
How to get the sub dataset? Thanks a lot

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Wed Aug 13, 2008 9:57 pm

There is no "sub dataset". Zooming is implemented by changing the range of the axes. After the zoom operation is completed, you can simply call this method on each affected axis

Code: Select all

public Range getRange()

jgloving
Posts: 6
Joined: Wed Aug 13, 2008 9:36 pm

Post by jgloving » Tue Aug 19, 2008 8:10 pm

skunk wrote:There is no "sub dataset". Zooming is implemented by changing the range of the axes. After the zoom operation is completed, you can simply call this method on each affected axis

Code: Select all

public Range getRange()
Got it, thanks a lot

Locked