Charts > Using the Charts Library > Chart Basics > How Charts Work in Rogue Wave Views
 
How Charts Work in Rogue Wave Views
A chart object needs several different kinds of objects to display a chart. All these different objects work together in the process of converting data into a graphical display.
Components of a Chart Object
Through the examples in the section Basic Steps for Creating a Chart, you saw that a chart object uses:
*A chart data object to manage the data sets it displays.
*Displayer objects to display the graphical representations of the data (polylines, high-low bars, and so on).
*An optional legend object to represent the legend of the chart.
In addition, a chart object uses the following objects:
*Scale displayer objects to display the scales.
*A layout object to compute the layout of the chart. More specifically, this object computes the position of the area where the data are displayed within the bounding box of the chart object.
*A projector object to perform the projection of data into screen coordinates.
*A coordinate information object to store specific information for each coordinate of the data that is represented by a scale in the chart object.
To see how all these various components work together within a chart object, let’s take a look at the Temperatures chart that we created as an example in Creating a Simple Cartesian Chart (Example of the Temperatures Chart).
Example of the Temperatures Chart
Components of the Temperatures Chart shows the objects used by the chart object to display the Temperatures Chart.
Components of the Temperatures Chart
The chart object uses the following objects to display the Temperatures Chart:
*A chart data object that manages the two data sets: the morning mean temperatures and the afternoon mean temperatures data sets.
*Three displayer objects: two polyline displayers and one high-low bar displayer.
*Two coordinate information objects: one associated with the coordinate of the data represented by the abscissa scale and one associated with the coordinate of the data represented by the ordinate scale.
*Two scale displayer objects: one to display the abscissa scale and one to display the ordinate scale.
*A layout object that computes the layout of the chart.
*A projector object that transforms the data points into screen coordinates.
*A legend object that is used to display information describing the data displayed by the chart.
The arrows in the figure show the relationship between some of these objects. For each of the displayers (the two polylines and the high-low bar), the data set(s) it displays is indicated as well as the coordinate information object associated with the ordinate scale considered by the displayer. The coordinate information is necessary since a chart can use several ordinate scales (this means that several coordinate systems can be displayed on the same chart) and a displayer object must know which coordinate system it must use to display the data. For each of the scale displayers, the arrows indicate the coordinate information object that is associated with the coordinate represented by the scale displayer.

Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.