File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating charts

 
Shikha Upadhyaya
Ranch Hand
Posts: 70
Chrome
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a log file freelast.txt as shown below:

I have to plot the values corresponding to Mem, Swap and Total in a chart (pie chart or bar graph). In my work so far I have been able to retrieve all the numerical values and store them in 3 arrays respectively. My question is whether JFreeChart is a suitable library to do this? How do I start off?
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if you can use JFreeChart in a Swing application. Please verify that.
Otherwise JavaFX 2 has support for charts and you can embed them into your swing applications.
Read this for JavaFX 2 chart tutorial
Read this for integrating javafx scene into swing.
 
Shikha Upadhyaya
Ranch Hand
Posts: 70
Chrome
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohamed Sanaulla wrote:I am not sure if you can use JFreeChart in a Swing application. Please verify that.
Otherwise JavaFX 2 has support for charts and you can embed them into your swing applications.
Read this for JavaFX 2 chart tutorial
Read this for integrating javafx scene into swing.


I have jdk 1.7.0 installed currently. Do I have to install javafx 2 in order to use this now?
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shikha Upadhyaya wrote:
Mohamed Sanaulla wrote:I am not sure if you can use JFreeChart in a Swing application. Please verify that.
Otherwise JavaFX 2 has support for charts and you can embed them into your swing applications.
Read this for JavaFX 2 chart tutorial
Read this for integrating javafx scene into swing.


I have jdk 1.7.0 installed currently. Do I have to install javafx 2 in order to use this now?

Yes you need the javaFX 2 SDK
 
Tim Moores
Bartender
Pie
Posts: 2496
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no problem with using JFreeChart in a Swing app; it can either create static images that you can display (PNG, JPEG), and it also has a Swing component for displaying images directly.

Or you can use something like http://jchart2d.sourceforge.net/ for dynamic chart display.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic