Generating graphs with JHeadstart

One of our recent buisiness cases required the availability of graph representations of data in an application generated with JHeadstart. At first I started out with JFreeChart and ChartCreator, until my colleague and former JHeadstart team memeber Peter Ebell advised me to use the graph generation capabilities of JHeadstart. The charts are based on Oracle BI Beans technology. This article summarizes my successful attempts to generated graphs with JHeadstart.


Following the instructions in the JHeadstart Developers Guide in the section "Generating a Graph", I created a graph item based on the Employee Salary in the JHeadstart Application Definition Editor (ADE). The result of this generation is shown in the following image

 Generating graphs with JHeadstart allemployeessalarygraph

Basically, it shows a graph representation of ALL employees in one graph. This has led me to believe that the graph is built upon all data in the DataControl that is used to generate the graph. This theory can easily be proved by generating a graph based upon the same Employee Salary field in the Employee view that is a detail group of the department group. Now, only the Salaries of the Employees in the current department are shown, as can be seen in the next screenshot

Generating graphs with JHeadstart departmentsemployeessalarygraph
So, generating graphs with JHeadstart is easy! It looks like the usage of these graphs is limited to general properties of ViewObjects, but inventing smart ViewObjects can really expand the usage of these graphs. Furthermore, JDeveloper has a very powerful editor for the graphs, as is shown in this next image (pardon the Dutch language in the image)

Generating graphs with JHeadstart jdevelopergrapheditor