• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

JFreeChart - image size

 
Ranch Hand
Posts: 223
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
figured out that this produces (when saved as image) fixed size image 300x500px.

can this be changed somehow, at least wider image would be very nice.
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is "this"? Do you have existing code? If so, how does it create the actual image? The ChartUtilities class has methods that allow you to pass in the image size you want to create.
 
Miran Cvenkel
Ranch Hand
Posts: 223
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks !

I was looking/having this:


and somehow thought that 500, 300 is a must so that image does not get cut off (ie bigger images would then have blank space around) but:



works as expected.

EDIT: do you by any chance know how to handle missing data in JfreeChart, like:



what to give it for 'onion' for second month ?
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a valid data point? If yes, you would use that; if no, then why would you want to pass in anything?
 
Miran Cvenkel
Ranch Hand
Posts: 223
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm, will see how will that work, a bit more development to test it.
I guess if there is missig data then there should be breaked line for 'onion'on normal x/y chart ?
Will report how will that pop out.
 
Get me the mayor's office! I need to tell her about this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!