• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Conditional formatting for pie chart

dronka

Member
I have a pie chart that references a set of data. I would like each wedge in the chart to automatically take on the color of the cell that it pulls from. E.g. If my data series is 1,4,3,5,8, and each wedge corresponds to one of those numbers, if the cell with "3" in it is green, I want the corresponding pie wedge to be green. Is there a way to do that?
 
Not very easily.

Is the colors of the numbers constant, or are they themselves conditionally formatted? If the latter, we'd want to build the formatting of the chart series to match. To do this, we'll need to write a VB script to loop through all the series of your chart and color them correctly, based on conditions that are pre-defined. So again, doable, but it's going to take some work.


Also, I would recommend choosing a different chart type. Pie charts are usually good for 2-3 series/data points. Beyond that, it becomes very difficult for the human eye to make good comparisons based on floating angles. A bar chart would mostly likely be your best alternative.
 
Thank you for your response, Luke. I'm creating the pie chart as an icon to use in a document in order to designate the percentage of time spent on certain activities.


The numbers themselves are all black.


Creating a VB script sounds very complicated, especially since I'm creating about 200 pie charts... I was hoping for a quick and easy way to do it.
 
Hi David ,


Check the file here :


https://www.dropbox.com/s/7rspo4zqmqj5cwu/David_Chart.xlsm


This cannot take care of charts based on data whose cells have been conditionally formatted.


Narayan
 
Back
Top