locked
CRM 2011 Chart - Removing the legend RRS feed

  • Question

  • Hello,

    I'm fairly new to CRM charts so this is probably a really simple one to answer (I hope). I've got a chart where the legend at the bottom is not required and I'd like to remove it but have had no luck. I've exported the chart and the following was in the XML:

          <Titles>
            <Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="59, 59, 59"></Title>
          </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>
    

    I tried changing the Legends tag to the following:

          <Legends>
            <Legend Alignment="Center" />
          </Legends>

    but this had no effect. I then tried removing the Legends tag completely:

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

    but again, no difference.

    Can anyone help me to remove the legend? Thanks.

    Thursday, November 22, 2012 9:26 AM

Answers

  • Hello Jon, 

    I hope you have an answer by now, but since your post appears at the top of my search for "remove legend chart crm 2011", there's a fair chance other people will land here too.  The solution lies not in <Legends>, but in <Series>, using IsVisibleInLegend="false".

    For example, my chart series was like this: 

    <Series ChartType="StackedColumn" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40" IsVisibleInLegend="false"></Series>

    Hope this helps.

    Acknowledgement: I found this pearl of wisdom in the blog of crmchartguy at http://crmchartguy.wordpress.com/ in a post titled "Using custom colors in charts".  

    • Proposed as answer by Douglas Muir Thursday, January 17, 2013 9:29 AM
    • Marked as answer by Jon_Evans Wednesday, January 23, 2013 10:36 AM
    Thursday, January 17, 2013 9:28 AM

All replies

  • After Exporting chart in xml find and change IsValueShownAsLabel from True to False

    Example:

    <Series>
    <Series ChartType=”Column” IsValueShownAsLabel=”FalseFont=”{0}, 9.5px” LabelForeColor=“59, 59, 59″ CustomProperties=“PointWidth=0.75, MaxPixelPointWidth=40></Series>
    </Series>

    Let me know if you need more information


    Warm Regards, Vijay Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.



    • Edited by vijay i Thursday, November 22, 2012 12:44 PM
    • Proposed as answer by vijay i Friday, November 23, 2012 4:48 AM
    Thursday, November 22, 2012 12:43 PM
  • Hi Vijay,

    Thanks for your reply but CRM does not recognise this as valid XML and refuses to import it when the IsValueShownAsLabel attribute is in the tag. If I remove this attribute, it imports fine so it's definitely this that CRM doesn't like.

    Wednesday, November 28, 2012 5:02 PM
  • Hello Jon, 

    I hope you have an answer by now, but since your post appears at the top of my search for "remove legend chart crm 2011", there's a fair chance other people will land here too.  The solution lies not in <Legends>, but in <Series>, using IsVisibleInLegend="false".

    For example, my chart series was like this: 

    <Series ChartType="StackedColumn" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40" IsVisibleInLegend="false"></Series>

    Hope this helps.

    Acknowledgement: I found this pearl of wisdom in the blog of crmchartguy at http://crmchartguy.wordpress.com/ in a post titled "Using custom colors in charts".  

    • Proposed as answer by Douglas Muir Thursday, January 17, 2013 9:29 AM
    • Marked as answer by Jon_Evans Wednesday, January 23, 2013 10:36 AM
    Thursday, January 17, 2013 9:28 AM
  • @Douglas - thanks for adding the source, that blog is by far the best resource for understanding useful chart properties for CRM that I have seen!

    And no horrible 3D shiny pie charts and pyramids in sight!


    Hope this helps.
    Adam Vero, Microsoft Certified Trainer | Microsoft Community Contributor 2011
    Blog: Getting IT Right

    Thursday, January 17, 2013 10:04 PM
  • @Douglas - thanks for adding the source, that blog is by far the best resource for understanding useful chart properties for CRM that I have seen!

    And no horrible 3D shiny pie charts and pyramids in sight!


    Hope this helps.
    Adam Vero, Microsoft Certified Trainer | Microsoft Community Contributor 2011
    Blog: Getting IT Right

    Thanks so much Adam and Douglas. Much appreciated.

    I actually added this post recently  http://crmchartguy.wordpress.com/2013/03/03/removing-axis-titles-legend-and-axis-labels-in-crm-charts-for-ms-crm-2011/ to address that specific issue directly.

    Cheers

    Ulrik (crm chart guy)
    Monday, March 11, 2013 8:37 PM