Jump to content
Software FX Community

Multiple colors for Each Statistic Trendline?


AxelisAlex

Recommended Posts

Hi All,

 

Would like to ask for help here, as I'm lost on this. :(

 I'm adding a Polynomial Regression line to my chart, with mutiple series on a scatter chart.

When code is added, the polynomial regression line does show, but all in the same color, when I cahnge the color, the whole set of lines is that same color.

 I would like to make it so that each line is following that series' color.

 

Sample code as below:

Statistics statistics = new Statistics();

                    statistics.Chart = trendChart;

                    for (int i = 0; i < trendChart.Series.Count; i++)

                    {

                        StudyPolynomialRegression regressionLine = new StudyPolynomialRegression();

                        regressionLine = new StudyPolynomialRegression();

                        regressionLine.Line.Color = trendChart.Series.Color;

                        regressionLine.Visible = true;

                        statistics.Studies.Add(regressionLine);

                    } 

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.

×
×
  • Create New...