rms2219 Posted January 19, 2010 Report Share Posted January 19, 2010 Hello...I have 3 series on a chart. The 3rd series is attached to a second Y-Axis like so: laborCategoryChart.Data.Series = 3; AxisY profitAxis = new AxisY(); profitAxis.Visible = true; profitAxis.Position = AxisPosition.Far; profitAxis.ForceZero = false; laborCategoryChart.AxesY.Add(profitAxis); laborCategoryChart.Series.AxisY = profitAxis; laborCategoryChart.Series.Text = "Profitability"; laborCategoryChart.Series.Gallery = Gallery.Lines; Now, my problem is that I need to add a regression line to that 3rd series. I attempt to do this like this: Statistics stats = new Statistics(); stats.Studies.Add(Analysis.RegressionLine); stats.Chart = engChart; stats.SelectedSeries = 3; StudyLine study = (StudyLine)stats.Studies.Find(StudyType.Analysis, (int)Analysis.RegressionLine); study.Text = "Trend line"; study.Line.Color = System.Drawing.Color.DarkOrange; study.Line.Width = 3; study.Line.Style = System.Drawing.Drawing2D.DashStyle.Solid; study.Bold = true; study.Visible = true; study.Behind = false; The problem is that it always just creates a regression line for the 2nd series (the last series on the first Y-Axis). It seems like the statistic analysis is only does on the first Y-Axis instead of the second. Please help. Quote Link to comment Share on other sites More sharing options...
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.