[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Changing the color in MS chart

Posted on 2004-10-27
7
Medium Priority
?
390 Views
Last Modified: 2012-06-27
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
Comment
Question by:kevinmeredith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 6

Expert Comment

by:The_Biochemist
ID: 12428019
you cuold try

AXMSChart1.forecolor =  System.Drawing.Color.Red

that should work
0
 

Author Comment

by:kevinmeredith
ID: 12433694
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
 
LVL 6

Expert Comment

by:The_Biochemist
ID: 12439924
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:kevinmeredith
ID: 12443837
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
 

Author Comment

by:kevinmeredith
ID: 12444302
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
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12574154
Closed, 150 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question