Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Bar Chart - How to link colour to field value...

Posted on by Microsoft Employee

I have been trying to assign colours in a chart to certain fields. I have ordered the colours to appear in the order the fields will appear, however if there are no records attached to one of the fields then it messes everything up and sometimes the fields are displayed in the wrong order. (In summary, it's very inconsistent)

4375.Chart.png

I have used the below tutorial to amend my chart:

https://crmchartguy.wordpress.com/2013/02/24/specify-exact-colors-for-each-priority-in-the-microsoft-dynamics-crm-2011-case-chart/


But i get the following error when trying to import:

53380.Error.png


I cannot workout where my mistake is...


It's probably worth noting that my coding abilities are limited, so I don't tend to notice obvious mistakes in my code

Amended xml. Everything between' link-entity' tags

<visualization>

  <visualizationid>{45B5BBBB-AF29-E711-8109-5065F38B9551}</visualizationid>

  <name>Account Name by RAG Health</name>

  <description>Shows the customer accounts by RAG health</description>

  <primaryentitytypecode>account</primaryentitytypecode>

  <datadescription>

    <datadefinition>

      <fetchcollection>

        <fetch mapping="logical" aggregate="true">

          <entity name="account">

                    <link-entity name="account" from="accountid" to="accountid" link-type="outer">                                      

              <attribute name="name" aggregate="count" alias="_CRMAutoGen_aggregate_column_Num_0" />

                      <filter>

                        <condition attribute="type" operator="customer" />

                      </filter>

                    </link-entity>

            <attribute name="new_raghealth" groupby="true" alias="_CRMAutoGen_groupby_column_Num_13" />

            <attribute name="new_chartconditions" groupby="true" alias="_CRMAutoGen_groupby_column_Num_15" />

          </entity>

        </fetch>

      </fetchcollection>

      <categorycollection>

        <category alias="_CRMAutoGen_groupby_column_Num_13">

          <measurecollection>

            <measure alias="_CRMAutoGen_aggregate_column_Num_0" />

          </measurecollection>

        </category>

      </categorycollection>

    </datadefinition>

  </datadescription>

  <presentationdescription>

    <Chart Palette="None" PaletteCustomColors="255,191,0; 0,128,0; 255,51,51;">

      <Series>

        <Series ChartType="Column" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40" />

      </Series>

      <ChartAreas>

        <ChartArea BorderColor="White" BorderDashStyle="Solid">

          <AxisY LabelAutoFitMinFontSize="8" TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181" IntervalAutoMode="VariableCount">

            <MajorGrid LineColor="239, 242, 246" />

            <MajorTickMark LineColor="165, 172, 181" />

            <LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />

          </AxisY>

          <AxisX LabelAutoFitMinFontSize="8" TitleForeColor="59, 59, 59" TitleFont="{0}, 10.5px" LineColor="165, 172, 181" IntervalAutoMode="VariableCount">

            <MajorTickMark LineColor="165, 172, 181" />

            <MajorGrid LineColor="Transparent" />

            <LabelStyle Font="{0}, 10.5px" ForeColor="59, 59, 59" />

          </AxisX>

        </ChartArea>

      </ChartAreas>

      <Titles>

        <Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="59, 59, 59" />

      </Titles>

      <Legends>

        <Legend Alignment="Center" LegendStyle="Table" Docking="right" IsEquallySpacedItems="True" Font="{0}, 11px" ShadowColor="0, 0, 0, 0" ForeColor="59, 59, 59" />

      </Legends>

    </Chart>

  </presentationdescription>

  <isdefault>false</isdefault>

</visualization>

 

Any help would be greatly appreciated...

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans