This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFreeChart zoom

 
Rodrigo Bossini
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
Greg Charles
Sheriff
Posts: 2993
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic