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

我的未来我决定 提交于 2019-11-29 01:27:56

I had the same problem, but i'm using c# on page load.

I solved it by adding this

    Chart2.ChartAreas["ChartArea1"].AxisX.Interval = 1;

Chart2.ChartAreas["ChartArea1"].AxisX.Interval = 1;

Ranjan
<ChartAreas>
<asp:ChartArea Name="ChartArea1" >
<AxisY Title="Progress->">
</AxisY>
<AxisX Interval="1" Title="Activity->">
</AxisX>
</asp:ChartArea>

Try setting the width of the chart and see if that resolves issue with only showing 9 bars.

<asp:Chart ID="chtNBAChampionships" runat="server" Width="400px">

You can set the color in the DataPoint.

<asp:DataPoint AxisLabel="Celtics" YValues="17" Color="Green" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!