Gets or sets the label format of the data point.
Data point label format string
Visual Basic (Declaration) | |
---|---|
Public Property LabelFormat As String |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public string LabelFormat {get; set;} |
Return Value
A value that represents the label format for the applicable chart element.
Only applied if ShowLabelAsValue is set to true and Label is a zero-length string. If a custom label (using the Label property) is used for a data point then formatting is up to the developer.
Formatting can be performed at design-time using the "Label Format" editor, which is accessed using a "Format" property in the designer. It can also be done at run-time using code.
There are three possible types of label formats: numerical, date/time and custom.
Numerical formats are: Currency, Decimal, Scientific, Fixed-Point, General, Number and Percent. The precision-specifier determines the desired number of decimal places.
There are numerous standard date/time formats (e.g. Short Date, Long Date, Short Time, Long Time, etc.). For a complete listing see the Date and Time Format Strings topic topic in your MSDN library, and refer to the "Standard DateTime Format Strings" section.
Custom formatting can be one of two types: Number or Date/Time, and specific characters are used to create a mask that is then applied to the labels. See the Date and Time Format Strings topic in your MSDN library and refer to the "Custom DateTime Format Strings" section for a detailed discussion concerning custom formatting.
For sample code illustrating how to implement custom and standard formatting at run-time see the Date and Time Format Strings topic in the MSDN library.
See the Label Styles and Formats topic for a detailed discussion on label formatting.
In Dundas Chart, the "P" and "%" format string functionality is overridden. The reason for this is the need for the exact numbers to be loaded into the Chart, being the numbers used on the axis and point labels. This applies to the "P" format string (seen in "Standard Numeric Format Strings" on MSDN) and the "%" character (described in "Custom Numeric Format Strings").
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family