Solved

controlling colors in a pie chart

Posted on 2001-07-28
4
248 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now