Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Collapse]Charts Suite
   [Collapse]Chart Control
    [Expand]Getting Started
    [Expand]Fundamentals
    [Expand]Providing Data
    [Expand]Appearance Customization
    [Expand]End-User Features
    [Expand]Design-Time Features
    [Collapse]Visual Elements
      Chart Area
      Chart Title
      Diagram
      Panes
      Axis
      Secondary Axis
      Axis Title
      Axis Labels
      Custom Axis Label
      Axis Tickmarks
      Constant Line
      Constant Line Title
      Grid Lines
      Strip
      Series
      Series Point
      Series Point Marker
      Series Point Label
      Series Title
      Legend
      Legend Marker
      Legend Check Box
      Trend Lines
      Regression Lines
      Moving Average and Envelope
      Fibonacci Indicators
      Annotations
      Oscillator Indicators
      Price Indicators
      Error Bars
      Scale Breaks
      Total Labels
    [Expand]Examples
    [Expand]Additional Resources
   [Expand]Chart3D Control
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Trend Lines

This document provides a general overview of Trend Lines and describes how to draw a trend line between any two series points.

The document consists of the following sections.

Expanded Trend Lines Overview

A Trend Line is a line drawn between any two points in a series, to show the general direction that values are headed towards. The Trend Line can be limited by these two points or extrapolated to infinity.

Trend Lines are often used in business analytics to show changes in data over time, using simple and understandable visuals. However, they suffer from a lack of scientific validity in cases where other potential changes can affect the data. For some scenarios it may be more appropriate to use Regression Lines, which are a more sophisticated analytical instrument.

A Trend Line is represented by an instance of the TrendLine class, which is a descendant of the Indicator class. The Trend Line resides in the IndicatorCollection of a series, which is accessible via the XYSeries2D.Indicators property.

A series can possess any number of Trend Lines, and it is possible to draw any number of these lines across the same series point.

The table below lists the main properties that affect the element's functionality and appearance.

Expanded Draw a Trend Line

To access the collection of indicators for a series at design time, select the series (e.g. StockSeries2D), and click the ellipsis button for the XYSeries2D.Indicators property in the Properties window.

In the invoked Indicator Collection Editor: Indicators dialog, select Trend Line and click the Add button.

After a Trend Line is created, you can define its properties in the Indicator Collection Editor: Indicators dialog.

Since a Trend Line must be drawn across two points, define the argument (via the FinancialIndicator.Argument1 and FinancialIndicator.Argument2 properties) and the value level (via the FinancialIndicator.ValueLevel1 and FinancialIndicator.ValueLevel2 properties) for each point.

The TrendLine.ExtrapolateToInfinity property indicates whether the current Trend Line should be extrapolated beyond the end point's argument, or limited to this point.

A Trend Line's appearance is managed via its Indicator.Brush and Indicator.LineStyle properties.

To close the indicators' dialog, click the OK button, as shown in the image above.

Note that all the chart's indicators are painted based on a palette defined via the ChartControl.IndicatorsPalette property.

Expanded See Also

Is this topic helpful?​​​​​​​