Solved

controlling colors in a pie chart

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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

726 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