Up to this point, all of the recipes in this chapter dealt with retrieving, processing, or storing data. What about visualizing the data? As with other rich client platforms, JavaFX provides a wealth of data visualization tools in the form of the Chart API. This recipe shows you how to use the Chart API to create a visual rendition of your data in the form of charts.
This recipe involves discussion about JavaFX's Chart API located in package javafx.scene.chart
. As of version 1.2 of the platform, the API offers support for more than half a dozen charts. All charts, however, share a common implementation design, which makes the creation of all charts a similar exercise. The example presented for this recipe will show you how to create a bar chart. However, the steps necessary to create other types of charts are similar.