CRM折线图缺少日期

时间:2015-02-20 16:53:26

标签: charts dynamics-crm crm dynamics-crm-2013

我试图制作折线图,显示用户每天预订的次数。 (这是在开发中,因此并非所有数据都提供)。如果我没有任何数据,那么行内有几个空白,而且有几个日期丢失。我希望它显示0而不是跳过这一天,并为每个预订代表提供一整行

这是图表目前的样子enter image description here

这是我目前的xml

   <visualization>
  <visualizationid>{313560E6-ECB8-E411-80EE-0050569C5BB2}</visualizationid>
  <name>Bookings</name>
  <primaryentitytypecode>new_bookingappointment</primaryentitytypecode>
  <datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" aggregate="true">
          <entity name="new_bookingappointment">
            <link-entity name="systemuser" from="systemuserid" to="createdby" link-type="outer">
              <attribute alias="_CRMAutoGen_aggregate_column_Num_0" name="new_thename" aggregate="count" />
              <attribute groupby="true" alias="_CRMAutoGen_groupby_column_Num_14" name="new_thename" />
            </link-entity>
            <filter type="and">
              <condition attribute="createdon" operator="this-month"/>
            </filter>
            <attribute groupby="true" alias="_CRMAutoGen_groupby_column_Num_13" name="createdon" dategrouping="day" />
          </entity>
        </fetch>
      </fetchcollection>
      <categorycollection>
        <category alias="_CRMAutoGen_groupby_column_Num_13">
          <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="Line" CustomProperties="EmptyPointValue=Zero" IsValueShownAsLabel="True" BorderWidth="3" MarkerStyle="Square" MarkerSize="9" MarkerColor="37, 128, 153" MarkerBorderColor="37, 128, 153"></Series>
      </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"></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>
  </presentationdescription>
  <isdefault>false</isdefault>
</visualization>

1 个答案:

答案 0 :(得分:1)

您需要进行总计数。我打赌这会给你你需要的东西:Include records with no value in charts