.ChartLength Dotfield
- Last UpdatedNov 07, 2016
- 1 minute read
The .ChartLength dotfield specifies the length of time shown in a Historical trend.
Category
Historical.
Usage
HistTrendTag.ChartLength
Parameter
HistTrendTag
HistTrend tag assigned the name of the trend.
Remarks
The value assigned to .ChartLength specifies the length of the chart in seconds. The length is defined as the amount of time currently shown on the Historical Trend Chart. More specifically, the calculation retrieved as the Chart Length from a Historical Trend Chart is:
ChartLength=(Date/Time Stamp on Right-Hand Side of Chart) - (Date/Time Stamp on Left-Hand Side of Chart);
Because Date/Time Stamps are expressed in seconds from midnight on January 1, 1970, the calculation results in seconds of time displayed between the left and right sides of the chart.
Whenever adding or subtracting from .ChartLength, time is expressed in seconds. Therefore, to subtract two hours from the current .ChartLength, convert hours to seconds before performing the calculation. For example:
(2 hours) * (60 minutes/hour) * (60 seconds/minute) = 7200 seconds.
Data Type
Integer (read/write).
Valid Values
Any positive integer.
Examples
This example forces the length of the historical trend to one hour.
HtTag.ChartLength=3600 {60 minutes * 60 seconds/minute};
This example scrolls the trend left by 50 percent.
HtTag.ChartStart=HtTag.ChartStart - HtTag.ChartLength / 2;
This example scrolls the chart left by 10 percent.
HtTag.ChartStart=HtTag.ChartStart - (.10 * HtTag.ChartLength);
See Also
.ChartStart