Visual1 Posted July 2, 2007 Report Share Posted July 2, 2007 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 Quote Link to comment Share on other sites More sharing options...
Visual1 Posted July 2, 2007 Author Report Share Posted July 2, 2007 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 ! Quote Link to comment Share on other sites More sharing options...
Frank Posted July 3, 2007 Report Share Posted July 3, 2007 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. Quote Link to comment Share on other sites More sharing options...
Visual1 Posted July 4, 2007 Author Report Share Posted July 4, 2007 Thanks Frank. That helps. I meant something else on my second point though. Cheers Quote Link to comment Share on other sites More sharing options...
Visual1 Posted July 4, 2007 Author Report Share Posted July 4, 2007 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 Quote Link to comment Share on other sites More sharing options...
Frank Posted July 4, 2007 Report Share Posted July 4, 2007 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; 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.