Skip to main content

Notifications

Announcements

No record found.

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

  • Marcin Bielak Profile Picture
    10 on at
    RE: how to change Legend color and text for crm chart.

    is this possible to translate such legentText on chart ? 

  • Suggested answer
    dian74 Profile Picture
    2,475 Most Valuable Professional on at
    RE: how to change Legend color and text for crm chart.

    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>

  • Razim Khan Profile Picture
    150 on at
    RE: how to change Legend color and text for crm chart.

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

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: how to change Legend color and text for crm chart.

    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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans