[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Charting Basics
   [Expand]Series Views
   [Collapse]Chart Elements
      [Collapse]Simple Indicators
        Regression Lines
        Trend Lines
       Fibonacci Indicators
       Moving Average and Envelope
       Oscillator Indicators
       Trend Indicators
       Price Indicators
       Error Bars
      Series Points
      Series Point Labels
      Total Labels
      Series Titles
     Chart Titles
   [Expand]Providing Data
   [Expand]Data Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Additional Resources
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Trend Lines

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

This 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. Trend Lines belong to the Indicators tool set provided by XtraCharts, for extended visual data analysis.

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 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 XYDiagram2DSeriesViewBase.Indicators property.

The view type of the series to which a Trend Line is assigned is returned by the Indicator.View 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.

Since a Trend Line must be drawn across two points, its two properties should be appropriately defined: FinancialIndicator.Point1 and FinancialIndicator.Point2. In turn, for each of these points you should define its argument (via the FinancialIndicatorPoint.Argument property) and value level (via the FinancialIndicatorPoint.ValueLevel property). For series view types supporting only a single value, the FinancialIndicatorPoint.ValueLevel property has the Value setting only.

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.Color and Indicator.LineStyle properties.

Expanded Draw a Trend Line

To access the collection of indicators for a series at design time, select the series, and in the Properties window, expand its SeriesBase.View property, and click the ellipsis button for the XYDiagram2DSeriesViewBase.Indicators property.

In the invoked Indicators dialog, click the Add... button, and in the invoked Indicator Type dialog, choose Trend Line, and click OK.

After a Trend Line is created, you can define its properties in the Indicators dialog: FinancialIndicator.Point1, FinancialIndicator.Point2 and other properties.

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

Expanded See Also

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