Help In Assigning a color for a value in a Pie Chart

G

Gary

I have a Pie Chart with 2 items only (R or P). R is a dark color and P is a
light color. When There isn't any P in my data, the chart picks the light
color for R.

I would like to always have a dark color for R and a light color or P.

I am doing the chart in MS Access 2000-03 and my row source is:

SELECT [RP],Sum([Freq]) AS [SumOfFreq] FROM [Rept#704_Joint_RP] GROUP BY
[RP];

Can someone please help me.


Thanks,

Gary
 
D

Duane Hookom

Typically the easiest solution is to use a LEFT or RIGHT JOIN query to
include all values of RP.

If that doesn't work, you can use code in the On Format event of the section
of the report that contains the chart. I generally record code in Excel and
then paste it into Access. This requires a few code updates in Access.
 
G

Gary

Thank You, but I don't completely understand what you are telling me.

1) The the Left or Right Joint query, you indicated include all values of
RP.

For me, the problem occurs when only R is present and not P is present.
The chart takes on the light color in this case. Normally, when I have both
R and P occuring, the P takes the light color and the R takes the dark color.

How would I use the Right and Left Joint query ???


2) For the on Format, do you have more information on this?? I do know
VBA and its no issue for me to use VBA code, but your solution I don't
understand what to so. Any reference or an example from some where ??


Thank You,


Gary



Duane Hookom said:
Typically the easiest solution is to use a LEFT or RIGHT JOIN query to
include all values of RP.

If that doesn't work, you can use code in the On Format event of the section
of the report that contains the chart. I generally record code in Excel and
then paste it into Access. This requires a few code updates in Access.

--
Duane Hookom
Microsoft Access MVP


Gary said:
I have a Pie Chart with 2 items only (R or P). R is a dark color and P is a
light color. When There isn't any P in my data, the chart picks the light
color for R.

I would like to always have a dark color for R and a light color or P.

I am doing the chart in MS Access 2000-03 and my row source is:

SELECT [RP],Sum([Freq]) AS [SumOfFreq] FROM [Rept#704_Joint_RP] GROUP BY
[RP];

Can someone please help me.


Thanks,

Gary
 
D

Duane Hookom

The query is a left or right join. Assuming you have a table or query with
just two records with R and P as records. Add this to your Row Source and
join the R and P field with RP. Then double-click the join line and select
the option that includes all the records from the R and P table.

--
Duane Hookom
Microsoft Access MVP


Gary said:
Thank You, but I don't completely understand what you are telling me.

1) The the Left or Right Joint query, you indicated include all values of
RP.

For me, the problem occurs when only R is present and not P is present.
The chart takes on the light color in this case. Normally, when I have both
R and P occuring, the P takes the light color and the R takes the dark color.

How would I use the Right and Left Joint query ???


2) For the on Format, do you have more information on this?? I do know
VBA and its no issue for me to use VBA code, but your solution I don't
understand what to so. Any reference or an example from some where ??


Thank You,


Gary



Duane Hookom said:
Typically the easiest solution is to use a LEFT or RIGHT JOIN query to
include all values of RP.

If that doesn't work, you can use code in the On Format event of the section
of the report that contains the chart. I generally record code in Excel and
then paste it into Access. This requires a few code updates in Access.

--
Duane Hookom
Microsoft Access MVP


Gary said:
I have a Pie Chart with 2 items only (R or P). R is a dark color and P is a
light color. When There isn't any P in my data, the chart picks the light
color for R.

I would like to always have a dark color for R and a light color or P.

I am doing the chart in MS Access 2000-03 and my row source is:

SELECT [RP],Sum([Freq]) AS [SumOfFreq] FROM [Rept#704_Joint_RP] GROUP BY
[RP];

Can someone please help me.


Thanks,

Gary
 

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