关于Chart控件X轴数据显示不全解决方法。

项目中使用Chart控件,在使用过程中发现X轴数据超过一定数量时 展现不全。和师傅试了很久终于找到解决方法。

只需:

<axisx linecolor="64, 64, 64, 64" Interval="1" IntervalOffset="Auto" LabelsAutoFit="true"  IntervalAutoMode="VariableCount">
  <labelstyle font="Trebuchet MS, 8.25pt, style=Bold" offsetlabels="False"></labelstyle>
<majorgrid linecolor="64, 64, 64, 64"></majorgrid>
</axisx>

Interval="1" IntervalAutoMode="VariableCount" 设置为这个属性即可。

同时在对于展现图标表头数据:

 

   Chart1.Series["Series 1"].ShowLabelAsValue = true;
原文地址:https://www.cnblogs.com/BungeeJumping/p/3130850.html