ShowInLegend changes Series Color

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
hb-dru
Newbie
Newbie
Posts: 5
Joined: Fri Dec 07, 2012 12:00 am

ShowInLegend changes Series Color

Post by hb-dru » Fri Apr 26, 2013 11:09 am

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?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: ShowInLegend changes Series Color

Post by Sandra » Fri Apr 26, 2013 2:58 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply