|
|
|
|
|
Chart Data
Essential Chart can handle data in different ways. You can simply add the data points to a series and let the Chart manage it. Alternatively, use the built-in ChartDataBindModel and specify the column names containing the X and Y values for ease of data binding to DataSet. For added flexibility, implement the simple IChartSeriesModel interface and plug-in your custom model.
|
|
|
|
The simplest and straight-forward approach is to populate a ChartSeries with data points as shown below:
Default Data Points Population
|
|
|
|
Essential Chart makes it very easy to bind DataSet instances containing the data point values to the ChartSeries. Simply use the built-in ChartDataBindModel type to setup this binding as follows:
DataBinding to a DataSet
|
|
|
|
Essential Chart also provides you a very easy way to implement a custom "data model" by implementing a simple data model interface. Use this approach to encapsulate your data retrieval code within a scalable scope.
Such custom data models are also better performing than manually populating a ChartSeries with data points, usually when dealing with huge data.
The following screenshots illustrates the indexed and non-indexed model interfaces.
Non-Indexed Model
Indexed Model
|
|
|
|
Essential Chart along with Essential XlsIO can be used to import data from Excel documents into a chart.
Simpler Excel data can of course be loaded using just the Microsoft Jet OLEDB Data Provider.
Chart Data From Excel
Using the same approach you can also export Essential Chart into an Excel Chart inside an Xls document.
|
|
|
|
Essential Chart now supports binding to LINQ query results. Use LINQ to create different, concise and optimal views of your data. Bind to LINQ query results and view your data using many different chart types.
Binding a LINQ query result to a chart and the resultant display are illustrated below:
Binding LINQ Query Result and Resultant Display
|
|
|
|
|
|
|
|