tags:

views:

131

answers:

1

I have line chart which has values :

 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; }

when we set IsValueShownAsLabel=true on y-axis it shows value 0.

but graph showing values below zero at last 0.00 before 327.78.

Because I m new user cannot upoad image please have a look Chart image from below url: http://www.freeimagehosting.net/uploads/84c7d1e2f7.png

Your assistance in resolving this problem would be much appreciated.

+1  A: 

Your chart does not show data below 0.0, but because you have selected Spline as your chart type, the charting control will attempt to draw a bezier curve that starts at 0.0, runs through 0.0 and ends in 327.78, which results in the little 'dip' you see before the line curves up.

ErikHeemskerk
Thank you, now I understand.
syed Adeel
Is there anyothere way to show this graph to solve this issue?
syed Adeel