skip to main content
Gantt > Programmer's documentation > Developing with the JViews Charts SDK > Creating a Chart > Creating a basic chart
 
Creating a basic chart
The IlvChart class provides a set of convenience methods that may reduce the number of steps required to create a chart.
These methods are:
*setRenderingType
Sets the type of the chart renderers to use to represent a stand-alone data source.
*setDataSource
Sets the specified data source as the new data source and represents it with the default chart renderer type.
*addData
Connects the given data source to the chart and represents it with the specified chart renderer type.
*addRenderer
Adds the specified renderer to the chart and initializes its data source with the specified data set.
1. Create the data model.
*Create the object representing the data source you want to display. This object is an instance of a concrete implementation of the IlvDataSource interface.
*Put the data to be displayed into the created data source.
2. Create the renderer that will display the graphical representation of the data. The renderer is an instance of one of the IlvChartRenderer subclasses.
3. Set the data source as the chart renderer data source.
4. Create the chart.
The created chart object is an instance of the IlvChart class, and its type depends on the type of chart you want to display.
5. Add the chart renderer to the chart object.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.