property Chart.Label(Unit as UnitEnum) as String
Retrieves or sets a value that indicates the predefined format of the level's label for a specified unit.

 TypeDescription 
   Unit as UnitEnum An UnitEnum expression that indicates the time unit  
   String A String expression that includes the format of the label.  
The Label property specifies a predefined label for a specified unit. Use the UnitScale property to change the scale unit. The UnitScale property changes the Label, Unit and the ToolTip for a level with predefined values defined by the Label and LabelToolTip properties. Use the UnitWidth property to specify the width of the time unit. Use the Zoom method to zoom the chart to a specified interval of dates. Use the Label property to assign a different label for a specified level. Use the LabelToolTip property to specify the predefined type of tooltip being displayed when the chart is zoomed. Use the ToolTip property to specify the tooltip that shows up when the cursor hovers the level. Use the FormatDate property to format a date. Use the MonthNames property to specify the name of the months in the year. The WeekDays property retrieves or sets a value that indicates the list of names for each week day, separated by space. If the Label property is empty, the unit is not displayed in the zooming scale, if the AllowOverviewZoom property is not exDisableZoom.

The Label property supports alternative HTML labels being separated by "<|>" and values for Count and Unit being separated by "<||>". By alternate HTML label we mean that you can define a list of HTML labels that may be displayed in the chart's header based on the space allocated for the time-unit. In other words,  the control chooses automatically the alternate HTML label to be displayed for best fitting in the portion of the chart where the time-unit should be shown. 

The Label property format is "ALT1[<|>ALT2<|>...[<||>COUNT[<||>UNIT]]]" where 

The Label property may change the Unit and the Count property. You can always use a different Unit or Count by setting the property after setting the Label property. 

The Label property supports the following built-in tags:

The following tags are displayed based on the user's Regional and Language Options:

The Label property supports the following built-in HTML tags:

Newer HTML format supports subscript and superscript like follows:

Also, newer HTML format supports decorative text like follows:

The Label property may be a combination of any of these tags. For instance, the "<b><%mmm%></b> <%d%>, '<%yy%>" displays a date like: "May 29,'05".

By default, the Label property is:

For instance the Label(exWeek) is "<|><%ww%><|><%m3%> <%d%>, '<%yy%><r><%ww%><|><%mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256" which means that if a level's unit is set on exWeek it may display one of the following alternate labels:

So actually, the control will choose any of these formats based on the UnitWidth, Font and the layout of the levels.


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.