0
votes

i am using microsoft chart in asp.net and I have a simple column chart with point labels, however, the first data point is not showing for the bar closest to the Y axis. I have five year of data points in the column chart but always the one that is closest at the Y axis is now showing and the rest is showing. I am not sure what property i need to set in order to show all data points. thanks. here is the code for the chart

<asp:chart id="Chart1" runat="server" BackColor="#D3DFF0" Palette="Chocolate" 
                            ImageType="Png" ImageUrl="~/TempImages/ChartPic_#SEQ(300,3)" Width="861px" 
                            Height="296px" borderlinestyle="Solid" backgradientendcolor="White" 
                            backgradienttype="TopBottom" borderlinewidth="2" 
                            borderlinecolor="26, 59, 105" BackGradientStyle="TopBottom">
                            <titles>
                                <asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 14.25pt, style=Bold" ShadowOffset="3" Text="Closed Months" Alignment="TopCenter" ForeColor="Yellow"></asp:Title>
                            </titles>
                            <legends>
                                <asp:Legend Enabled="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold">
                                    <position y="21" height="22" width="18" x="73"></position>
                                </asp:Legend>
                            </legends>
                            <borderskin skinstyle="FrameTitle8"></borderskin>
                            <series>
                                <asp:Series Name="TotalCount" BorderColor="180, 26, 59, 105" 
                                    IsValueShownAsLabel="True" BackGradientStyle="VerticalCenter" 
                                    YValuesPerPoint="2"></asp:Series>
                            </series>
                            <chartareas>
                                <asp:ChartArea Name="Default" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
                                    <axisy linecolor="64, 64, 64, 64" IsLabelAutoFit="False">
                                        <labelstyle font="Trebuchet MS, 8.25pt, style=Bold"></labelstyle>
                                        <majorgrid linecolor="64, 64, 64, 64"></majorgrid>
                                    </axisy>
                                    <axisx linecolor="64, 64, 64, 64" isLabelAutofit="False">
                                        <labelstyle font="Trebuchet MS, 8.25pt, style=Bold" Interval="Auto"></labelstyle>
                                        <majorgrid linecolor="64, 64, 64, 64"></majorgrid>
                                    </axisx>
                                </asp:ChartArea>
                            </chartareas>
                        </asp:chart>
1

1 Answers

0
votes

Hard to tell without the code, but make sure the data point is within the Chart Area's limit's.

chart.ChartAreas[index].AxisY.Minimum = something_lower_than_lowest_Y_value_in_your_data_points

Also, check the same for X axis, as from experience, MScharts tends to mix both.

Edit:

I've only dealt with MSCharts on c#, so forgive me for the lack of helpful input. From what I've gather from your code though, it seems to be mainly appearance. I think you need something like this inside the ChartArea tag :

 <AxisX Minimum="-1">        
</AxisX>

My guess is still that you're starting your series at a point lower than the axis, so it doesn't render the first bar.