2012-07-12 95 views
1

我有一個asp:chart與其中一個系列。該系列收集了13分。 (1到13)X軸與Asp:圖表

當使用Visual Web Designer數據綁定工具將數據綁定到圖表時,我希望查看甚至不會收到任何數據的列。 (x列,其中y = 0)。

現在我有這個(我的圖表的ASCII表示):

 4 |[] 
     3 |[]  [] 
     2 |[] [] [][]  
     1 |[][][][][][] 
      ------------ 
      1 3 5 7 9 10 

圖以x座標,其中y > 0。我想要的是這樣的:

 4 |[] 
     3 |[]    [] 
     2 |[]  []  [][]  
     1 |[] [] [] [] [][] 
      ----------------------------- 
      1 2 3 4 5 6 7 8 9 10 11 12 13 

任何想法我可以做到這一點?

回答

0

你能分享一下你的代碼嗎? 隨着下面的標記我得到在X軸12個數字從0到11:

<asp:Chart ID="Chart1" runat="server"> 
       <Series> 
        <asp:Series Name="Series1" ChartType="Point"> 
         <Points> 
          <asp:DataPoint XValue="1" YValues="2" /> 
          <asp:DataPoint XValue="3" YValues="5" /> 
          <asp:DataPoint XValue="5" YValues="3" /> 
          <asp:DataPoint XValue="7" YValues="8" /> 
          <asp:DataPoint XValue="9" YValues="1" /> 
          <asp:DataPoint XValue="10" YValues="1" /> 
         </Points> 
        </asp:Series> 
       </Series> 
       <ChartAreas> 
        <asp:ChartArea /> 
       </ChartAreas> 
      </asp:Chart>