advertisement
Not sure if you have an account?
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the code for this article
A Quick Note About XPath
Expanding the Functionality
Partners & Affiliates
advertisement
advertisement
advertisement
 

Serve Business Graphics from Any XML Source

Using the flexibility afforded by defining data in XML and parsing it with XPATH, you can develop a decoupled servlet that serves up business graphics. 


advertisement
raphical representation of data is a very hot topic. One only has to leaf through the pages of any journal to see the number of companies that are offering complex graphical packages that allow you to manipulate and visualize your data.

Most of them have a common problem: They require you to format your XML data to a specific standard that they can 'understand' before they can chart your data. The flexibility XML affords is lost, as you have to reformat the data, usually using XSLT. This isn't always as trivial as it sounds, as sometimes developers have to take XML documents from third-party sources and add to them before dispatching them to their clients. For example, a financial services company might have to take basic data about a company from a rented database, and apply analytics to the data before pushing it down stream for XSL styling.

 
Figure 1: Architecture of the Chart Server. This shows the overall architecture of the system developed in this article. You can see how the chart server uses XML configuration files to call and parse the data sources.

This article takes you through the steps of developing a business graphics server using Java. The server calls your data sources and parses the data according to XPath variables that you set up to create data series and categories. It then loads the data into the charting engine, an excellent open source package called JFreeChart.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement
Advertising Info  |   Permissions  |   Help  |   Site Map  |   Network Map  |   About