gpt4 book ai didi

C#图表显示所有标签

转载 作者:太空狗 更新时间:2023-10-29 19:51:17 26 4
gpt4 key购买 nike

在 C# 网络应用程序上工作时,我的问题是只有部分值出现在报告中(这是我所说的 X 轴,它只显示所有其他值)。它只是显示每个其他的。我怎样才能显示所有这些?

谢谢

enter image description here

enter image description here

我的代码:

<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>

最佳答案

我认为有些混淆了值和标签。原来的问题是指被跳过的标签。

这是MS Chart with ASP.NET chart type “column” not showing axis x label if there are more than 9 bar in the chart的重复问题

答案是

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

关于C#图表显示所有标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7575015/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com