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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

how to change Legend color and text for crm chart.

(0) ShareShare
ReportReport
Posted on by 150

hello everyone.

                   i want to change legend color and legend text of a crm chart. chart fill from dropdownlist which display data according to dropdownlist. below is my chart xml.

and also snapshot also attached in link.

<visualization>
  <visualizationid>{C0018F9C-E283-E711-9405-0050569B1EE7}</visualizationid>
  <name>All Teams Progress</name>
  <primaryentitytypecode>incident</primaryentitytypecode>
  <datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" aggregate="true">
          <entity name="incident">
            <link-entity name="systemuser" from="systemuserid" to="owninguser" link-type="outer">
              <attribute name="new_team" groupby="true" alias="_CRMAutoGen_groupby_column_Num_0" />
            </link-entity>
            <attribute name="ticketnumber" aggregate="count" alias="_CRMAutoGen_aggregate_column_Num_0" />
            <attribute name="new_slastatus" groupby="true" alias="_CRMAutoGen_groupby_column_Num_13" />
          </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="160,116,166; 237,125,49; 91,151,213; 255,192,0; 68,114,196; 112,173,71; 37,94,145; 158,72,14; 117,55,125; 153,115,0; 38,68,120; 67,104,43; 124,175,221; 241,151,90; 186,144,192; 255,205,51; 105,142,208; 140,193,104; 50,125,194; 210,96,18; 150,83,159; 204,154,0; 51,90,161; 90,138,57;">
      <Series>
        <Series ChartType="Column" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=1, MaxPixelPointWidth=60" />
      </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>


www.screencast.com/.../J3bh9vvYEM

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    I don't think you can change the color of the text but you can change the color inside the chart: crmchartguy.wordpress.com/.../palette-custom-colors-in-charts

    All about chart customization:crmchartguy.wordpress.com

  • Razim Khan Profile Picture
    150 on at

    thanks for reply, infact i want to change legend text as well.

  • Suggested answer
    dian74 Profile Picture
    2,481 Most Valuable Professional on at

    In the series section of the XML, next to ChartType, add the legend text: LegendText="Label Name" 

     

    <Series>
       <Series ChartType="Column" LegendText="Available" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40, DrawingStyle=Cylinder" />
       <Series ChartType="Column" LegendText="On Hand" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40, DrawingStyle=Cylinder" />
       <Series ChartType="Column" LegendText="On Order" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40, DrawingStyle=Cylinder" />
    </Series>

  • Marcin Bielak Profile Picture
    10 on at

    is this possible to translate such legentText on chart ? 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans