[]
Sheets.GanttSheet.Timescale
• new Timescale()
Creates a timescale for project. Internal used only.
classdesc Represents the timescale of GanttChart.
• autoFitMode: TimeScaleAutoFitMode
Gets or sets the auto-fit mode of the timescale. When set to "project", the minDate and maxDate will be automatically adjusted to the project's actual date range after each schedule. The default value is "none".
• bottomTier: TimescaleTier
Gets the bottom tier of the timescale.
readonly
• currentDate: Date
Gets the current date for the timescale. To change it, call scroll functions of timescale.
readonly
• margin: number
Gets or sets the margin of the timescale. The margin extends the scrollable range before minDate and after maxDate by the specified number of minimum tier units. The default value is 0.
• maxDate: Date
Gets or sets the maximum date of the scrollable area of the timescale. The default value is 2030-1-1.
• middleTier: TimescaleTier
Gets the middle tier of the timescale.
readonly
• minDate: Date
Gets or sets the minimum date of the scrollable area of the timescale. The default value is 2020-1-1.
• nonWorkingTime: NonWorkingTimeStyle
Gets the non working time area of the timescale.
readonly
• showScaleSeparator: boolean
Gets or sets a boolean value that indicates whether show the scale separator line between top tier and middle tier.
• tierMode: TimescaleTierMode
Gets or sets the tier mode for the timescale.
• timescaleBottomTierTextStyle: TextStyle
Gets or sets the text style for bottom tier labels of timescales.
• timescaleMiddleTierTextStyle: TextStyle
Gets or sets the text style for middle tier labels of timescales.
• timescaleTopTierTextStyle: TextStyle
Gets or sets the text style for top tier labels of timescales.
• topTier: TimescaleTier
Gets the top tier of the timescale.
readonly
• zoomFactor: number
Gets a number value that indicates the zoom factor for timescale. To change it, call zoom functions of timescale.
readonly
▸ scroll(pixels): void
Scrolls the timescale in pixels. Note timescale will scroll to the nearest tick.
| Name | Type | Description |
|---|---|---|
pixels |
number |
Indicates the pixels to scroll. Positive number indicates scroll forward, and negative number indicates scroll backward. |
void
▸ scrollBy(count, unit): void
Scrolls the timescale by the specified count of units. Note timescale will scroll to the nearest tick.
| Name | Type | Description |
|---|---|---|
count |
number |
Indicates the time in specified units to scroll. Positive number indicates scroll forward, and negative number indicates scroll backward. |
unit |
TimescaleUnit |
Indicates the unit for count value. |
void
▸ scrollOneTick(forward): void
Scrolls the timescale by one tick.
| Name | Type | Description |
|---|---|---|
forward |
boolean |
A boolean value that indicates to scroll forward or backward. |
void
▸ scrollTo(date, percentOfViewport?): void
Scrolls the timescale to the specified date. Note timescale will scroll to the nearest tick.
| Name | Type | Description |
|---|---|---|
date |
Date |
A Date value indicates the scroll target. |
percentOfViewport? |
number |
- |
void
▸ zoomAuto(): void
Zooms the timescale to suitable factor according to the labels of ticks on each tiers automatically.
void
▸ zoomIn(adjustTierUnit?): void
Zooms in the timescale to the next level.
| Name | Type |
|---|---|
adjustTierUnit? |
boolean |
void
▸ zoomOut(adjustTierUnit?): void
Zooms out the timescale to the next level.
| Name | Type |
|---|---|
adjustTierUnit? |
boolean |
void
▸ zoomTo(zoomFactor, adjustTierUnit?): void
Zooms the timescale to the specified factor.
| Name | Type | Description |
|---|---|---|
zoomFactor |
number |
A number value indicates the target zoom factor. |
adjustTierUnit? |
boolean |
- |
void
▸ zoomToRange(start, end, adjustTierUnit?): void
Zooms the timescale to display the target date range in viewport. Note timescale will adjust to the nearest ticks.
| Name | Type | Description |
|---|---|---|
start |
Date |
A date value indicates the start of data range to display. |
end |
Date |
A date value indicates the end of data range to display. |
adjustTierUnit? |
boolean |
- |
void