Jump to content
Software FX Community

Trend Lines


Visual1
 Share

Recommended Posts

Hi ..

Im a newbie to chartfx..iv been searching through the documentation and havent found anything with reference to creating a trendline on the charts...

does chartfx for visual studio 2005 (webforms) come with any in built capabilities to add trend lines to the charts (like MS excel i guess...) ?

Cheers

Link to comment
Share on other sites

One more question...is there any way to control the rendering of the distance between points in a line chart ? If i wanted to control the distance between two points and vary that from point to point ...would that be possible ?

The reason i wanna do this is cause, im trying to render a gridview of date columns with a chart on its top...and every point on the chart should be exactly on top of the gridview column with that date.... so would such an alignment between the .net gridview columns and the chart points be possible ?

Sound difficult but if thats possible.. then chartfx ...take a bow !

Link to comment
Share on other sites

1) Trend lines (linear regression) is part of the Chart FX Statistical extension.

2) X/Y charts allow you to assign independent X and Y values to each point. To set X values, you can either use the Fields collection in the DataSourceSettings property if you are using databinding, or the Chart.Data.X property if you are passing the data using the API.

Link to comment
Share on other sites

Ok Frank, iv got the statistical analysis tool, and am now able to plot the trend lines...but...

when i try to plot the trend line, the series line disaapears and is replaced by scatter dots. I need my series line intact, is that not possible ?

Also my trend line gives a tool tip which i dont want...is there a way to supress it ?

Cheers and thanks in advance

Link to comment
Share on other sites

In the statistical extension there are two ways of obtaining a trend line:

1) Selecting the LinearRegression gallery type. This will give you a Scatter chart with a trend line.

2) Adding the linear regression study to the chart.

You seemed to have tried option one.

To add a trend line to any chart type, do:

InteractiveStudy trendLine = (InteractiveStudy) statistics1.Studies.Add(Analysis.RegressionLine);

trendLine.Visible = true;

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...