2010-07-26 21 views
0

我有具有值線圖:MS圖表引出配線

flock_age = 

    X-axis = 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38 

    egg_mass_weekly 

    Y-axis = 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 327.78, 403.90, 420.35, 425.25, 441.35, 446.11, 444.50, 454.86, 450.38, 458.57, 463.96, 463.33, 464.66, 398.46, 0.00 

    <asp:Chart ID="ChartEggMass" runat="server" Height="436px" Width="810px"> 
    <Titles><asp:Title Text="Egg Mass Per Bird" Alignment="TopCenter" /></Titles> 
    <legends> 
     <asp:legend Enabled="true" IsTextAutoFit="False" Name="Default" BackColor="Gainsboro" Font="Trebuchet MS, 6.25pt, style=Bold"></asp:legend> 
    </legends> 

    <borderskin skinstyle="Emboss"></borderskin> 

    <ChartAreas> 

    <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="Gainsboro" ShadowColor="Transparent" BackGradientStyle="TopBottom"> 

    <area3dstyle Rotation="10" perspective="10" Inclination="15" IsRightAngleAxes="False" wallwidth="0" IsClustered="False"></area3dstyle> 

    <axisy linecolor="64, 64, 64, 64" IsLabelAutoFit="False" Minimum="-50" Maximum="450" Interval="50" IntervalType="Number" Title="Weight in grammes" TitleFont="Trebuchet MS, 6.25pt, style=Bold"> 
     <labelstyle font="Trebuchet MS, 7.25pt, style=Bold" /> 
     <majorgrid linecolor="64, 64, 64, 64" /> 
    </axisy> 
    <axisx linecolor="64, 64, 64, 64" IsLabelAutoFit="False" Minimum="16" Maximum="72" Interval="1" IntervalType="Number" Title="Age of flocks in weeks" TitleFont="Trebuchet MS, 6.25pt, style=Bold" > 
     <labelstyle font="Trebuchet MS, 4.25pt, style=Bold" /> 
     <majorgrid linecolor="64, 64, 64, 64" /> 
    </axisx> 
    </asp:ChartArea> 
    </ChartAreas> 
    </asp:Chart> 



string seriesName2 = "Flock Actual"; ChartEggMass.Series.Add(seriesName2); ChartEggMass.Series[seriesName2].ChartType 
= SeriesChartType.Spline; ChartEggMass.Series[seriesName2].BorderWidth 
= 2; ChartEggMass.Series[seriesName2].Color 
= System.Drawing.Color.Black; 

//for test puspose for (int i = 0; i < egg_mass_weekly.Length; i++) { Double tmp = 0; ChartEggMass.Series[seriesName2].Points.AddXY(flock_age[i],Double.TryParse(egg_mass_weekly[i], out tmp)?tmp:0); ChartEggMass.Series[seriesName2].Points[i].IsValueShownAsLabel=true; } 

當我們設置IsValueShownAsLabel =真上Y軸它顯示值0

但低於零曲線圖值最後在327.78之前爲0.00。

因爲我爲新用戶不能upoad圖像,請從下面的網址看看圖表圖像: http://www.freeimagehosting.net/uploads/84c7d1e2f7.png

你解決這個問題的幫助將非常感激。

回答

1

您的圖表沒有顯示低於0.0 數據,而是因爲你已經選擇Spline爲您的圖表類型,圖表控件將嘗試繪製開始於0.0的貝塞爾曲線,貫穿0.0,在327.78結束,這導致在曲線向上變化之前,您看到的「傾角」很小。

+0

謝謝,現在我明白了。 – 2010-07-26 13:07:10

+0

是否有任何方法可以顯示此圖解決此問題? – 2010-07-26 13:11:42