Class PeriodSelector

Index

Properties

Methods

Properties

public dateFormat: string

Date format of date input fields. Check [[http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/formatters/DateFormatter.html DD-MM-YYYY

public fromText: string

Text displayed next to "from" date input field. From:

public hideOutOfScopePeriods: boolean

Specifies if period buttons with date range bigger than available data should be hidden.

default

true

public inputFieldWidth: number

Width of date input fields, in pixels. Works only if period selector is horizontal.

default

100

public inputFieldsEnabled: boolean

Specifies whether period selector displays "from" and "to" date input fields.

default

true

public periods: Array<any>

Array of predefined period objects. Period object has 4 properties - period, count, label and selected. Possible period values are: "ss" - seconds, "mm" - minutes, "hh" - hours, "DD" - days, "MM" - months and "YYYY" - years. property "count" specifies how many periods this button will select. "label" will be displayed on a button and "selected" is a boolean which specifies if this button is selected when chart is initialized or not. Example: {period:"DD", count:10, label:"10 days", selected:false}.

public periodsText: string

Text displayed next to predefined period buttons. Zoom:

public position: string

Possible values: "right", "left", "top", "bottom". bottom

public selectFromStart: boolean

Specifies whether predefined period buttons should select a period from the beginning or the end of the data.

public toText: string

Text displayed next to "to" date input field. To:

public width: number

Width of a period selector, when position is "left" or "right".

default

180

Methods

public addListener(type: any, handler: (e: { type: string; startDate: Date; endDate: Date; predefinedPeriod: string; count: number; }) => void): any

Adds event listener to the object. .

Parameters

  • type: any
  • handler: (e: { type: string; startDate: Date; endDate: Date; predefinedPeriod: string; count: number; }) => void
    • Dispatched when dates in period selector input fields are changed or user clicks on one of the predefined period buttons.

Returns

any

public removeListener(chart: AmChart, type: string, handler: any): any

Removes event listener from chart object.

Parameters

  • chart: AmChart
  • type: string
  • handler: any

Returns

any