Page 1 of 1

Coloring series

Posted: Wed Jan 12, 2005 1:47 pm
by 9080952
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

Posted: Wed Jan 12, 2005 3:00 pm
by narcis
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);

Posted: Thu Jan 13, 2005 7:09 am
by 9080952
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

Posted: Thu Jan 13, 2005 9:27 am
by narcis
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;