[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
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Collapse]Charts Suite
   [Collapse]Chart Control
    [Expand]Getting Started
    [Expand]Fundamentals
    [Expand]Providing Data
    [Collapse]Chart Elements
     [Expand]Diagram
     [Collapse]Series
       Series Points
       Series Point Labels
      [Collapse]Indicators
       [Collapse]Simple Indicators
         Trend Lines
         Regression Lines
        Moving Average and Envelope
        Fibonacci Indicators
        Oscillator Indicators
        Trend Indicators
        Price Indicators
        Error Bars
       Series Titles
       Total Labels
      Panes
     [Expand]Axes
      Legends
      Chart Titles
      Annotations
    [Expand]Appearance Customization
    [Expand]End-User Features
    [Expand]Design-Time Features
    [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]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [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 and Dashboard 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

A Trend Line is an indicator presented by a line drawn through two data points of a Series.

Expanded How to Add a Trend Line to a Chart

The following markup shows how to add two trend lines to a chart:

The table lists classes and properties required to draw trend lines:

Class or Property Description
XYSeries2D.Indicators The series collection of indicators.
TrendLine A trend line.
FinancialIndicator.Argument1 The argument of the first point.
FinancialIndicator.ValueLevel1 The value level of the first point.
FinancialIndicator.Argument2 The argument of the second point.
FinancialIndicator.ValueLevel2 The value level of the second point.
TrendLine.ExtrapolateToInfinity Specifies whether the trend line is extrapolated to infinity.
Indicator.LegendText Text that is displayed with an indicator's marker in a legend.
Indicator.ShowInLegend Specifies whether an indicator is represented in a legend.
Tip

Set the Indicator.Visible property to false when you need to hide a trend line on a chart without its removal from the Indicators collection.

Note

To learn more about the common indicator settings, examine the Indicators help document.

A Trend Line is an indicator presented by a line drawn through two data points of a Series.

Expanded How to Add a Trend Line to a Chart

The following markup shows how to add two trend lines to a chart:

The table lists classes and properties required to draw trend lines:

Class or Property Description
XYSeries2D.Indicators The series collection of indicators.
TrendLine A trend line.
FinancialIndicator.Argument1 The argument of the first point.
FinancialIndicator.ValueLevel1 The value level of the first point.
FinancialIndicator.Argument2 The argument of the second point.
FinancialIndicator.ValueLevel2 The value level of the second point.
TrendLine.ExtrapolateToInfinity Specifies whether the trend line is extrapolated to infinity.
Indicator.LegendText Text that is displayed with an indicator's marker in a legend.
Indicator.ShowInLegend Specifies whether an indicator is represented in a legend.
Tip

Set the Indicator.Visible property to false when you need to hide a trend line on a chart without its removal from the Indicators collection.

Note

To learn more about the common indicator settings, examine the Indicators help document.

Expanded See Also

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