Area charts are line charts with area between the line chart and axis filled with a color or shading. However, while line charts simply present the data values to demonstrate the trend, filled portion of the area chart helps in communicating the magnitude of the trend as well. These charts are also used to analyze a simple comparison between the trend of each category. For instance, an area chart can easily depict how internet is gradually taking over the newspaper as a source of getting news.
Spline area charts and step area charts are other modifications of area charts where area between spline chart or step chart and axis is filled with a color or shading to indicate the magnitude of change. For more information on spline chart and step chart, see Line Charts.
Area Chart |
Spline Area Chart |
Step Area Chart |
---|---|---|
With FlexChart, you can create these charts by setting the ChartType property of FlexChart class as shown in the table below. This property accepts the values from ChartType enumeration of C1.Chart namespace.
FlexChart also provides options to stack the area charts. You can set the Stacking property of FlexChart class to Stacked or Stacked100pc for stacked or stacked100 area charts respectively. This property accepts the values from Stacking enumeration of C1.Chart namespace. Stacked charts are used for demonstrating the part-to-whole relationship that is, for displaying the cumulative values of categories. On the other hand, stacked 100 charts are used to present the percentage share of the values.
Stacked Area Chart |
Stacked 100 Area Chart |
---|---|
To create an area chart using FlexChart:
At design-time
Using code
To create a WinForms area chart through code, the first step after initializing the control is to clear the default series and add a new series using the Add method. Set up the data source through the DataSource property and configure the X and Y axes by setting the BindingX and Binding property. You also need to set up the chart by setting the ChartType property and other required properties.
Note that the above sample code uses a custom method named GetNewsSourcesInfo to supply data to the chart. You can set up the data source as per your requirements.