Grid.IntervalType 属性
定义
获取或设置主要网格线或次要网格线的间隔类型。Gets or sets the interval type for major or minor grid lines.
public:
property System::Windows::Forms::DataVisualization::Charting::DateTimeIntervalType IntervalType { System::Windows::Forms::DataVisualization::Charting::DateTimeIntervalType get(); void set(System::Windows::Forms::DataVisualization::Charting::DateTimeIntervalType value); };
[System.ComponentModel.Bindable(true)]
public System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType IntervalType { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.IntervalType : System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType with get, set
Public Property IntervalType As DateTimeIntervalType
属性值
一个 DateTimeIntervalType 枚举值,该值指示间隔类型。A DateTimeIntervalType enumeration value that indicates the interval type. 默认情况下,不对轴标签、主要刻度线和主要网格线设置该值,而是使用 NotSet 枚举值。By default it is not set for axis labels, major tick marks and major grid lines, by using the NotSet enumeration value. 对于次要刻度线和网格线,默认值为 Auto。The default value for minor tick marks and grid lines is Auto.
- 属性
注解
默认情况下,不会为轴标签、主要刻度线和主要网格线设置此属性。By default this property is not set for axis labels, major tick marks and major grid lines. 如果未设置该属性,则默认情况下,在设计时显式使用 "未设置",或者在运行时为其赋值,则 NotSet 此属性的实际值由 IntervalOffsetType Axis 图表元素-网格线或刻度线(例如)所属的对象的属性确定。If it is not set - either by default, by explicitly using "Not Set" at design time, or by assigning it a value of NotSet at run time - the actual value of this property is determined by the IntervalOffsetType property of the Axis object that the chart element - a grid line or tick mark, for example - belongs to.
次要刻度线和网格线的间隔类型永远不会受属性值的影响 IntervalType 。The interval type of minor tick marks and grid lines is never affected by the value of the IntervalType property.
间隔类型可设置为 Auto ; 间隔的类型取决于所绘制对象的 X 值或 Y 值 DataPoint ,具体取决于适用元素所属的轴。Interval types can be set to Auto; the type of interval then depends on either the X-values or Y-values of the plotted DataPoint objects, depending on which axis the applicable elements belong to.
IntervalType如果数据点的值为或值,则设置值轴的属性仅会产生效果 DateTime double 。Setting the IntervalType property for a value axis will only have an effect if the values of the data points are DateTime or double values. 此外, XValueType YValueType 绘制的或的属性 Series 必须设置为 Auto 或 DateTime 。Also, the XValueType or YValueType property of the plotted Series must be set to Auto or DateTime.
IntervalType如果 XValueType 属性 (或 YValueType 属性(具体取决于绘图对象的相关轴) 为或),则设置分类轴的属性仅会产生效果 Series Auto DateTime 。Setting the IntervalType property for a categorical axis will only have an effect if the XValueType property (or YValueType property, depending on the axis in question) of the plotted Series object is either Auto or DateTime.
备注
星期日被视为一周的第一天。Sunday is considered the first day of the week.