Setting Series Color

TeeChart for ActiveX, COM and ASP
Post Reply
marathoner
Newbie
Newbie
Posts: 35
Joined: Wed Dec 12, 2007 12:00 am

Setting Series Color

Post by marathoner » Thu Mar 13, 2008 4:12 pm

How do I specifically set the color of the lines in a series? Suppose I want to set the color of the lines to red, or blue, or any color, how do I do that?

Is there a specific constant for each different color?

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

Post by Narcís » Fri Mar 14, 2008 8:33 am

Hi marathoner,

You can do this:

Code: Select all

	m_Chart1.Series(0).SetColor(RGB(255,0,0));
In VC++ there are no color constants that I know of.
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

marathoner
Newbie
Newbie
Posts: 35
Joined: Wed Dec 12, 2007 12:00 am

Post by marathoner » Fri Mar 14, 2008 11:21 am

What is the meaning of RGB(255,0,0)?

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

Post by Narcís » Fri Mar 14, 2008 11:37 am

Hi marathoner,

This is a GDI method. If you have a look at its MSDN Library entry you'll find something like this:
RGB
The RGB macro selects a red, green, blue (RGB) color based on the arguments supplied and the color capabilities of the output device.

COLORREF RGB(
BYTE byRed, // red component of color
BYTE byGreen, // green component of color
BYTE byBlue // blue component of color
);
Parameters
byRed
Specifies the intensity of the red color.
byGreen
Specifies the intensity of the green color.
byBlue
Specifies the intensity of the blue color.
Return Values
The return value is the resultant RGB color as a COLORREF value.
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