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?
Setting Series Color
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi marathoner,
You can do this:
In VC++ there are no color constants that I know of.
You can do this:
Code: Select all
m_Chart1.Series(0).SetColor(RGB(255,0,0));
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 35
- Joined: Wed Dec 12, 2007 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi marathoner,
This is a GDI method. If you have a look at its MSDN Library entry you'll find something like this:
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 |
Instructions - How to post in this forum |