Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple Java Graphing API for use in Vaadin Web App

I have a simple Vaadin Web App and I am looking for a simple graphing API that will only have to handle a minimal amount of data(at most several hundred data points) and will allow me to display simple 2d graphs in a Vaadin panel object.

I need it to be a Java API and not a external service like Google charts because of security reasons.

Does anyone have any good recommendations?

EDIT: I choose to go with Invient Charts(Vaadin Add-on Wrapper for HighCharts) because I already have a HighCharts license. If I did not have a license I would probably have gone with a simple GWT based API such as gchart

EDIT 3/29/2012: Rolled out a production build of a Vaadin App utilizing Invient Charts. Very happy with the end results. You can control almost every aspect of High Charts functionality with pure Java code. A couple things are a little "hacky" like formatting how points are displayed and mouse-overs on data points where you need to pass in anonymous javascript functions as Strings. Initial setup is a bit dicey too; I had to override my ApplicationServlet to ensure the javascript libs were imported correctly and getting them in the right location in your project structure isn't thoroughly documented. Overall though it was relatively painless getting graphs integrated into my Vaadin App. Strongly recommend.

like image 924
anataliocs Avatar asked Oct 04 '11 18:10

anataliocs


2 Answers

JFreeChart should do the trick: http://www.jfree.org/jfreechart/. This is the only charting package I have any experience using so I couldn't give you any feedback in the way of how it compares to others but I do know that it's very widely used by Java developers - the most used, I believe, of all the free charting packages - and that it's generally held in pretty high esteem. JFreeChart also has a LGPL license which means that it can be used in proprietary/commercial software, whereas software with a GPL license can be used for free but not distributed as a part of any commercial product. Not sure if that's relevant here but perhaps it helps

like image 116
Peter Berg Avatar answered Oct 27 '22 15:10

Peter Berg


Invient Charts add-on is really cool, but is you want use it in production, as part of your commercial application, you should buy license for it. I am using this addon (and it has LGPL 3.0 license), of cause it have less functionality that Invient Charts, but for my needs it enough. Big plus of this addon, is "No internet connection" needed to generate chars, instead of other charts add-ons with use google API to generate charts.

like image 28
Yury Avatar answered Oct 27 '22 15:10

Yury