2

Hi I am trying to create simple graph in java every where in the internet, they suggest to use JFreeChart. Can any one guide me how to create simple graph without using JFreeChart.

Thank you

Shreyuth
  • 116
  • 3
  • 13
  • 2
    Why would you NOT use JFreeChart? – Georgian Dec 13 '13 at 08:35
  • 1
    It's huge and it may be overdimensionend for some use cases. (Note: I don't like JFreeChart, but I agree that it has many powerful features to offer. So if you have some highly sophisticated charts to create, then it's probably a good choice. But I don't know why I should use a 1.4 Mb(*) library for displaying some smaller bar/line charts with NO extraordinary requirements). * http://mvnrepository.com/artifact/jfree/jfreechart/1.0.13 (size taken from here) – Andreas Aumayr Dec 13 '13 at 09:27
  • Some examples are seen [here](http://stackoverflow.com/a/20556929/230513). – trashgod Dec 14 '13 at 01:32

4 Answers4

2

Why don't you use JFreeChart??

Take a look at these stuffs

Standalone

Generate Pie Chart/Bar Graph in PDF using iText & JFreeChart
Graph using Eclipse

Web

JFreeChart : Create Auto-Refreshing Pie Chart in Servlet dynamically
Create a bar chart in JSP page using JFreeChart

In Web application you will get a lots of plugins for creating charts and graphs.
Take a look at this article

12 Great jQuery Graphs and Charts Plugin

Nidhish Krishnan
  • 20,593
  • 6
  • 63
  • 76
1

Depends whether you want to generate the graph on the front end or back end.

Personally i prefer front end tools such as: Google graph api - https://developers.google.com/chart/

Check out there quick start page: https://google-developers.appspot.com/chart/interactive/docs/quick_start

You can output a beautiful graph in minutes.

Tom
  • 2,093
  • 1
  • 12
  • 11
1

Personally I prefer XChart. It's both powerful and simple to use. Just have a look at the main page:

http://xeiam.com/xchart.jsp

The license is Apache 2.0 and you can find the source code on github:

https://github.com/timmolter/XChart

Andreas Aumayr
  • 1,006
  • 1
  • 11
  • 17
0

The standard java demos folder contains a nice graph demo. See your JDK installation:

.../jdk1.x/demo/applets/SimpleGraph/

Load it via .../demo/applets.html

geert3
  • 7,086
  • 1
  • 33
  • 49