Basic Steps for Creating a Chart
The basic steps for creating a chart are the same whether you are creating a Cartesian chart or a polar chart. To create a chart, do the following:
-
Create the data sets.
-
Create the objects representing the data sets you want to display. These objects are instances of subclasses of the IlvChartDataSet class (See Data Classes ).
-
Put the data to be displayed into the created data sets.
-
-
Create the chart.
The created chart object is an instance of the IlvCartesianChart or the IlvPolarChart class, depending on the type of chart you want to display (See Chart Classes ).
-
Add the data sets to the chart data object.
The chart data object can be the IlvMemoryChartData object that is created by default or whatever chart data object you have set on the created chart.
-
Create and add the displayers that will be used to draw the graphical representations of the data sets.
This section provides two examples to show you how to create a Cartesian chart and a polar chart. These examples follow our basic steps for creating a chart.