aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JFreeChart zoom Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFreeChart zoom" Watch "JFreeChart zoom" New topic
Forums: Swing / AWT / SWT Other JSE/JEE APIs
Author

JFreeChart zoom

Rodrigo Bossini
Ranch Hand

Joined: Jul 03, 2009
Posts: 113
Hi,

I'm creating a XYLineChart which is built using a XYSeriesCollection which contains two XYSeries. For each x, the y values are too close to each other in these two graphics represented by the XYSeries objects. The difference between them is always under 0.1. The range for the Y values is 0-2000. When I look at the JPG file created, I can barely see the two graphics: one of them is practically hidden by the other. What I'd like is some kind of zoom so the little variations could be seen. I'm not sure whether it would be feasible to alter the scale somehow or maybe changing the JPG dimensions would help. Any suggestions, please?


I see wind mills
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2864
    
  11

I've only used JFreeChart indirectly through Jasper Reports, but I know you are able to set the Y-axis scale. A quick Google search suggests that you want the setRange() method in the ValueAxis class or one of its subclasses. There also seems to be a way to set it so the range is determined automatically based on the data.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFreeChart zoom