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)

Pie Chart Rename Yes/No

(0) ShareShare
ReportReport
Posted on by

Hi

We have a pie chart grouped on a boolean field. (see chart definition XML below)

What we want is to display the Legend as Yes -> Partner and No -> Direct

So changing the Legend labels.

Is this possible somehow?

Thanks

Michel

Chart XML:

<visualization>

 <visualizationid>{4BE51165-5D74-E311-9432-005056B80903}</visualizationid>

 <name>QT - Weighted Revenue by Deal Type</name>

 <primaryentitytypecode>opportunity</primaryentitytypecode>

 <datadescription>

   <datadefinition>

     <fetchcollection>

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

         <entity name="opportunity">

           <attribute groupby="true" alias="_CRMAutoGen_groupby_column_Num_0" name="msa_allocatedtopartner" />

           <attribute alias="_CRMAutoGen_aggregate_column_Num_0" name="new_est_weighted_revenue" aggregate="sum" />

         </entity>

       </fetch>

     </fetchcollection>

     <categorycollection>

       <category alias="_CRMAutoGen_groupby_column_Num_0">

         <measurecollection>

           <measure alias="_CRMAutoGen_aggregate_column_Num_0" />

         </measurecollection>

       </category>

     </categorycollection>

   </datadefinition>

 </datadescription>

 <presentationdescription>

   <Chart Palette="None" PaletteCustomColors="55,118,193; 197,56,52; 149,189,66; 117,82,160; 49,171,204; 255,136,35; 97,142,206; 209,98,96; 168,203,104; 142,116,178; 93,186,215; 255,155,83">

     <Series>

       <Series ShadowOffset="0" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PieLabelStyle=Inside, PieDrawingStyle=Default" ChartType="pie">

         <SmartLabelStyle Enabled="True" />

       </Series>

     </Series>

     <ChartAreas>

       <ChartArea>

         <Area3DStyle Enable3D="false" />

       </ChartArea>

     </ChartAreas>

     <Legends>

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

     </Legends>

     <Titles>

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

     </Titles>

   </Chart>

 </presentationdescription>

 <isdefault>false</isdefault>

</visualization>

*This post is locked for comments

I have the same question (0)
  • Karth Profile Picture
    on at

    You need to change the alias as to something like "Partner" instead of "_CRMAutoGen_groupby_column_Num_0".

  • MichelZ Profile Picture
    on at

    Hi

    I think the Alias is just cosmetics?

    Thanks

    Michel

  • Suggested answer
    Bertil Deuring Profile Picture
    on at

    The LegendText property just may be what you're looking for to add.

    There is an example in this post:

    crmchartguy.wordpress.com/.../aggregate-total-on-top-of-stacked-column-charts-or-bar-charts-in-ms-crm-2011

    Look under "Adjust Chart Axis, Legend and Colors"

  • MichelZ Profile Picture
    on at

    Hi

    In the PIE chart, I only have one Series..

    I don't think this is gonna work.. :(

    Thanks

    Michel

  • MichelZ Profile Picture
    on at

    I tried using multiple series with each series having a condition, unfortunately, PIE charts cannot be used with multiple series.

    So this does not work

  • Verified answer
    Bertil Deuring Profile Picture
    on at

    So here is the most simple work around I can think of... Create an extra boolean field on the same entity that has the labels renamed in this way: Yes -> Partner and No -> Direct.

    Now create a workflow or a javascript or in CRM 2013 a business rule (anything that keeps both fields in sync), that sets the value of this field depending on the original field.

    Adjust the chart to use the newly created boolean field. The legend wil resemble the label of the field values.

  • MichelZ Profile Picture
    on at

    Thats a good idea, and is probably gonna work!

    Thanks a lot!

    /Michel

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