Axis.LabelStyle 属性
定义
获取或设置轴的 LabelStyle 属性。Gets or sets the LabelStyle properties of an axis.
public:
property System::Windows::Forms::DataVisualization::Charting::LabelStyle ^ LabelStyle { System::Windows::Forms::DataVisualization::Charting::LabelStyle ^ get(); void set(System::Windows::Forms::DataVisualization::Charting::LabelStyle ^ value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameExpandableObjectConverter))]
public System.Windows.Forms.DataVisualization.Charting.LabelStyle LabelStyle { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.NoNameExpandableObjectConverter))>]
member this.LabelStyle : System.Windows.Forms.DataVisualization.Charting.LabelStyle with get, set
Public Property LabelStyle As LabelStyle
属性值
一个 LabelStyle 对象,该对象用于定义轴标签样式。A LabelStyle object, which defines the axis label style.
- 属性
注解
使用此属性可以指定轴标签的样式和格式等。Use this property to specify the style, formatting, and so forth, of axis labels.
如果 IsLabelAutoFit 属性为 true ,则自动确定字体大小、字体角度和偏移标签的使用情况。If the IsLabelAutoFit property is true, the font size, font angle and the use of offset labels are determined automatically. 如果设置了 LabelStyle Angle 或属性中的任何一个 IsStaggered ,则 IsLabelAutoFit 属性将设置为 false 。If you set any one of the LabelStyle.Font.Size, Angle or IsStaggered properties, the IsLabelAutoFit property will be set to false.
请注意,如果标签包含日期没有时间的格式,并且 DateTime 使用的数据点值指定了时间,则时间将影响数据点的位置,即使它们由于标签格式而不显示。Note that if a format that consists of a date without a time is used for labels, and the DateTime data point values that are used specify times, the times will affect the positions of the data points, even though they are not displayed due to the label formatting.