Data can be:
All data is plotted as a series, and each series consists of a related group of data points.
Each data point consists of:
- one or more Y values, which are the value(s) of the data points;
- an optional X value that may determine where along the X axis a point is plotted.
Most chart types use one Y value. However, charts such as bubble, candlestick, range and stock chart types require more than one Y value since one data point consists of multiple values. For example, to plot one stock chart column four values are required: high, low, open and close.
There are two ways to add data to a chart: using data binding or non-data binding techniques. Both methods can be used at either design-time or run-time.
Data Binding
Data binding can be accomplished at design-time using the Data Source Configuration Wizard. To use the Data Source Configuration Wizard, click the chart to see the chart properties, then click the drop-down button for the DataSource property (as shown in the figure below), and then click the Add Project Data Source Link.
Data binding at run-time is very powerful. There are a variety of binding methods that can be used, starting from simple and ranging to more complex.
Data Sources
The Chart control can bind to a variety of data sources, including all standard or custom objects that implement the IEnumerable interface. For example: DataView, DataReader, DataSet, DataRow, DataColumn, Array, List, SqlCommand, OleDbCommand, SqlDataAdapter, and OleDbDataAdapter objects.
A data source may contain missing data. The Chart control handles this by optionally representing missing data with empty points (see the figure below).
The Chart control can perform common data manipulation tasks, such as copying, filtering, grouping, merging, and splitting data. It also includes numerous statistical and financial formulas, enabling you to get the most out of your data.
The Chart control can use DateTime objects for date/time values. It can then render the date/time format that you specify, making the rendered chart easy to read.