Quantcast
Channel: Microsoft Dynamics CRM Team Blog
Viewing all articles
Browse latest Browse all 592

Simple Chart Modification in Microsoft Dynamics CRM 2011

$
0
0

clip_image002

Start with Exporting the Chart

All Charts are entity based. Start by opening the entity that your chart is based on. In the case of the Sales Funnel, it is the Opportunities Entity. Next, make sure the chart in question is the current chart being displayed with the entity. Once you have the chart selected, click on the View tab and pick the Export Chart option. This will allow you to save a XML file to your local machine. We’ll edit this file to make our changes.

image

Edit the XML

Below is a complete chart file. Note the highlighted sections – we’ll drill into them next.

<visualization>
  <visualizationid>{87293554-2482-DE11-9FF3-00155DA3B012}</visualizationid>
  <name>Sales Pipeline Chet 2</name>
  <description>Shows the sum of estimated revenue in each stage of the sales pipeline.</description>
  <primaryentitytypecode>opportunity</primaryentitytypecode>
  <datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" count="10" aggregate="true">
          <entity name="opportunity">
            <attribute name="estimatedvalue" aggregate="sum" alias="sum_estimatedvalue" />
            <attribute name="stepname" groupby="true" alias="stepname" />
            <order alias="stepname" descending="false" />
          </entity>
        </fetch>
      </fetchcollection>
      <categorycollection>
        <category>
          <measurecollection>
            <measure alias="sum_estimatedvalue" />
          </measurecollection>
        </category>
      </categorycollection>
    </datadefinition>
  </datadescription>
  <presentationdescription>
    <Chart Palette="None" PaletteCustomColors="218,112,214; 128,0,128; 0,255,255; 218,165,32; 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" ChartType="Funnel" CustomProperties="FunnelLabelStyle=Outside, FunnelNeckHeight=0, FunnelPointGap=1'>
          <SmartLabelStyle Enabled="True" />
        </Series>
      </Series>
      <ChartAreas>
        <ChartArea>
          <Area3DStyle Enable3D="True" />
        </ChartArea>
      </ChartAreas>
      <Legends>
        <Legend Alignment="Center" LegendStyle="Table" Docking="right" Font="{0}, 11px" ShadowColor="0, 0, 0, 0" ForeColor="59, 59, 59" />
      </Legends>
      <Titles>
        <Title Alignment="TopLeft" DockingOffset="-3" Font="Segeo UI, 13px" ForeColor="0, 0, 0"></Title>
      </Titles>
    </Chart>
  </presentationdescription>
  <isdefault>false</isdefault>
</visualization>

Edit the XML (the non-color changes)

<name>Sales Pipeline Chet 2</name>

Find the <name> line and give your chart a unique name

<Area3DStyle Enable3D="True" />

The Area3DStyle will be set to False initially, change this to True for the 3D look.

Edit the XML (the color section)

<Chart Palette="None" PaletteCustomColors="218,112,214; 128,0,128; 0,255,255; 218,165,32; …

The colors referenced are in RGB format where an integer from 0 to 255 represents the saturation of red, green, and blue respectively. The colors are listed in order that you see them from top to bottom in the graph. Each set of three numbers represents a color (so in this example 218,112,214; is the first color). In case you haven’t memorized the millions of color combinations that are possible, here’s what I do. There is a website that lists over 500 of the most common colors. http://cloford.com/resources/colours/500col.htm

image

You’ll note in the circled columns the three numbers that correspond to the associated color. Just input the colors you want from the list.

Import your new graph

image

Simply go back to the Entity page and select Import Chart from the View tab. If you have not changed the charts title, you will be prompted to either overwrite the original or make a copy. If you have given your chart a unique name, it will just be loaded and immediately displayed.

That’s all there is to it – now go out there and customize those charts!

Cheers,

Chet Kloss




Viewing all articles
Browse latest Browse all 592

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>