Click here to Skip to main content
15,936,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

How can I change the series of a win form
bar chart using coding?

Rajesh Anuhya 1-Feb-12 6:02am    
Not clear
Ben Paxton 1-Feb-12 6:04am    
The bars in my chart (The series) how can I change the color of that using coding?
Slacker007 1-Feb-12 6:16am    
Ben - Usually a good question will get a good answer. If you want, you could edit your question so that it shows some code snippets where you might be having the problem or you could be a little more descriptive with your question. Just a thought. ;)
Ben Paxton 1-Feb-12 6:21am    
I do not have any coding to upload for this question, thats what i'm looking for. And I simply just need to change a property of the chart(Color property) using code
Sergey Alexandrovich Kryukov 1-Feb-12 6:23am    
The answer is clear enough to me -- I know the universal answer which does not need clarification. Want to see it?

There is one universal way. The question implies that you know how to do "non-programmatically". The thing is: there is nothing which is done "not dynamically", "not programmatically", "not during run time".

So, what happens is: you probably know how to do it using the Designer. But the Designer does not do anything except writing some code for your. Look at you form's node in the Solution Explorer. There is a auto-generated C# file in a child node. This is what was generated by the Designer and what will be called from your form's constructor during run time.

Just open this file and learn how to modify the property you need, as well as everything else.

Share this answer
Sridhar Patnayak 1-Feb-12 6:42am    
Good explanation, Me to 5+
Sergey Alexandrovich Kryukov 1-Feb-12 6:49am    
Thank you, Sridhar.

The question is not clear, But I can share you the complete reference about charts in c# win forms[^]

I think this link helpful to you

Share this answer
Sergey Alexandrovich Kryukov 1-Feb-12 6:27am    
Good to know, my 5, but I know more universal way which maybe doable without documentation.

Want to see it? Please see my answer.
Sridhar Patnayak 1-Feb-12 6:40am    
Agree with you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900