10

Working on a C# web app, my issue is that only some of the values are appearing on the report (This is the X Axis I'm talking about, it only shows every other value). Its simply showing every other one. How can I show all of them?

Thanks

enter image description here

enter image description here

My Code:

<asp:Chart ID="Chart6" runat="server" DataSourceID="SqlDataSource13" 
                Palette="Chocolate" Width="800px">
                <Series>
                    <asp:Series Name="Series1" CustomProperties="DrawingStyle=Cylinder" 
                        IsValueShownAsLabel="True" LabelFormat="{C2}" Palette="Chocolate" 
                        XValueMember="StartItem" YValueMembers="STDCOST2">
                    </asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea Name="ChartArea1">
                        <AxisY IsLabelAutoFit="False" TextOrientation="Rotated90" 
                            TitleFont="Verdana, 7pt">
                            <LabelStyle Font="Microsoft Sans Serif, 6.75pt" Format="{C2}" />
                        </AxisY>
                        <AxisX IsLabelAutoFit="False" LabelAutoFitMaxFontSize="8" 
                            LabelAutoFitMinFontSize="7" LabelAutoFitStyle="None">
                            <LabelStyle Angle="90" Font="Microsoft Sans Serif, 6pt" Interval="Auto" 
                                IsEndLabelVisible="False" />
                            <ScaleBreakStyle BreakLineStyle="None" />
                        </AxisX>
                        <AxisX2 IsLabelAutoFit="False" LabelAutoFitMaxFontSize="8" 
                            LabelAutoFitStyle="None">
                            <LabelStyle Angle="45" />
                        </AxisX2>
                        <Area3DStyle Enable3D="True" />
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>
GabrielVa
  • 2,353
  • 9
  • 37
  • 59
  • In my opinion every value is there... – Gerrie Schenck Sep 27 '11 at 20:07
  • Report? C#? Do you mind contextualizing your question (putting your question into a context) in order to make it answerable? And hurry up as close votes are starting to rain. At its current state, I think the answer to your question is actually $6,708.34 – Darin Dimitrov Sep 27 '11 at 20:07
  • Can you provide a sample of the data structure you are using as input to this Chart, i.e., the results of SqlDataSource13?? – mellamokb Sep 27 '11 at 20:12
  • ON the X Axis, it only shows every other value, not every value like it should. Thats the question at hand. How do you make the value on the axis show every item within the chart. Has nothing to do with the numbers, just how to show the entire X axis. – GabrielVa Sep 27 '11 at 20:12
  • gabriel. I just got redirected here from a recent upvote. Was this answer not what you were looking for? – nycdan Mar 01 '12 at 00:32

1 Answers1

34

I think some are confusing values with labels. The original question refers to labels, which are being skipped.

This is a repeat question of MS Chart with ASP.NET chart type “column” not showing axis x label if there are more than 9 bar in the chart

The answer is

Chart6.ChartAreas["ChartArea1"].AxisX.Interval = 1; 
Community
  • 1
  • 1
nycdan
  • 2,819
  • 2
  • 21
  • 33