Saran Posted May 30, 2008 Report Share Posted May 30, 2008 Hi All, I need to assign color codes like below.But it is throwing some errors how to achieve this. Chart1.Points[0].Color = CodeValue.'#559DAB'; Quote Link to comment Share on other sites More sharing options...
Frank Posted May 30, 2008 Report Share Posted May 30, 2008 The Color property is of type System.Drawing.Color. Check the .NET framework documentation (Color structure) for details about creating colors from various formats. Quote Link to comment Share on other sites More sharing options...
Saran Posted June 2, 2008 Author Report Share Posted June 2, 2008 Hi Frank, I need to assign the RGB values of the color codes for a particular color like the code below: Chart1.Points[0].Color = System.Drawing.Color.FromArgb(93, 162, 177); Chart1.Points[1].Color = System.Drawing.Color.FromArgb(120, 203, 195); Chart1.Points[2].Color = System.Drawing.Color.FromArgb(194, 199, 179); Chart1.Points[3].Color = System.Drawing.Color.FromArgb(135, 199, 211); Quote Link to comment Share on other sites More sharing options...
Frank Posted June 2, 2008 Report Share Posted June 2, 2008 This code looks fine. Is it not working? If this is not working I need a sample app that reproduces the problem. This code on its own works perfectly (I just tested it) so the problem (if any) is related to the context in which you are doing this. A wild guess: If you are using conditional attributes the per-point attributes will be wiped-out according to the conditions. Are you using conditional attributes? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.