Jump to content
Software FX Community

Trend Lines


Visual1

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...