Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
fixing pie chart colors depending upon value ?
This is really about using an excel chart inside an access report but nobody
in microsoft.access.reports seems to know the answer. Using a grouped field in a database I end up with two values per record showing the number of 'goods' and the number of 'bads' The pie chart plots these two numbers. I want the 'good' slice always to be green and the 'bad' slice always to be red. Setting the format worked OK until I had 7 goods and zero bads, then the whole chart was red instead of green. Any idea how I can fix this? Howard |
#2
Posted to microsoft.public.excel.charting
|
|||
|
|||
fixing pie chart colors depending upon value ?
The technique described in this blog post will work on any chart type that
uses a fill color: http://peltiertech.com/WordPress/200...ategory-label/ - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Howard" wrote in message ... This is really about using an excel chart inside an access report but nobody in microsoft.access.reports seems to know the answer. Using a grouped field in a database I end up with two values per record showing the number of 'goods' and the number of 'bads' The pie chart plots these two numbers. I want the 'good' slice always to be green and the 'bad' slice always to be red. Setting the format worked OK until I had 7 goods and zero bads, then the whole chart was red instead of green. Any idea how I can fix this? Howard |
#3
Posted to microsoft.public.excel.charting
|
|||
|
|||
fixing pie chart colors depending upon value ?
Thanks, That didn't quite do it but it pointed me in the right direction. In
case anyone else wants to know how to do it this code finally worked. Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer) Dim v As Variant v = Me.chart1.SeriesCollection(1).Points.Item(1).DataL abel.Text If UCase(Left(v, 1)) = "B" Then 'label starts with B - the bad slice, make it red Me.chart1.SeriesCollection(1).Points.Item(1).Inter ior.Color = RGB(255, 0, 0) Else 'the good slice, make it green Me.chart1.SeriesCollection(1).Points.Item(1).Inter ior.Color = RGB(0, 255, 0) End If End Sub "Jon Peltier" wrote in message ... The technique described in this blog post will work on any chart type that uses a fill color: http://peltiertech.com/WordPress/200...ategory-label/ - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Howard" wrote in message ... This is really about using an excel chart inside an access report but nobody in microsoft.access.reports seems to know the answer. Using a grouped field in a database I end up with two values per record showing the number of 'goods' and the number of 'bads' The pie chart plots these two numbers. I want the 'good' slice always to be green and the 'bad' slice always to be red. Setting the format worked OK until I had 7 goods and zero bads, then the whole chart was red instead of green. Any idea how I can fix this? Howard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reset the colors in a chart | Charts and Charting in Excel | |||
Create a chart depending on different criteria | Charts and Charting in Excel | |||
static colors in chart chart | Charts and Charting in Excel | |||
fixing a maximum chart value | Charts and Charting in Excel | |||
How to get excel cells to change colors depending on value | Excel Worksheet Functions |