[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 391
  • Last Modified:

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 = forecolor.red

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

0
kevinmeredith
Asked:
kevinmeredith
  • 3
  • 2
1 Solution
 
The_BiochemistCommented:
you cuold try

AXMSChart1.forecolor =  System.Drawing.Color.Red

that should work
0
 
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???
0
 
The_BiochemistCommented:
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
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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!

0
 
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!
0
 
moduloCommented:
Closed, 150 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now