Search
Data Series and Binding

SeriesRenderer classes used to draw chart graphics read data through the Series interface. You could implement this interface in your own model classes to avoid duplicating data. Alternatively, if a model class is sealed but provides API to access its data, you could implement the interface in an adapter class.

The library includes several pre-defined series classes that let you specify data via List or array objects. For example, BarSeries lets you specify lists of values, inner labels and top labels, and PointSeries lets you specify data as a list of points.

The DataBoundSeries class can take a data-source JSON formatted object or a list of JavaScript objects, and read their values using reflection on fields specified via properties such as XDataField and InnerLabelsDataField. Setting the DataSource property of a Chart control will automatically create DataBoundSeries for all fields listed in the chart's *Fields properties such as XDataFields. You can freely mix explicitly created Series objects with ones generated automatically from DataSource.