Everything begins with the Chart control; the chart control
defines all of the parameters and methods required to show charts in a .NET
application. Each chart can have one or more titles that appear at the top of
the chart. It can also have one or more legends that make up the various
information groups in the chart. There can be one or more legends, and the
legend can be docked to the top, bottom, left, or right side of the chart.
Each chart has a chart area that defines the region to draw
the chart in. This area has a variety of settings regarding the X or Y axis,
3D chart rendering, the inner position of the chart, and more. The ChartArea
object is the key component that makes up the chart, because it tells the chart
data where to live, so to speak.
The groupings of data, or information groups as I mentioned
before, represents the Series object. The series is exactly that; a series of
data elements that representsss one information group. I'll provide an example
later, but know that a Series stores one or more DataPoint objects. The
DataPoint class represents the X/Y values to show on the chart.
To give you an example of the coorelation between Series and
DataPoints, imagine this. Suppose you wanted to create a coorelation between
how well various products at a store sell in relation to each other. This
coorelation tracks total net sales as compared to the year. So in a chart
scenario, the Y axis running north would represent the net sales, and the X
axis running east would represent the years.
In the chart control, each product would represent a
series. A series would consist of multiple DataPoint objects, one per year,
which would have its XValue property set to the year and its YValues property
(there can be multiple values to accommodate certain kinds of charts) would
reference the net sales. This is how the two objects coorelate.