co_lcruz@axtel.com.mx Posted September 26, 2013 Report Share Posted September 26, 2013 Hi everyone, I'm try to set color to 3 bar series , chr1.Series(0).Color = System.Drawing.Color.FromArgb(100, 100, 200) chr1.Series(1).Color = System.Drawing.Color.FromArgb(184, 188, 255) chr1.Series(2).Color = System.Drawing.Color.FromArgb(1, 161, 153) however, my data contains more of 3 series, when try set color to serie 4: chr1.Series(3).Color = System.Drawing.Color.Azure I got this error: {"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"} Any advice, will be appreciated regards, Quote Link to comment Share on other sites More sharing options...
AndreG Posted September 26, 2013 Report Share Posted September 26, 2013 Try initializing the number of series first: chart1.Data.Series = 4; Quote Link to comment Share on other sites More sharing options...
co_lcruz@axtel.com.mx Posted September 26, 2013 Author Report Share Posted September 26, 2013 That's works, thanks, 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.