如果CRM堆积条形图中的值为0,则不要显示条形图

时间:2015-07-04 04:51:48

标签: charts dynamics-crm bar-chart

我在CRM中创建了一个堆叠条形图,其中包含三个图例条目。但是如果它的值为0,我不想显示它。它应该隐藏在这种情况下。我的图表XML如下所示。

<visualization>
<visualizationid>{02C1F86E-4421-E511-80E1-3863BB34FA68}</visualizationid>
<name>All Opportunity With Perfomance Target</name>
<primaryentitytypecode>opportunity</primaryentitytypecode>
<datadescription>
<datadefinition>
  <fetchcollection>
    <fetch mapping="logical" aggregate="true">
      <entity name="opportunity">
        <attribute groupby="true" alias="_CRMAutoGen_groupby_column_Num_0" name="pav_salesperson" />
        <link-entity name="pav_perfomancetarget" from="pav_perfomancetargetid" to="pav_perfomancetarget" link-type="outer">
          <attribute alias="_CRMAutoGen_aggregate_column_Num_0" name="pnk_proposalissued" aggregate="sum" />
          <attribute alias="_CRMAutoGen_aggregate_column_Num_13" name="pnk_proposalaccepted" aggregate="sum" />
          <attribute alias="_CRMAutoGen_aggregate_column_Num_14" name="pnk_docsigned" aggregate="sum" />
          <attribute alias="_CRMAutoGen_aggregate_column_Num_17" name="pav_perfomancetarget" aggregate="sum" />
        </link-entity>
      </entity>
    </fetch>
  </fetchcollection>
  <categorycollection>
    <category alias="_CRMAutoGen_groupby_column_Num_0">
      <measurecollection>
        <measure alias="_CRMAutoGen_aggregate_column_Num_0" />
      </measurecollection>
      <measurecollection>
        <measure alias="_CRMAutoGen_aggregate_column_Num_17" />
      </measurecollection>
      <measurecollection>
        <measure alias="_CRMAutoGen_aggregate_column_Num_13" />
      </measurecollection>
      <measurecollection>
        <measure alias="_CRMAutoGen_aggregate_column_Num_14" />
      </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 ChartType="Point" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40" />
    <Series ChartType="Column" IsValueShownAsLabel="True" Font="{0}, 9.5px" LabelForeColor="59, 59, 59" CustomProperties="PointWidth=0.75, MaxPixelPointWidth=40" />
    <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>
      <AxisY2 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" />
      </AxisY2>
    </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>

0 个答案:

没有答案