New to Kendo UI for Angular? Start a free 30-day trial

Area

Area charts and Vertical Area charts are categorical charts, which are suitable for displaying quantitative data by using continuous lines.

Basics

The lines of the Angular Area Charts pass through points that are defined by the values of their items. The portion of the graph beneath the lines is filled with a particular color for each series. The different colors in an Area Chart are useful for emphasizing changes in values, which come from several sets of similar data. The series are overlaid on top of each other either fully or with partial opacity. The stacking order is either implicit or controlled through an user-set zIndex.

Vertical Area charts are functionally equivalent to Area charts, but transpose the axes—the category axis is vertical and the value axis is horizontal.

The following example demonstrates the Angular Area chart in action.

Example
View Source
Change Theme:

The following example demonstrates the Vertical Area chart in action.

Example
View Source
Change Theme:

Data Binding

You can bind the Area chart series to an array that contains:

  • Numbers.
  • Arrays, which represent [value, category] tuples.
  • Objects, which are also referred to as models.

When the Area chart series is bound to objects (models), it is your responsibility to select the relevant fields through the available bindings:

Model bindingData typeRequiredDescription
fieldnumber/nullYesThe value of the data point, if any.
categoryFieldstring/date/number/nullNoThe category of the data point, if any.

For more information on how to configure each data-binding mode, refer to the article on binding the Kendo UI Chart to data.

Sub-Types

The Angular Area charts feature the following sub-types:

Stacked Area Charts

Stacked Area charts are suitable for indicating the proportion of individual values to the total. To select this series sub-type, set the stack property of the first series item to true. The setting of the stack property is applied to all series and you do not have to set the rest of the series explicitly.

The following example demonstrates how to stack the red and green series on top of each other. The blue series contains positive and zero values as well as a negative one. In all cases, the plotted value is the sum of all values up to the current series.

Example
View Source
Change Theme:

100% Stacked Area Charts

100% stacked Area charts are suitable for indicating the proportion of individual values as a percentage of the total. To select this series sub-type, set the stack property of the first series item to a { type: '100%' } object. The setting of the stack property is applied to all series and you do not have to set the rest of the series explicitly.

While it is possible to plot negative values in a 100% stacked chart, the results are hard for the user to interpret.

The following example demonstrates how the series data is converted into percentages.

Example
View Source
Change Theme:

Line Style

Area charts enable you to render the lines between the points in different styles. To set the appearance of the lines, use the line.style option which provides the following available styles:

  • Normal—The default style, which produces a straight line between data points.
  • Step—The style renders the connection between the data points through vertical and horizontal lines. It is suitable for indicating that the value is constant between the changes.
  • Smooth—The style causes the Angular Area chart to display a fitted curve through data points. It is suitable for displaying data with a curve and connecting the points with smooth instead of straight lines.

The following example demonstrates how to use the different types of lines.

Example
View Source
Change Theme:

Support and Learning Resources

Additional Resources