Charting Label Intervals
-
Saturday, January 02, 2010 6:19 PM
I am new to asp.net charting and asp.net in general. I made a basic chart and cannot get all of the data labels to show. It shows only intervals of 5. Is there a property I can set that will show all labels (1-17)? All of the labels show when there are only 9 data points.
The Chart itself is pretty generic. I've been able to figure out most of the other properties I'm looking for.
Thanks to anyone who can help a duffis out :)
<asp:Chart ID="weekly_stats" runat="server" Width="800px">
<Titles>
<asp:Title Text="Fantasy Points by Week"></asp:Title>
</Titles>
<Series>
<asp:Series Name="Stats" YValueType="Int32" ChartType="Column" ChartArea="MainChartArea">
<Points>
<asp:DataPoint AxisLabel="1" YValues="15" />
<asp:DataPoint AxisLabel="2" YValues="23" />
<asp:DataPoint AxisLabel="3" YValues="8" />
<asp:DataPoint AxisLabel="4" YValues="19" />
<asp:DataPoint AxisLabel="5" YValues="22" />
<asp:DataPoint AxisLabel="6" YValues="6" />
<asp:DataPoint AxisLabel="7" YValues="9" />
<asp:DataPoint AxisLabel="8" YValues="11" />
<asp:DataPoint AxisLabel="9" YValues="4" />
<asp:DataPoint AxisLabel="10" YValues="24" />
<asp:DataPoint AxisLabel="11" YValues="12" />
<asp:DataPoint AxisLabel="12" YValues="10" />
<asp:DataPoint AxisLabel="13" YValues="7" />
<asp:DataPoint AxisLabel="14" YValues="5" />
<asp:DataPoint AxisLabel="15" YValues="11" />
<asp:DataPoint AxisLabel="16" YValues="5" />
<asp:DataPoint AxisLabel="17" YValues="22" />
</Points>
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="MainChartArea">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
All Replies
-
Saturday, January 02, 2010 9:03 PMModerator
Hi Mr Floppy
sorry, I don't work in ASP, but in VB.NET, there is a property for the ChartArea AxisX interval
if set to 1, then it should show all the X Axis labels
Chart1.ChartAreas(0).AxisX.Interval = 1
- Marked As Answer by Mr Floppy Saturday, January 02, 2010 9:15 PM
-
Saturday, January 02, 2010 9:17 PMWahoo .. that worked! I had a version of that code but it was off slightly. Using "0" in the (0) did the trick !!!
Thanks jwavila!

