2010-12-18 41 views
1

我正在使用MS Chart -Pie在饼图[MS Chart]中显示页面名称及其记录状态计数。MSChart XValue问题

页面名称有效   无效
XXX                                 YYY          页面                   

数为20

问题:如果x值超过9是指没有得到显示的所有记录。只有很少的随机记录正在显示。

代码:

<asp:Chart ID="chrtMaster" runat="server" Height="656px" Width="807px" BackColor="WhiteSmoke" 
         BackGradientStyle="TopBottom" BackSecondaryColor="White"> 
         <Legends> 
          <asp:Legend BackColor="WhiteSmoke" Name="Legend1"> 
          </asp:Legend> 
         </Legends> 
         <Series> 
          <asp:Series Name="Valid" Legend="Legend1" XValueMember="MasterTable" YValueMembers="Valid" 
           YValuesPerPoint="1" YValueType="Int32" CustomProperties="PointWidth=1.5" Color="220, 65, 140, 240"> 
          </asp:Series> 
          <asp:Series Name="Pending" Legend="Legend1" XValueMember="MasterTable" YValueMembers="Pending" 
           YValuesPerPoint="1" YValueType="Int32" CustomProperties="PointWidth=1.5" Color="220, 252, 180, 65"> 
          </asp:Series> 
          <asp:Series Name="Disabled" Legend="Legend1" XValueMember="MasterTable" YValueMembers="Disabled" 
           YValuesPerPoint="1" YValueType="Int32" CustomProperties="PointWidth=1.5" Color="220, 224, 64, 10"> 
          </asp:Series> 
         </Series> 
         <ChartAreas> 
          <asp:ChartArea Name="ChartArea1" BackColor="WhiteSmoke" BackSecondaryColor="White" 
           BorderColor="64, 64, 64, 64" ShadowColor="Transparent"> 
           <Area3DStyle LightStyle="Realistic" WallWidth="0" /> 
          </asp:ChartArea> 
         </ChartAreas> 
        </asp:Chart> 

回答

1

我得到了答案。

chrtMaster.ChartAreas["ChartArea1"].AxisX.Interval = 1;