Axis.LabelStyle 属性
定义
命名空间:
System.Windows.Forms.DataVisualization.Charting
程序集:
System.Windows.Forms.DataVisualization.dll
获取或设置轴的 LabelStyle 属性。
C#复制
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameExpandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.LabelStyle LabelStyle { get; set; }
属性值
LabelStyle
一个 LabelStyle 对象,该对象用于定义轴标签样式。
属性
BindableAttribute TypeConverterAttribute
注解
使用此属性可以指定轴标签的样式、格式设置等。
IsLabelAutoFit如果 属性为 true
,则会自动确定字号、字体角度和偏移标签的使用。 如果设置 LabelStyle.Font.Size Angle 或 IsStaggered 属性中的任何一个,则 IsLabelAutoFit 属性将设置为 false
。
请注意,如果标签使用由日期不带时间的日期组成的格式,并且 DateTime 使用的数据点值指定时间,则时间将影响数据点的位置,即使由于标签格式而未显示它们。