Coloring series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Anthony
Newbie
Newbie
Posts: 35
Joined: Wed Feb 25, 2004 5:00 am
Location: WL| Delft Hydraulics, Holland
Contact:

Coloring series

Post by Anthony » Wed Jan 12, 2005 1:47 pm

Hi,

I tried to customize the color of my series, but for some reason I always see the predefined default colors.

MY code looks like:
line = new Steema.TeeChart.Styles.Line();
line.LinePen.Color = Color.Red;
tChart1.Series.Add(line);

Now I expect alle series to be red, but alas .. default colors again.

Any idea what might be wrong.

Thanks,
Antoon Koster
WL|Delft Hydraulics
Netherlands

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

Post by Narcís » Wed Jan 12, 2005 3:00 pm

Hi Antoon,

Yes, you can use:

Code: Select all

line.Color=Color.Red;
You can also set your series point color when adding values using:

Code: Select all

tChart1.Series[0].Add(2, Color.Green);
tChart1.Series[0].Add(3, Color.Green);
tChart1.Series[0].Add(1, Color.Green);
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

Anthony
Newbie
Newbie
Posts: 35
Joined: Wed Feb 25, 2004 5:00 am
Location: WL| Delft Hydraulics, Holland
Contact:

Post by Anthony » Thu Jan 13, 2005 7:09 am

Hi,

Great, It works ....

Last question, I would like to have the lines of my series a little but thicker.

How can I set the thickness of my lines.

I tried with the code:

line.LineHeight = 10; // vertical thickness of the line in pixels

but it did not work.

Some help would be nice.

Thanks,
Antoon Koster
Netherlands

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

Post by Narcís » Thu Jan 13, 2005 9:27 am

Hi Antoon,

This will depend on if you are using 3D or 2D view.

For 2D view use:

Code: Select all

line.LinePen.Width=3;
For 3D view use:

Code: Select all

line.LineHeight = 3;
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