change graph data colors

C

Casey Brown

Hi! I have a VB6 project which involves inserting and manipulating an
MSGraph chart in PPT (XP).

My chart is always a pie chart. I am trying to set the pie segments to
different colors.

For Each sers In grph.SeriesCollection
sers.Points(1).Interior.Color = RGB(161, 61, 58)
sers.Points(2).Interior.Color = RGB(220, 130, 64)
sers.Points(3).Interior.Color = RGB(102, 51, 104)
sers.Points(4).Interior.Color = RGB(12, 38, 120)
Next sers

The problem is that the colors wind up being blues and black instead of the
ones I am specifying (a red, orange, purple, and blue, basically).
Interestingly, if i use simpler colors like RGB(255,0,0) and RGB(0,255,0),
they work fine.

If I Debug.Print ser.Points(1).Interior.Color after it gets set the result
is 10040115. The decimal notation for the color I am setting it to is
3816865. Why doesn't it get set correctly? Is there some other color
format I should be using?

Has anyone run into this before, and does anyone know how to get the pies to
be the colors I want? Any suggestions are most welcome.

Thanks in advance for your time!

-Casey
 
S

Steve Rindsberg

Bad you can't set colors in MSGraph other than to choose the existing
ones it provides.
It won't throw any errors but it'll ignore you or map to whatever it decides
is the closest color.
It simply won't allow you to choose arbitrary colors.

--
Posted to news://msnews.microsoft.com
Steve Rindsberg, PPT MVP
PowerPoint FAQ - www.pptfaq.com
PPTools - www.pptools.com
===============================
 
C

Casey Brown

Bugger! Thanks for the info, though, Steve. You (and others, of course)
make this by far the most helpful and friendly newsgroup I've come across!

Thanks!
-Casey
 
S

Steve Rindsberg

And you, sir, in turn keep us entertained with good questions. Don't be a
stranger and we won't be any stranger than we already are.
Stick around and you'll find that that's plenty strange enough already! :)

--
Posted to news://msnews.microsoft.com
Steve Rindsberg, PPT MVP
PowerPoint FAQ - www.pptfaq.com
PPTools - www.pptools.com
===============================
 
J

John Langhans [MSFT]

[CRITICAL UPDATE - Anyone using Office 2003 should install the critical
update as soon as possible. From PowerPoint, choose "Help -> Check for
Updates".]

Hello,

Microsoft Graph doesn't provide the functionality that you are looking for.

If you (or anyone else reading this message) think that it's important that
Microsoft Graph provide this kind of functionality, don't forget to send
your feedback (in YOUR OWN WORDS, please) to Microsoft at:

http://register.microsoft.com/mswish/suggestion.asp

Since the Excel group owns the development of the Graph utility, don't
forget to submit the wish as an Excel wish and not a PowerPoint wish so
that it is reviewed by the correct team.

As with all product suggestions, it's important that you not just state
your wish but also WHY it is important to you that your product suggestion
be implemented by Microsoft. Microsoft receives thousands of product
suggestions every day and we read each one but, in any given product
development cycle, there are only sufficient resources to address the ones
that are most important to our customers so take the extra time to state
your case as clearly and completely as possible.

IMPORTANT: Each submission should be a single suggestion (not a list of
suggestions)

John Langhans
Microsoft Corporation
Supportability Program Manager
Microsoft Office PowerPoint for Windows
Microsoft Office Picture Manager for Windows

For FAQ's, highlights and top issues, visit the Microsoft PowerPoint
support center at: http://support.microsoft.com/default.aspx?pr=ppt
Search the Microsoft Knowledge Base at:
http://support.microsoft.com/default.aspx?pr=kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top