Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Providing Data
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Collapse]Examples
    [Expand]General
    [Expand]Creating Charts
    [Collapse]Chart Elements
      How to: Add Titles to a Chart
      How to: Enable Word Wrapping for Chart Titles
      How to: Create a Multi-Pane Chart
      How to: Display a Series in an Additional Pane (Runtime Sample)
      How to: Display Automatically Created Series in Separate Panes
      How to: Add a Title to an Axis
      How to: Determine whether an Axis Title is Being Hovered by the Mouse Pointer
      How to: Add Secondary Axes to a Chart
      How to: Customize an Axis Range
      How to: Create Custom Axis Labels
      How to: Individually Customize Axis Labels
      How to: Add a Constant Line to an Axis
      How to: Add a Strip to an Axis
      How to: Enable Automatic Scale Breaks for an Axis
      How to: Manually Insert a Scale Break into an Axis
      How to: Manually Insert a Scale Break into an Axis (Runtime Sample)
      How to: Show Numerical Data Using a Logarithmic Scale
      How to: Add a Trend Line to a Chart
      How to: Add a Fibonacci Indicator to a Chart
      How to: Add a Fibonacci Indicator to a Chart (Runtime Sample)
      How to: Show a Regression Line for a Stock Chart
      How to: Show a Regression Line for a Stock Chart (Runtime Sample)
      How to: Plot the Fixed Value Error Bars Indicator on a Chart
      How to: Plot the Standard Error Bars Indicator on a Chart
      How to: Plot the Percentage Error Bars Indicator on a Chart
      How to: Plot the Standard Deviation Error Bars Indicator on a Chart
      How to: Plot the Data Source Based Error Bars Indicator on a Chart
      How to: Create Custom Legend Radio Buttons to Control Visibility of a Chart Series
      How to: Create an Image Annotation Anchored to a Chart or Pane
      How to: Add an Annotation at Runtime
      How to: Create a Text Annotation Anchored to a Series Point
      How to: Add an Additional Legend to a Chart
      How to: Add a Legend Title
      How to: Add a Custom Legend Item
    [Expand]End-User Interaction
    [Expand]Producing Output
   [Expand]Additional Resources
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap 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]Document Server
[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

How to: Show a Regression Line for a Stock Chart

This tutorial demonstrates how linear regression analysis can be applied to a chart's visual data at design time. For general information, see Regression Lines.

To show a Regression Line for a Stock chart follow the steps below.

  1. Create a new or open an existing Stock chart. For this example we will use the following chart.

  2. Select the series in the Property Grid, expand its SeriesBase.View property and click the ellipsis button for the XYDiagram2DSeriesViewBase.Indicators property.

    In the invoked Indicators dialog, click the Add... button.

  3. Then, in the Indicator Type dialog, choose Regression Line and click OK.

  4. Now, back in the Indicators dialog, you can specify the Regression Line's SingleLevelIndicator.ValueLevel and other options.

The result is shown in the following image.

Note that as with other indicators, all Regression Lines that exist in a chart are painted based on the palette defined via the ChartControl.IndicatorsPaletteName property.

Expanded See Also

How would you rate this topic?​​​​​​​