New to Telerik Reporting? Download free 30-day trial

Line Charts

A Line chart displays series as sets of points connected by a single line and represents large amounts of data that occur over a continuous period of time.

Line charts can also render series of data points to show trends over a period of time. They enable you to use one or more data series and to tailor the appearance for each series to enhance the data visualization by using unique colors, line thickness, pen style, and point marks.

The following image displays a Line chart that contains three series.

A basic Line chart type

Types

  • Straight Line Chart—A Line chart that uses straight lines to connect the data points.
  • Smooth Line Chart—A Line chart that uses curved lines instead of regular ones.
  • Stepped Line Chart—A Line chart that uses horizontal and vertical lines to connect the data points and creates a step-like structure.

Line Types

Creating Line Charts

In this section, you will create a Line chart.

1. Add the Graph

To add a new Graph report item to the report, refer to the article getting started with the Graph report item.

2. Set the SeriesGroups Hierarchy

Now you can set the SeriesGropus hierarchy of the Stacked Area chart:

  1. Open the SeriesGroups collection editor and click Add.
  2. Set the Groupings to =Fields.ProductCategory.
  3. Set the Sortings to =Fields.ProductCategory.
  4. Set the Name to seriesGroup1.

3. Set the CategoryGroups Hierarchy

Next, you will have to define the CategoryGroups hierarchy of the Stacked Area chart:

  1. Open the CategoryGroups collection editor and click Add.
  2. Set the Groupings to =Fields.OrderDate.Year.
  3. Set the Sortings to =Fields.OrderDate.Year.
  4. Set the Name to categoryGroup1.

4. Configure the Coordinate System

Here you will specify the coordinate system details:

  1. Open the CoordinateSystems collection editor and Add a new CartesianCoordinateSystem.
  2. Leave the Name to cartesianCoordinateSystem1.
  3. Set the XAxis to New Axis with Category Scale.
  4. Set the YAxis to New Axis with Numerical Scale.

5. Configure the Series

In this step, you will configure the series of the chart:

  1. Open the Series collection editor and Add new LineSeries.
  2. Set the CategoryGroup to categoryGroup1.
  3. Set the SeriesGroup to seriesGroup1.
  4. Set the CoordinateSystem to cartesianCoordinateSystem1.
  5. Set the Y value to =Sum(Fields.LineTotal).

6. Style the Appearance

To set the color palette, format the labels, define the values of the legend, and elaborate on any other styling options, refer to the section on formatting the Graph.

Design Considerations

  • To improve the visual impact of the default Line chart, consider increasing the thickness of the series line to create a bolder line chart.
  • A Line chart requires at least two points to draw a line.
  • A series that is drawn as a line will not take up much space within a chart area. Therefore, Line charts are frequently combined with other chart types such as Column charts.

See Also

In this article