This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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'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.