Jump to content
Software FX Community

How to add a trend line to an existing chart?


aruni
 Share

Recommended Posts

The statistical extension provides trend-line functionality.

You simply need to:

1) Add the extension to the chart (either pragmatically or at design-time)

2) Add a LinearRegression study.

Examples of this can be found in the Statistical Extension documentation.

Link to comment
Share on other sites

Hi,

Thanks for the reply. 

As mentined I am having a LINE chart which dispalys data for 6 months.

Now I need to add a TREND LINE for the same as you are adding it in Microsoft Excel.

Even if I bind the Chart to the financial it changes my chart.

Appreciate if you can guide me how to add the trend line to a normal simple line chart.

 

Regards,

 

 

Link to comment
Share on other sites

Like I sai in my previous posting, you need to use the  statistical extension (not the financial extension).

To add the trendline you simply do:

StudyInteractive study = (StudyInteractive) statistics.Studies.Add(Analysis.RegressionLine);

study.Visible =

true;There is extensive documentation (includding this code) about the statistical extension included with the product.
Link to comment
Share on other sites

Hi Francisco,

 

Thanks a lot for the reply. I just copied your code and I think it's working fine. I will dig into it more.

You have done a great help for me.

But unfortunatly I didn't find any code related to the same in the documentation.

[Appreciate if you can tell me the place that I should lookinto]

Regards,

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...