JFreeChart: Open Source Charting Solutions

Posted on Monday, September 01, 2008
0 commentsAdd comments

JFreeChart is an open source chart library created by Object Refinery Limited, and may be downloaded from SourceForge.org. JFreeChart’s target consumers are Java developers looking to bring high quality, professional charts to their applications. The library provides a comprehensive collection of chart types, including pie, bar, line, area, scatter, and many others that when combined with JFreeReport provide Java developers powerful presentation tools.

Having used .NET reporting and charting solutions over the past several years, I chose to evaluate JFreeChart against the three prime directives of open source software (OSS) engineering. Specifically, I was interested in determining whether I would consider using a Java OSS charting solution such as JFreeChart over the .NET charting tool I have experience using, as well as, how similar or dissimilar it is to .NET charting tools. Some of the most impressive .NET charting tools I have seen on the market are Dundas Chart for .NET, The XtraCharts Suite by DevExpress, and integrated into its reporting tool Active Reports for .NET from Data Dynamics (ARNET). My experience is with the latter of these applications, which are all designed for developer integration into their applications.

According to Philip Johnson, Professor of Information and Computer Sciences at the University of Hawaii, and Director of the Collaborative Software Development Laboratory,

The three Prime Directives for Open Source Software Engineering are:

1. The system successfully accomplishes a useful task.The system does not have to include every bell and whistle to accomplish a useful task. Indeed, the art of incremental development is to determine the smallest useful increment of functionality and implement that first.
In most cases, careful thought, ample customer interaction, and efficient design and implementation can lead to a first customer release with a single useful function within weeks after project inception.
A system developer cannot verify that the system achieves PD#1. Only an external end-user can.
2. An external user can successfully install and use the system.The system must include sufficient user-level documentation to support download, installation, and use of the system without significant interaction with a system developer.
A system developer cannot verify that the system achieves PD#2. Only an external installer can.
3. An external developer can successfully understand and enhance the system.The system must include developer-level documentation providing insights into the design and development of the system that enable an external developer to understand and enhance it.
A system developer cannot verify that the system achieves PD#3. Only an external developer can.

Using these criteria, how does JFreeChart fare?
Prime Directive #1
I think JFreeChart does an excellent job of fulfilling this requirement. It does one thing, Java charts, well. It is on par with ARNET as to the myriad of charting types available, especially when it integrates with JFreeReport. JFreeChart provides an extensive demo library with over 14 categories of reports and over 100 charting examples. Searching the web for JFreeChart examples provided code listings of similar length and structure to that of ARNET. With JFreeChart’s ability to connect to databases, such as SQL and Oracle, it is a power charting library that has the benefit of being open source for developers seeking to push the library even further with their own ingenuity. An excellent perk to this is that JFreeChart is free. However, to effectively use the library a developer would likely invest in the Developer Guide which costs $48.75 for an individual license, $487.50 for a site license, and a $1,950 for a global site license, which is equivalent to purchasing ARNET. There is also a comprehensive JavaDocs API that supports developers using JFreeChart in their applications.
Prime Direct #2
I had a lot of issues installing JFreeChart. First, SourceForge.org has three separate zip files that need to be downloaded, including the JavaDocs Documentation. One download is the JCommon zip, which is a required library for several of JFree’s software. After unzipping the downloaded files, the directories contained the source code, but lacked the compiled versions. Unclear on how to proceed to install the library at this point, I searched for an installation guide from Google. I located one, which would have been nice to have as an actual download from SourceForge.org in addition to the compressed files. The installation guide stated that the source codes required a build using ant. That set off another search to acquire ant. From Apache’s ant website, I learned that ant should be contained in the version of the Eclipse IDE I was using, so I started up Eclipse. Once in Eclipse, I had to load the JCommon and JFreeChart projects using the “Java Project from Existing Ant Buildfile” option. Since JFreeChart required packages from JCommon, I decided to build JCommon first. However, the IDE had issues compiling the 181 Java source files. Attempting to resolve the compilation issues, I searched some more using Google. Eliminating some and creating others, I eventually gave up on trying to build the packages. So, I was unsuccessful in installing JFreeChart.
Prime Directive #3
Reviewing some of the JFreeChart source code revealed that it is well structured, adequately commented, and written in a manner I appreciate. I would find it easy to contribute to the existing implementation, understand how the library classes interact, and work on writing documentation for end users (Java developers).
Overall, I would consider using JFreeChart as a charting solution, in spite of the difficulty with installation. There are enough features and robustness that JFreeChart has that makes it worth the effort to resolve the installation issues. While it may not look as slick as Dundas’ charts or come already integrated into JFreeReports as is the case with ARNET, it seems to have all the same functionality and usability as these.

Comments (0)

Subscribe to: Post Comments (Atom)