web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Set Default Colors for Piechart

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a dropdown list with 4 values, is it possible in a chart to set colors against those values . For example if I have a dropdown list of car, truck, bus, bike, the colors would be red, green, yellow, blue. So the colors would only appear if there was data for each value in the dropdown list.

Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    You can refer to this blog for more information.

    crmchartguy.wordpress.com/.../colors-in-charts

  • Verified answer
    Community Member Profile Picture
    on at

    Best advice I can give you: use column or bar chart instead of your pie.

    Some reasons:

    - pie charts take up more space to convey the same information

    - in CRM, pie charts are always drawn to fill the space available, so there is no sense of relative scale between one pie and another, or one day and the next.

    - you have to show a legend for a pie chart, taking up more space and relying on working memory, because your colours have no inherent meaning (if you were charting only cars by colour, this would be different, but there is nothing in the human brain to equate cars with red, trucks with green etc. In fact what I learnt at school is that all lorries are either red or yellow, according to the old rhyme...)

    - if your chart one day has no buses (for example) for the data set being shown, then all your colours shift along so that bikes are shown in yellow and there is no blue segment. So now you have confused anyone that did learn the arbitrary colour scheme, and reinforced the need to keep referring to the legend. I refer to this problem as "palette shift". It can be fixed in CRM by using multi-series charts, but pie charts can only have one series so you cannot avoid this problem.

    - using multiple colours assumes everyone can discriminate them clearly. Since about 8%* of the adult male population suffers from deuteranopia (typically red/green "colour blindness") you might not meet your country's disability discrimination laws such as DDA in UK, 508 compliance in the US(?) if some of your workforce can't use the software you provide them to do their jobs. (*varies by ethnicity, but a reasonable average)

    - our brains are not wired to compare arbitrary angles very well (we can compare angles of slope above the horizon and tell if they are different, but that is a slightly different trick). We are amazingly good at comparing even very small differences in height (eg column chart), and only slightly less good at doing this with horizontal lengths / widths (eg bar chart).

    So in summary: a column chart only needs one colour, does not need a legend, labels the columns directly (and does not matter if one is missing in today's data), saves on space, requires very little working memory, can be compared to other similar column charts (eg vehicles in two regions, if you use a fixed axis for both), and can be interpreted pre-attentively, requiring far less brainpower and much less likelihood of mis-interpretation.

  • ChartGirl Profile Picture
    on at

    There actually is a solution to this if you're okay with the view showing some dummy-records but the graph showing correct (not displaying the dummy-values). I did this and it worked!

    First create a view that shows you the information you want (let's say all vehicles this month) and also include a date that all vehicles will show up on (for example 2015-01-01). Export the FetchXML. Create the pie chart as usual and export the chart. Then follow this post: crmchartguy.wordpress.com/.../specify-exact-colors-for-each-priority-in-the-microsoft-dynamics-crm-2011-case-chart

    It works for PieCharts too. So you filter on the date you want information on (this month) in the graph and the graph will not include the dummy-date and the colors will be as you specified even though you don't have a value for example Bus.

    So it is possible, but of course the dummy values will show up if you choose "view the records used to generate the graph". You also have to create one specific view for each time period and one specific graph for each time period, so it might be more work then it's worth. In my case, we're only interested in last month and current month, so it wasn't a big deal to create 2 views and 2 graphs.

    You take the good with the bad I suppose...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans