Changing the color in MS chart

I know this is an easy question but i need to know.  
I'm using MS Chart for a bar graph.  I need to change the color of the series in the middle of the program.  How would i do that?  i've been trying to do it like this.

AXMSChart1.forecolor =

but that doesn't change the bar part.  any ideas.  thanks!

Who is Participating?
Closed, 150 points refunded.

Community Support Moderator
Experts Exchange
you cuold try

AXMSChart1.forecolor =  System.Drawing.Color.Red

that should work
kevinmeredithAuthor Commented:
Thanks for the idea BioChemist, but that didn't work.  I need to change the fill color i think but i dont' know.  any other ideas???
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Now that was an absolute nightmare trying to find!

1) What you have to do is change the backdrop property using a brush adapter setting iot to fill and then setting the color in RGB format (255,255,255) = white
2) Then you have to set the fill style to use a specific brush!

But here it is, all you have to do is choose your color and work out the RGB value or just plau around changing the 255s to other numbers!

        With AxMSChart1
            .Backdrop.Fill.Brush.FillColor.Set(255, 255, 255)
            .Backdrop.Fill.Style = MSChart20Lib.VtFillStyle.VtFillStyleBrush
        End With
kevinmeredithAuthor Commented:
Thanks so much Bio, but that is still not what I am looking for. (but it is usefull i will use it in the future).  What i am looking for is to change the data series color on the graph.  The default is green and i want to change it to red in the middle of my program.  Sorry if i were confusing the first couple posts.  I really appreicate all your help on this too!

kevinmeredithAuthor Commented:
I found what i was looking for.  the code is right here

            AxMSChartMainHeL.Plot.SeriesCollection(1).DataPoints(-1).Brush.FillColor.Set(255, 0, 0)

Thanks for all your help Bio!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.