Link to home
Create AccountLog in
Avatar of dshrenik
dshrenikFlag for United States of America

asked on

Create charts using Java code

Please let me know if there are any APIs that allow creation of charts (bar graphs / histograms / pie charts, etc) through Java code. At this point of time, I am not particular about the output format  - Excel file / Matlab file / R (Stats language) etc. But, it would be great if something exists for Excel.

The important thing is that I must be able to create a chart through Java code only, and there must not be a requirement for predefined external templates as is the case with jxls.

Thanks!
Avatar of for_yan
for_yan
Flag of United States of America image

JFreeChart
ASKER CERTIFIED SOLUTION
Avatar of for_yan
for_yan
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
JFreeChart is the most popular in this area and mkaes very good charts
Avatar of dshrenik

ASKER

Thanks!

Are there any APIs for Excel?
Looka at it, I can post the whole PDF manual if you want.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
There was a lot of questions just toadya bout it in this zone
With jxls, we need to create a template.
POI doesnt seem to support charts.
http://poi.apache.org/ - this is not so for graphs but for read/write MS docs, xls
Right. Do we have something for graphs in Excel?
If possible, please post the link to the manual for JFreeChart.
JXLS is for graphs in Excel created by Java
Right. But, the problem with jxls is that it requires a template file. I want to do everything from Java without having to create templates first.
Type JXLS in the serach here on EE and maybe limit to the latest days - you'll see soem traikls
This is the manual
jfreechart-1.0.13-A4.pdf
But you can wriote templet in Java with POI first (tjhough it seesm too much work to me - better do them once and use them)
That's a nice idea!
Well, I'm glad you like it - id you need to create them all the time different on the fly, then maybe it is a way
SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Think you'll find you can't create templates in POI
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
@CEHJ:
Could you give me the exact link to the API and some tutorials / examples?

Thanks!