Page 1 of 1

ShowInLegend changes Series Color

Posted: Fri Apr 26, 2013 11:09 am
by 15664334
When I create a series with the following code I get a LimeGreen series in my Polar Chart as exptected:

Code: Select all

            mCircleSeries = new Steema.TeeChart.Styles.Polar();
            mCircleSeries.Color = Color.LimeGreen;
            mCircleSeries.Pointer.Visible = false;
            mCircleSeries.Circled = true;
            mCircleSeries.RotationAngle = 90;
            mCircleSeries.Brush.Visible = false;
Then I change the code to the following so the series does not show in the legedn:

Code: Select all

            mCircleSeries = new Steema.TeeChart.Styles.Polar();
            mCircleSeries.ShowInLegend = false;    // <-- this line added
            mCircleSeries.Color = Color.LimeGreen;
            mCircleSeries.Pointer.Visible = false;
            mCircleSeries.Circled = true;
            mCircleSeries.RotationAngle = 90;
            mCircleSeries.Brush.Visible = false;
Now my series is not displayed in LimeGreen anymore but in black! Does the ShowInLegend property change the color? Why? And how can I get a green line series that is not shown in the legend?

Re: ShowInLegend changes Series Color

Posted: Fri Apr 26, 2013 2:58 pm
by 10050769
Hello hb-dru,

I have made a simple code that works in correct way.

Code: Select all

   private void InitializeChart()
        {
            Steema.TeeChart.Styles.Polar mCircleSeries = new Steema.TeeChart.Styles.Polar(tChart1.Chart);
            mCircleSeries.FillSampleValues();
            mCircleSeries.ShowInLegend = false; 
            mCircleSeries.Color = Color.LimeGreen;
            mCircleSeries.Pen.Color = Color.LimeGreen; 
            mCircleSeries.Pointer.Visible = false;
            mCircleSeries.Circled = true;
            mCircleSeries.RotationAngle = 90;
            mCircleSeries.Brush.Visible = false;
        }
As you see in the code, you only need change the color of Series Pen using the color as you want. Could you confirm us if previous code works in your end?

I hope will helps.


Thanks,