1

如果我有一个带有状态代码的约会列表,我想创建一个饼图,有没有办法组合一些状态代码以使图表更具可读性:

示例:我有状态代码 A1、A2、A3、A4、B1、B2、B3、B4、C1、C2、C3、C4。有没有一种方法可以通过 FetchXML 创建所有 A、所有 B 和所有 C 状态代码的分组,以便饼图只有 3 个部分?

这是现有的代码:

    <visualization>
  <visualizationid>{F312E947-987E-E111-8116-00155D825C08}</visualizationid>
  <name>This Week's Status Codes</name>
  <primaryentitytypecode>serviceappointment</primaryentitytypecode>
  <datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" aggregate="true">
          <entity name="serviceappointment">
            <attribute groupby="true" alias="_CRMAutoGen_groupby_column_Num_0" name="statuscode" />
            <attribute alias="_CRMAutoGen_aggregate_column_Num_0" name="statuscode" aggregate="count" />
          </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="55,118,193; 197,56,52; 149,189,66; 117,82,160; 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" CustomProperties="PieLabelStyle=Inside, PieDrawingStyle=Default" ChartType="pie">
          <SmartLabelStyle Enabled="True" />
        </Series>
      </Series>
      <ChartAreas>
        <ChartArea>
          <Area3DStyle Enable3D="false" />
        </ChartArea>
      </ChartAreas>
      <Legends>
        <Legend Alignment="Center" LegendStyle="Table" Docking="right" IsEquallySpacedItems="True" Font="{0}, 11px" ShadowColor="0, 0, 0, 0" ForeColor="59, 59, 59" />
      </Legends>
      <Titles>
        <Title Alignment="TopLeft" DockingOffset="-3" Font="{0}, 13px" ForeColor="0, 0, 0"></Title>
      </Titles>
    </Chart>
  </presentationdescription>
  <isdefault>false</isdefault>
</visualization>
4

1 回答 1

0

您不能在图表中聚合单独的类型。相反,为此创建一个单独的字段并正确映射数据。按需工作流可以非常轻松地完成此数据迁移任务。

于 2015-09-11T21:09:50.833 回答