Solved

controlling colors in a pie chart

Posted on 2001-07-28
4
252 Views
Last Modified: 2008-07-03
I want to create a pie chart that uses green to represent "low" values, yellow for "mod", and red for "high". Is there a way to do this?  A bar chart will do also.

Thanks,
jptu
0
Comment
Question by:jptu
4 Comments
 
LVL 4

Expert Comment

by:MacRena
ID: 6331152
Hello jptu,

First of all, I have never seen pie or bar charts native to Access.
I am not saying it can't be done, but I would export my data to Excel and use the charting that is native to that app.

But if I HAD to do it in Access, I can't think of a way to make a Pie, but if I were going to create a bar chart, I would design a Report with a Frame fraBackDrop (for background contrast)
with a Width = 6"
with a BackColor = Grey

Then put 3 textboxes on it.
txtFirst, txtSecond, and txtThird and place them on the Frame in the configuration that you would like them to appear on the Report.

Then in the Report's Open code I would test the value that you want each textbox to represent, and change their Width and BackColor properties accordingly.

This was a cool one to think through!  Thanks,
Mac
0
 
LVL 2

Expert Comment

by:hotbudare
ID: 6331503
I can't do nothing but give u a starting point. Assumig u r using A2K and that u name your pie chart PieChart, u could add code like the following in the Updated event of PieChart, after adding a reference to "Microsoft Graph 9.0 Object Library":

Dim g As Graph.Chart
Set g = Me.PieChart.Object
Stop

From this point on you'll have to experiment. I did try to and had to quit, but I'm sure this is the right track ...

Also, maybe asking in the Microsoft Office Topic Area(http://www.experts-exchange.com/jsp/qList.jsp?ta=msoffice) might help too ...

HTH/EQTA
T.S.U. Mario Osorio
Punto Fijo, Falcon, Venezuela

0
 
LVL 1

Accepted Solution

by:
TheNextStep earned 5 total points
ID: 6334687
In the record source for the graph, sort the values in ascending order to arrange them from lowest to highest.

Next, double click on the graph in design view to open Microsoft Graph 8.0 screen.  A pie chart will appear with a datasheet window.  You can change the colors of the pies by right clicking, and selecting format data point.  If there are not enough pies in the pie chart, add rows to the datasheet.

Your data will appear in the chart lowest to highest with the lowest value at 12 o'clock and the highest value at 11 o'clock.
0
 

Author Comment

by:jptu
ID: 6338936
TheNextStep- thank you!  It works beautifully.

-jptu
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 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