method Chart.MarkTimeZone (Key as Variant, [Start as Variant], [End as Variant], [Color as Variant], [Options as Variant])
Highlights a specified time zone from start to end with a different background color, pattern, transparency, HTML captions and so on.

   Key as Variant A String expression that specifies a key to identify the zone. The String must be not empty, else the zone is not highligted. If a zone with the same key is already added, the current call changes not missing parameters.  
   Start as Variant A DATE expression that specifies the starting point for the zone.  
   End as Variant A DATE expression that specifies the ending point for the zone.  
   Color as Variant A Color expression that specifies the date-time zone to be highlighted. The last 7 bits in the high significant byte of the color to indicates the identifier of the skin being used. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the background's part.  
   Options as Variant A String expression that specifies options to mark the zone, as explained bellow.  
By default, the chart displays no date-time zones, unless you are calling the MarkTimeZone method. A zone can be used to highlight a range of dates, specifying the start and end zone. Use the RemoveTimeZone method to delete the time zone being added previously using the MarkTimeZone method. The TimeZoneFromPoint property retrieves the key of the time-zone from the cursor. The TimeZoneInfo property retrieves information about the time-zone giving its key. The MarkTodayColor property specifies the color to mark the today date. Use the SelectDate property to select a date by clicking the chart's header. Use the MarkNowColor property to show a vertical bar that indicates the current date-time in the control's chart, from seconds to seconds, minutes, and so on. The OverviewShowMarkTimeZones property shows the marked time-zones on the control's overview map.

A date-time zone can display a:

Also, a zone can display multiple HTML captions aligned to any corner of the zone. By default, all HTML captions are aligned to the bottom center area.

The following screen shot shows two zones being marked :

The Options parameter contains a list of fields separated by ; character as following:

The list continues by pair of HTML/Alignment elements. For instance, the ";;Caption <b>1</b>;1;Caption <b>2</b>;17;Caption <b>3</b>" specifies a three captions to be shown in the zone. For instance, the "50;;text to be shown,1" indicates that the zone is semi-transparent (5), displays a solid color ( the pattern field is missing ), and it displays "text to be shown" in the upper-center position of the zone. 

By default, the text of the mark-time zone is not displayed in the chart's histogram area ( HistogramVisible property ), but you can provide multiple HTML caption to the histogram panels, after a ";;;" sequence as in the following sample: "25;;9/19/1994;1;;;Value<br><c><b>20;33" and it should look like follows:



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