1
votes

i am searching for a server side java chart api. i already played with jfreechart but it produces ugly charts and finetuning the look seem to be complicated.

now i am looking at the free bi tools. the problem with all of them (birt, jasper, pentaho, ?) is that the documentation is focusing on WYSIWYG Reporting. My perspective is different. i have webapp(gwt) and data (pojo, representing pivot tables that are published as html and pdf) in place and want output nice looking charts (svg,png, svg with js?). It would be nice if the chart layout/look could be adjusted by a wysiwyg tool afterwards - but this is not a must have.

So what tool creates nice looking charts out of the box? and has a good documented api to integrate on server side (a get started tutorial would be nice)?

The first problem i have to solve is to make "reports" out from my pojos ("table").

Clarification: as the topic implies i need a java based solution on server side (the charts are also published as pdf/png in documents to be exported). at the moment the only suggestion remains jfreechart?

What about the charting api contained in bi solutions like birt/jasper/pentaho...?

4

4 Answers

1
votes

JFreeChart is one of the most popular charting engines for Java applications. If you didn't like its output, I am not sure you will like any output.

Another thing to note is that JasperReports is using the same JFreeChart for rendering its charts. I am not sure about this, but I think Pentaho does the same.

If you only need charts and not full reports, I would suggest you use JFreeChart. If you learn it well, you will definitely get nice looking results. The last question in the JFreeChart FAQ page provides a full list of other Java based charting libraries. You may want to take a look at that.

0
votes

I recommend using jqPlot. I has very good looking and powerful apis to render charts in browser using svg and can give you jpg outputs too.

Primefaces has also wrappers around jqPlot and jFreeChart so you can use it to render charts easily but will not have flexibility like using pure jqPlot. Using Primefaces can fit exactly with your requirement to render charts from POJOs.

Fore more info see Primefaces demo.

0
votes

I think it is possible yet very hard to make JFreeCharts look good. I guess it is the most advanced PNG-outputing chart lib for Java. Most of charting libraries are now JavaScript based either non-free amCharts or free jqPlot. I'd recommend using jqplot if you can show charts in browser only and don't need to generate PDG server-side (I'm not sure if it is possible with jqplot).

You may want to try some new libs. These look promising:

As for reporting platforms I was evaluating BIRT, Jasper and Pentaho and I found BIRT the easiest and most promissing. You can implement your own datasource for BIRT (it doesn't need to be SQL) and build reports from POJOS.

0
votes

ok i got started thx to links i got here:

At first sight my hope has fullfilled:

  • the charts out of the box looking better
  • the api/ architecture seems more flexible/ better organized (e.g. chart layout/colors could be specified as xml)
  • overall better feeling on using open source eclipse stuff (don't ask why)
  • much better svg rendering - interactive with javascript!