new DateScale(config)
Represents date scale on the chart.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | The configuration object.
Properties
|
Extends
Members
-
<readonly> bottomPanel :StockChartX.DateScalePanel
-
The bottom date scale panel.
Type:
-
<readonly> bottomPanelCssClass :string
-
Gets CSS class name of bottom date scale root div element.
Type:
- string
-
<readonly> chart :StockChartX.Chart
-
The parent chart.
Type:
- Inherited From:
-
<readonly> columnsCount :number
-
Gets number of columns in the chart.
Type:
- number
-
<readonly> columnWidth :number
-
Get column width.
Type:
- number
-
<readonly> firstVisibleIndex :number
-
The index of first visible record (it's integral value unlike firstVisibleRecord).
Type:
- number
-
firstVisibleRecord :number
-
Gets/Sets first visible record.
Type:
- number
-
getActualTheme :object
-
Returns actual theme.
Type:
- object
-
lastVisibleRecord :number
-
Gets/Sets last visible record.
Type:
- number
-
manualHeight :Number
-
Gets/Sets manual height of date scale.
Type:
- Number
-
<readonly> maxAllowedRecord :Number
-
Gets maximum allowed record number that can be set.
Type:
- Number
-
minVisibleRecords :Number
-
Gets/Sets minimum number of visible records.
Type:
- Number
-
<readonly> projection :StockChartX.Projection
-
Gets projection object to convert coordinates.
Type:
-
scrollKind :StockChartX.DateScaleScrollKind
-
Gets/Sets scroll kind.
Type:
-
theme :object
-
Gets/Sets theme.
Type:
- object
-
<readonly> topPanel :StockChartX.DateScalePanel
-
The top date scale panel.
Type:
-
<readonly> topPanelCssClass :string
-
Gets CSS class name of top date scale root div element.
Type:
- string
-
useManualHeight :boolean
-
Gets/Sets the flag that indicate whether manual height should be used.
Type:
- boolean
-
zoomKind :StockChartX.DateScaleZoomKind
-
Gets/Sets zoom kind.
Type:
- Default Value:
-
zoomMode :StockChartX.DateScaleZoomMode
-
Gets/Sets zoom mode.
Type:
- Default Value:
Methods
-
autoScale()
-
Auto-scales date scale to show all records.
-
destroy()
-
Destroys and removes control from the parent element.
- Inherited From:
-
draw()
-
Draws component.
- Inherited From:
-
formatDate(date)
-
Returns string representation of a given date according to the chart's time interval.
Parameters:
Name Type Description date
Date The date. Returns:
- Type
- string
-
get()
-
The index of last visible record (it's integral value unlike lastVisibleRecord).
-
getDateDataSeries()
-
Returns date data series.
Returns:
-
layout(frame, projectionFrame)
-
Layouts date scale elements.
Parameters:
Name Type Description frame
StockChartX.Rect The frame rectangle. projectionFrame
StockChartX.Rect The projection frame rectangle. -
layoutScalePanel(chartFrame)
-
Layouts scale container only.
Parameters:
Name Type Description chartFrame
StockChartX.Rect The chart frame rectangle. -
loadState(state)
-
Loads component state.
Parameters:
Name Type Description state
Object The state - Inherited From:
- See:
-
saveState
to save state.
-
needsAutoScale()
-
Determines if auto-scaling is needed.
Returns:
- Type
- boolean
-
saveState()
-
Saves component state.
- Inherited From:
- See:
-
loadState
to load state.
Returns:
- Type
- Object
-
scrollOnPixels(pixels)
-
Scrolls date scale on a given number of pixels.
Parameters:
Name Type Description pixels
number The number of pixels to scroll. Returns:
True if scroll was performed, false otherwise.- Type
- boolean
-
scrollOnRecords(records)
-
Scrolls date scale on a given number of records.
Parameters:
Name Type Description records
Number The number of records to scroll. Returns:
True if scroll was performed, false otherwise.- Type
- boolean
-
setNeedsAutoScale()
-
Marks that scale needs to be auto-scaled on next layout.
-
zoomOnPixels(leftPixels, rightPixels)
-
Zooms date scale on a given number of pixels.
Parameters:
Name Type Argument Description leftPixels
Number The number of pixels to zoom from the left side. rightPixels
Number <optional>
The number of pixels to zoom from the right side. Returns:
True if zoom was performed, false otherwise.- Type
- Boolean
-
zoomOnRecords(leftRecords, rightRecords)
-
Zooms date scale on a given number of records.
Parameters:
Name Type Argument Description leftRecords
Number Number of records to zoom from the left side. rightRecords
Number <optional>
Number of records to zoom from the right side. Returns:
True if zoom was performed, false otherwise.- Type
- boolean