The most basic method of passing data to a chart using Chart FX for Java is to utilize the built-in API. The Chart FX for Java API provides properties and methods to load and manipulate data into a chart. Passing data to your charts using the API may be the most basic method, however,one of the features of Chart FX for Java is the ability to read or pass data from many sources. These sources include databases, text files, XML, arrays, collections, and many others.
In Chart FX, there is no need to loop through data points to populate the charts. If you have a previously filled data array, just pass it to Chart FX and have the chart filled with data with as little as one line of code.
This chapter will explain how to populate your charts from the most common data sources. These sources include:
- API
- Database
- Text
- XML
- Arrays
|