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
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>
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With