aruni Posted March 17, 2008 Report Share Posted March 17, 2008 Hi, I am using ChartFX for displaying a line chart. As I need to dispaly a trend line based on these series we purchased the ChartFX extension pack. How can I add the trend line to the existing chart programmatically? Regards, Quote Link to comment Share on other sites More sharing options...
Frank Posted March 17, 2008 Report Share Posted March 17, 2008 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. Quote Link to comment Share on other sites More sharing options...
aruni Posted March 24, 2008 Author Report Share Posted March 24, 2008 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, Quote Link to comment Share on other sites More sharing options...
Frank Posted March 24, 2008 Report Share Posted March 24, 2008 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. Quote Link to comment Share on other sites More sharing options...
aruni Posted March 25, 2008 Author Report Share Posted March 25, 2008 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, Quote Link to comment Share on other sites More sharing options...
aruni Posted March 25, 2008 Author Report Share Posted March 25, 2008 Hi, One more clarification. If I am having more than 1 series in the chart and I want to show the trend line base on one series only. How can I do that? Regards, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.