ScrollRangeType class (Gantt)

ScrollRangeType()

new ScrollRangeType()

The ScrollRangeType type defines the {start, end} type for the scrollRange field of a chart. Both start and end must be specified; otherwise, the scroll range has no effect. The start and end fields of ScrollRangeType indicate the scroll range's start/left-margin date/time and end/right-margin date/time, respectively. Both fields can be one of the following:
  • string, date in format "#MM/DD/YYYY[ HH:mm:ss]#"
  • Date, a JavaScript Date object to be copied
  • number, integer representing the year of the date to create
  • null, current date and time (equivalent to Now)
If the scroll range is set, the chart's scrollable area is limited to the defined start and end dates, preventing scrolling beyond these limits. This is useful for focusing on a specific time period or ensuring that users do not scroll to irrelevant date ranges. The ScrollRange property gets or sets the range of dates to scroll within. The ScrollRange property is using the GetScrollRange() and SetScrollRange() methods. By default, the ScrollRange property is null, meaning that there is no limit for scrolling the chart.
Example
The following sample limits the chart's scroll-range to Jan 1st, 2001 to Jan 1st, 2002:

{
   start: 2001,
   end: 2002
}

The following sample limits the chart's scroll-range to Apr 1st, 2021 to Apr 30, 2021:

{
   start: "#4/1/2021#",
   end: "#4/30/2021#"
}

Members

(static) end :any

The end field indicates the scroll range's end/right-margin date/time. Can be one of the following:
  • string, date in format "#MM/DD/YYYY[ HH:mm:ss]#"
  • Date, a JavaScript Date object to be copied
  • number, integer representing the year of the date to create
  • null, current date and time (equivalent to Now)
Type:
  • any
end

(static) start :any

The start field indicates the scroll range's start/left-margin date/time. Can be one of the following:
  • string, date in format "#MM/DD/YYYY[ HH:mm:ss]#"
  • Date, a JavaScript Date object to be copied
  • number, integer representing the year of the date to create
  • null, current date and time (equivalent to Now)
Type:
  • any
start