Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
LabelStyle Class
Collapse the table of content
Expand the table of content

LabelStyle Class

.NET Framework 4.6 and 4.5

Provides properties that define the visual appearance of the axis labels.


Namespace:  System.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)

public class LabelStyle : ChartElement

The LabelStyle type exposes the following members.

Public methodLabelStyleInitializes a new instance of the LabelStyle class.

Public propertyAngleGets or sets a value that represents the angle at which the font is drawn.
Public propertyEnabledGets or sets a flag that indicates whether the label is enabled.
Public propertyFontGets or sets the font of the label.
Public propertyForeColorGets or sets the color of the label.
Public propertyFormatGets or sets the formatting string for the label text.
Public propertyIntervalGets or sets the size of the label interval.
Public propertyIntervalOffsetGets or sets the offset of the label interval.
Public propertyIntervalOffsetTypeGets or sets the unit of measurement of the label interval offset.
Public propertyIntervalTypeGets or sets the unit of measurement for the size of a label interval.
Public propertyIsEndLabelVisibleGets or sets a flag that determines whether the labels are shown at axis ends.
Public propertyIsStaggeredGets or sets a flag that determines whether the labels are shown with an offset.
Public propertyTagGets or sets an object associated with this chart element. (Inherited from ChartElement.)
Public propertyTruncatedLabelsGets or sets a flag that determines whether the labels can be truncated.

Public methodDispose()Releases the resources used by the ChartElement. (Inherited from ChartElement.)
Protected methodDispose(Boolean)Releases the resources used by the LabelStyle. (Overrides ChartElement.Dispose(Boolean).)
Public methodEqualsDetermines whether the specified Object is equal to the current ChartElement. (Inherited from ChartElement.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns a hash function for a particular type. (Inherited from ChartElement.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current Object. (Inherited from ChartElement.)

Members of this class are also used to calculate the intervals and positions of the axis labels, and to draw them.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft