Trinidad has a data visualization component that is able to visualize numerical data in an appealing way. This component relies on a special data model that we have to implement. This section focuses on implementing that data model, and also gives an overview of the most important options of the visualization component itself.
The chart component expects a number of methods to be present in order to get the data to be visualized. One would expect these methods to be defined in a Java interface, as is common practice. However, the Trinidad project only supplies an abstract class that has to be extended, which is the org.apache.myfaces.trinidad.model.ChartModel
class. This class defines three methods that have to be implemented regardless of which visualization type will be chosen. Apart from these three methods, the class has a number of methods that are not abstract, but that can be overridden in a subclass. Some of them are needed for some specific...