skip to main content
Charts > Programmer's documentation > Developing with the JViews Charts SDK > Using the Data Model > Connecting to the Data Model
 
Connecting to the Data Model
Connecting to a Chart
The connection between a chart and the data model is performed through a unary relationship between a chart renderer and a data source. For more information on chart renderers, how to connect them to a data source, and how to add them to a chart, refer to Handling chart renderers.
Data Connection illustrates a simple example of data connection:
Data Connection
Events and Listeners
Both IlvDataSet and IlvDataSource send events when the underlying data changes. The chart uses implicitly this notification mechanism to update itself whenever the data is modified in a way that affects the display.
You can explicitly add or remove listeners to be notified of changes in the data model with the following methods:
*For data source events:
addDataSourceListener
removeDataSourceListener
*For data set events:
addDataSetListener
removeDataSetListener
Two kinds of events are sent by data sets:
*DataSetContentsEvent events, describe the changes in the contents of a data set (data added or modified).
*DataSetPropertyEvent events, describe the changes in a property of a data set (name, client properties, and so on).

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