D365 CRM: Customize the colors of your charts in CRM



  • At times it can be nice to define you own colors in charts. You may need to use a specific a corporate color scheme, make it easier to tell certain items apart or simply make the chart easier for the user to understand quickly.
    -To get started, you will first want to open the existing chart that you want to change the color in the chart pane. Go to a solution, select the chart and Export it:

     

    -Next, you will need to save the xml file of the chart to your Desktop. Once you have saved the file to your Desktop, you will want to select the xml file and open it in Visual Studio or Note Pad. Once open it should look something like this:

     

    - All the colors are listed as RGB colors, separated by a semicolon. While Dynamics CRM add RGB colors to its custom palette it should be noted that Dynamics CRM accepts:
    •    RGB Decimal (example: 97, 142, 206)
    •    RGB HEX (example: #4169E1)
    •    Named colors (example: Blue)
    •    ARGB (127, 97, 142, 206)
    The named colors could prove a lot easier to work with.
    So instead of PaletteCustomColors=”97,142,206; 209,98,96; 168,203,104; etc. we could write PaletteCustomColors=”Blue; Red; Green; etc.
    Using the color names also makes it a lot easier to check if you have added them in the correct order.:
    This page contains an overview of the named colors available to use in charts:
    http://msdn.microsoft.com/en-us/library/aa358800.aspx 
    There’s one color missing from this list and that is “Transparent”. Transparent is very handy when you need to add data to a chart, but actually don’t want to show it. For example, you may only want to display the value on a chart, but not have the bar or column visible.
    Back to the example where we wanted to change the color scheme to Red, Green and Blue.
    To achieve that we need to edit the XML files so the first the colors of the PaletteCustomColors look like this:

     

    -Save your changes and then go back to the chart in your solution and select Import Chart.
     
    -Select the xml file that you changed and then import the file.
     
    -You can replace it or create a new one. Publish the customizations and take a look of the results:

     

    Original Source:
    https://crmchartguy.wordpress.com/2012/08/23/palette-custom-colors-in-charts/

    Enjoy it!


  • Comments



Add a Comment