【问题标题】:MSCRM 2015: Rename legend in bar chartMSCRM 2015:重命名条形图中的图例
【发布时间】:2017-12-28 10:05:39
【问题描述】:

我创建了一个包含两个类别和一个系列的条形图,如下所示。

图表条件

图表

要求是将图例名称 Open and Disqualified 更改为 Ongoing 和 Cancelled。图例名称不过是第二类(状态)。 我浏览了代码,但无法弄清楚在哪里添加图例名称。如果有的话,请提出一些解决方案。 以下是我提供的代码供参考。

 <visualization>
  <visualizationid>{C9D241BD-29E6-E711-80DC-00505695684B}</visualizationid>
  <name>Assessment Revenue by Year</name>
  <primaryentitytypecode>lead</primaryentitytypecode>
  <datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" aggregate="true">
          <entity name="lead">
            <attribute name="new_assessmentyear" groupby="true" alias="_CRMAutoGen_groupby_column_Num_0" />
            <attribute name="pjdm_income" aggregate="sum" alias="_CRMAutoGen_aggregate_column_Num_0" />
            <attribute name="statecode" 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="91,151,213; 237,125,49; 160,116,166; 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=0.75, MaxPixelPointWidth=40" />
      </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>

【问题讨论】:

    标签: reporting-services dynamics-crm bar-chart dynamics-crm-2015


    【解决方案1】:

    如果您只想更改图表显示,请在要更改的每个系列中使用 LegendText 属性:

       <Series ChartType="Column" LegendText="Ongoing"  DrawSideBySide= "False" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40">
       <Series ChartType="Column" LegendText="Cancelled" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40">
    

    否则,可以在 Lead 实体中自定义状态码选项集以反映整个系统。

    【讨论】:

    • 感谢您的建议。但是在这种情况下,虽然根据类别选择在图表上出现了两个条形图,但图表 xml 中只有一个系列。 这是MSCRM中根据图表配置生成的OOB,还有其他方法吗?
    • @Nithya 如果您坚持让您的传奇动态,那么我看到的唯一选择是更改案例状态的显示名称。
    猜你喜欢
    • 2021-10-27
    • 1970-01-01
    • 1970-01-01
    • 2020-09-25
    • 2019-12-06
    • 1970-01-01
    • 2015-04-10
    • 2018-10-20
    • 1970-01-01
    相关资源
    最近更新 更多