How to change the color of a line series?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Thinkpower
Newbie
Newbie
Posts: 11
Joined: Tue Feb 19, 2013 12:00 am

How to change the color of a line series?

Post by Thinkpower » Wed Mar 12, 2014 2:37 am

Hi, I'm using Xamarin to build an android project.
I have one chart with two series, line and volume, but only the color of volume can be changed by following code.

Code: Select all

line1.LinePen.Color = Color.Yellow;

volume1.LinePen.Color = Color.MediumOrchid;
Please help!

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: How to change the color of a line series?

Post by Narcís » Wed Mar 12, 2014 9:40 am

Hi benlu,

That's because Line series has two elements from which you can change the color: pen and brush. In a 3D chart both of them are visible so you need to set brush color this way:

Code: Select all

      line1.LinePen.Color = Color.Yellow;
      line1.Brush.Color = line1.LinePen.Color;
or this:

Code: Select all

      line1.Color = Color.Yellow;
Best Regards,
Narcís Calvet / 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